From 7c54b84b46e1f10f48d131c31815851ef2051948 Mon Sep 17 00:00:00 2001 From: c-cube Date: Mon, 16 Oct 2023 19:31:37 +0000 Subject: [PATCH] deploy: 1d8ccc5b4589c4da901fefeac3eace3aaf14b565 --- dev/containers-data/CCBV/index.html | 4 +- .../CCBijection/Make/argument-1-L/index.html | 2 +- .../CCBijection/Make/argument-2-R/index.html | 2 +- .../CCBijection/Make/index.html | 2 +- dev/containers-data/CCBijection/index.html | 4 +- .../module-type-OrderedType/index.html | 2 +- .../CCBijection/module-type-S/index.html | 2 +- .../CCBitField/Make/index.html | 2 +- dev/containers-data/CCBitField/index.html | 4 +- .../CCBitField/module-type-S/index.html | 2 +- dev/containers-data/CCCache/index.html | 8 +- dev/containers-data/CCDeque/index.html | 2 +- dev/containers-data/CCFQueue/index.html | 2 +- dev/containers-data/CCFun_vec/index.html | 2 +- dev/containers-data/CCGraph/Dot/index.html | 28 +- dev/containers-data/CCGraph/Iter/index.html | 2 +- .../CCGraph/Lazy_tree/index.html | 2 +- .../CCGraph/Map/argument-1-O/index.html | 2 +- dev/containers-data/CCGraph/Map/index.html | 2 +- .../CCGraph/Traverse/Event/index.html | 16 +- .../CCGraph/Traverse/index.html | 30 +- dev/containers-data/CCGraph/index.html | 54 +-- .../CCGraph/module-type-MAP/index.html | 2 +- .../CCHashSet/Make/argument-1-E/index.html | 2 +- dev/containers-data/CCHashSet/Make/index.html | 2 +- dev/containers-data/CCHashSet/index.html | 2 +- .../CCHashSet/module-type-ELEMENT/index.html | 2 +- .../CCHashSet/module-type-S/index.html | 2 +- .../CCHashTrie/Make/argument-1-K/index.html | 2 +- .../CCHashTrie/Make/index.html | 8 +- .../CCHashTrie/Transient/index.html | 2 +- dev/containers-data/CCHashTrie/index.html | 2 +- .../CCHashTrie/module-type-KEY/index.html | 2 +- .../CCHashTrie/module-type-S/index.html | 8 +- dev/containers-data/CCHet/Key/index.html | 2 +- dev/containers-data/CCHet/Map/index.html | 2 +- dev/containers-data/CCHet/Tbl/index.html | 2 +- dev/containers-data/CCHet/index.html | 2 +- dev/containers-data/CCImmutArray/index.html | 10 +- dev/containers-data/CCIntMap/index.html | 6 +- dev/containers-data/CCKTree/Dot/index.html | 2 +- .../CCKTree/class-type-pset/index.html | 2 +- dev/containers-data/CCKTree/index.html | 4 +- .../CCLazy_list/Infix/index.html | 2 +- dev/containers-data/CCLazy_list/index.html | 2 +- .../CCMixmap/Make/argument-1-X/index.html | 2 +- dev/containers-data/CCMixmap/Make/index.html | 2 +- dev/containers-data/CCMixmap/index.html | 4 +- .../CCMixmap/module-type-ORD/index.html | 2 +- .../CCMixmap/module-type-S/index.html | 2 +- dev/containers-data/CCMixset/index.html | 4 +- dev/containers-data/CCMixtbl/index.html | 4 +- .../CCMultiMap/Make/argument-1-K/index.html | 2 +- .../CCMultiMap/Make/argument-2-V/index.html | 2 +- .../CCMultiMap/Make/index.html | 2 +- .../MakeBidir/argument-1-L/index.html | 2 +- .../MakeBidir/argument-2-R/index.html | 2 +- .../CCMultiMap/MakeBidir/index.html | 2 +- dev/containers-data/CCMultiMap/index.html | 4 +- .../CCMultiMap/module-type-BIDIR/index.html | 2 +- .../module-type-OrderedType/index.html | 2 +- .../CCMultiMap/module-type-S/index.html | 2 +- .../CCMultiSet/Make/argument-1-O/index.html | 2 +- .../CCMultiSet/Make/index.html | 2 +- dev/containers-data/CCMultiSet/index.html | 2 +- .../CCMultiSet/module-type-S/index.html | 2 +- .../CCMutHeap/Make/argument-1-X/index.html | 2 +- dev/containers-data/CCMutHeap/Make/index.html | 2 +- dev/containers-data/CCMutHeap/index.html | 2 +- dev/containers-data/CCMutHeap_intf/index.html | 2 +- .../module-type-RANKED/index.html | 2 +- .../CCMutHeap_intf/module-type-S/index.html | 2 +- .../CCPersistentArray/index.html | 2 +- .../Make/argument-1-H/index.html | 2 +- .../CCPersistentHashtbl/Make/index.html | 14 +- .../CCPersistentHashtbl/index.html | 2 +- .../module-type-HashedType/index.html | 2 +- .../module-type-S/index.html | 14 +- dev/containers-data/CCRAL/Infix/index.html | 2 +- dev/containers-data/CCRAL/index.html | 2 +- .../CCRingBuffer/Array/Byte/index.html | 2 +- .../Array/Make/argument-1-Elt/index.html | 2 +- .../CCRingBuffer/Array/Make/index.html | 2 +- .../CCRingBuffer/Array/index.html | 4 +- .../Array/module-type-S/index.html | 2 +- .../CCRingBuffer/Byte/index.html | 2 +- .../CCRingBuffer/Make/Array/index.html | 2 +- .../CCRingBuffer/Make/argument-1-X/index.html | 2 +- .../CCRingBuffer/Make/index.html | 2 +- .../MakeFromArray/argument-1-A/index.html | 2 +- .../CCRingBuffer/MakeFromArray/index.html | 2 +- dev/containers-data/CCRingBuffer/index.html | 4 +- .../module-type-S/Array/index.html | 2 +- .../CCRingBuffer/module-type-S/index.html | 2 +- .../CCSimple_queue/Infix/index.html | 2 +- dev/containers-data/CCSimple_queue/index.html | 2 +- .../CCTrie/Make/argument-1-W/index.html | 2 +- dev/containers-data/CCTrie/Make/index.html | 2 +- .../CCTrie/MakeArray/argument-1-X/index.html | 2 +- .../CCTrie/MakeArray/index.html | 2 +- .../CCTrie/MakeList/argument-1-X/index.html | 2 +- .../CCTrie/MakeList/index.html | 2 +- dev/containers-data/CCTrie/String/index.html | 2 +- dev/containers-data/CCTrie/index.html | 4 +- .../CCTrie/module-type-ORDERED/index.html | 2 +- .../CCTrie/module-type-S/index.html | 2 +- .../CCTrie/module-type-WORD/index.html | 2 +- .../CCWBTree/Make/argument-1-X/index.html | 2 +- dev/containers-data/CCWBTree/Make/index.html | 16 +- .../CCWBTree/MakeFull/argument-1-X/index.html | 2 +- .../CCWBTree/MakeFull/index.html | 16 +- dev/containers-data/CCWBTree/index.html | 2 +- .../CCWBTree/module-type-KEY/index.html | 2 +- .../CCWBTree/module-type-ORD/index.html | 2 +- .../CCWBTree/module-type-S/index.html | 16 +- dev/containers-data/CCZipper/index.html | 2 +- .../Containers_data_top/index.html | 2 +- dev/containers-data/index.html | 2 +- .../CCBlockingQueue/index.html | 2 +- .../CCLock/LockRef/index.html | 2 +- dev/containers-thread/CCLock/index.html | 2 +- .../CCPool/Make/Fut/Infix/index.html | 2 +- .../CCPool/Make/Fut/index.html | 2 +- .../CCPool/Make/argument-1-P/index.html | 2 +- dev/containers-thread/CCPool/Make/index.html | 2 +- dev/containers-thread/CCPool/index.html | 2 +- .../CCPool/module-type-PARAM/index.html | 2 +- dev/containers-thread/CCSemaphore/index.html | 2 +- dev/containers-thread/CCThread/Arr/index.html | 2 +- .../CCThread/Barrier/index.html | 2 +- dev/containers-thread/CCThread/index.html | 2 +- dev/containers-thread/CCTimer/index.html | 2 +- dev/containers-thread/index.html | 2 +- dev/containers/CCArray/Infix/index.html | 2 +- dev/containers/CCArray/index.html | 22 +- .../CCArray/module-type-MONO_ARRAY/index.html | 2 +- dev/containers/CCArrayLabels/Infix/index.html | 2 +- dev/containers/CCArrayLabels/index.html | 50 +-- .../module-type-MONO_ARRAY/index.html | 2 +- dev/containers/CCAtomic/index.html | 2 +- dev/containers/CCBool/index.html | 2 +- dev/containers/CCByte_buffer/index.html | 2 +- .../Make/argument-1-Sexp/index.html | 2 +- .../CCCanonical_sexp/Make/index.html | 2 +- dev/containers/CCCanonical_sexp/index.html | 2 +- dev/containers/CCChar/Infix/index.html | 2 +- dev/containers/CCChar/index.html | 2 +- dev/containers/CCEither/index.html | 18 +- dev/containers/CCEqual/Infix/index.html | 2 +- dev/containers/CCEqual/index.html | 2 +- dev/containers/CCEqualLabels/Infix/index.html | 2 +- dev/containers/CCEqualLabels/index.html | 2 +- dev/containers/CCFloat/Infix/index.html | 2 +- dev/containers/CCFloat/index.html | 2 +- dev/containers/CCFormat/ANSI_codes/index.html | 4 +- dev/containers/CCFormat/Dump/index.html | 2 +- dev/containers/CCFormat/Infix/index.html | 2 +- dev/containers/CCFormat/index.html | 64 +-- dev/containers/CCFun/Infix/index.html | 2 +- .../CCFun/Monad/argument-1-X/index.html | 2 +- dev/containers/CCFun/Monad/index.html | 2 +- dev/containers/CCFun/index.html | 4 +- dev/containers/CCHash/index.html | 4 +- .../CCHashtbl/Make/argument-1-X/index.html | 2 +- dev/containers/CCHashtbl/Make/index.html | 20 +- dev/containers/CCHashtbl/Poly/index.html | 30 +- dev/containers/CCHashtbl/index.html | 30 +- .../CCHashtbl/module-type-S/index.html | 20 +- .../CCHeap/Make/argument-1-E/index.html | 2 +- dev/containers/CCHeap/Make/index.html | 10 +- .../Make_from_compare/argument-1-E/index.html | 2 +- .../CCHeap/Make_from_compare/index.html | 10 +- dev/containers/CCHeap/index.html | 2 +- .../CCHeap/module-type-PARTIAL_ORD/index.html | 2 +- .../CCHeap/module-type-S/index.html | 10 +- .../CCHeap/module-type-TOTAL_ORD/index.html | 2 +- dev/containers/CCIO/File/index.html | 10 +- dev/containers/CCIO/index.html | 28 +- dev/containers/CCInt/Infix/index.html | 2 +- dev/containers/CCInt/index.html | 2 +- dev/containers/CCInt32/Infix/index.html | 2 +- dev/containers/CCInt32/index.html | 2 +- dev/containers/CCInt64/Infix/index.html | 2 +- dev/containers/CCInt64/index.html | 2 +- dev/containers/CCList/Assoc/index.html | 8 +- dev/containers/CCList/Infix/index.html | 4 +- dev/containers/CCList/Ref/index.html | 2 +- .../CCList/Traverse/argument-1-M/index.html | 2 +- dev/containers/CCList/Traverse/index.html | 2 +- dev/containers/CCList/index.html | 62 +-- .../CCList/module-type-MONAD/index.html | 2 +- dev/containers/CCListLabels/Assoc/index.html | 8 +- dev/containers/CCListLabels/Infix/index.html | 4 +- dev/containers/CCListLabels/Ref/index.html | 2 +- .../Traverse/argument-1-M/index.html | 2 +- .../CCListLabels/Traverse/index.html | 2 +- dev/containers/CCListLabels/index.html | 124 +++--- .../CCListLabels/module-type-MONAD/index.html | 2 +- .../CCMap/Make/argument-1-O/index.html | 2 +- dev/containers/CCMap/Make/index.html | 26 +- dev/containers/CCMap/index.html | 4 +- dev/containers/CCMap/module-type-S/index.html | 26 +- dev/containers/CCMonomorphic/index.html | 2 +- dev/containers/CCNativeint/Infix/index.html | 2 +- dev/containers/CCNativeint/index.html | 4 +- dev/containers/CCOpt/Infix/index.html | 2 +- dev/containers/CCOpt/index.html | 2 +- dev/containers/CCOption/Infix/index.html | 2 +- dev/containers/CCOption/index.html | 2 +- dev/containers/CCOrd/Infix/index.html | 2 +- dev/containers/CCOrd/index.html | 4 +- dev/containers/CCPair/index.html | 12 +- dev/containers/CCParse/Debug_/index.html | 2 +- dev/containers/CCParse/Error/index.html | 2 +- dev/containers/CCParse/Infix/index.html | 2 +- dev/containers/CCParse/Position/index.html | 2 +- dev/containers/CCParse/Slice/index.html | 2 +- dev/containers/CCParse/U/index.html | 16 +- dev/containers/CCParse/index.html | 12 +- dev/containers/CCRandom/index.html | 18 +- dev/containers/CCRef/index.html | 2 +- dev/containers/CCResult/Infix/index.html | 2 +- .../CCResult/Traverse/argument-1-M/index.html | 2 +- dev/containers/CCResult/Traverse/index.html | 2 +- dev/containers/CCResult/index.html | 4 +- .../CCResult/module-type-MONAD/index.html | 2 +- dev/containers/CCSeq/Infix/index.html | 2 +- .../CCSeq/Traverse/argument-1-M/index.html | 2 +- dev/containers/CCSeq/Traverse/index.html | 2 +- dev/containers/CCSeq/index.html | 10 +- .../CCSeq/module-type-MONAD/index.html | 2 +- .../CCSet/Make/argument-1-O/index.html | 2 +- dev/containers/CCSet/Make/index.html | 16 +- dev/containers/CCSet/index.html | 4 +- dev/containers/CCSet/module-type-S/index.html | 16 +- dev/containers/CCSexp/Decoder/index.html | 2 +- dev/containers/CCSexp/Make/Decoder/index.html | 2 +- .../CCSexp/Make/argument-1-Sexp/index.html | 2 +- dev/containers/CCSexp/Make/index.html | 2 +- dev/containers/CCSexp/index.html | 2 +- dev/containers/CCSexp_intf/index.html | 2 +- .../module-type-BASIC_SEXP/index.html | 2 +- .../module-type-S/Decoder/index.html | 2 +- .../CCSexp_intf/module-type-S/index.html | 2 +- .../CCSexp_intf/module-type-S0/index.html | 2 +- .../CCSexp_intf/module-type-SEXP/index.html | 2 +- dev/containers/CCSexp_lex/index.html | 2 +- dev/containers/CCString/Find/index.html | 2 +- dev/containers/CCString/Infix/index.html | 2 +- dev/containers/CCString/Split/index.html | 22 +- dev/containers/CCString/index.html | 10 +- dev/containers/CCStringLabels/Find/index.html | 2 +- .../CCStringLabels/Infix/index.html | 2 +- .../CCStringLabels/Split/index.html | 22 +- dev/containers/CCStringLabels/index.html | 32 +- dev/containers/CCUnit/index.html | 2 +- dev/containers/CCUnix/Infix/index.html | 2 +- dev/containers/CCUnix/index.html | 46 +-- dev/containers/CCUtf8_string/index.html | 2 +- dev/containers/CCVector/index.html | 16 +- .../MakeSeeded/argument-1-H/index.html | 2 +- .../Containers/Hashtbl/MakeSeeded/index.html | 2 +- dev/containers/Containers/Hashtbl/index.html | 32 +- .../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 +- dev/containers/Containers/index.html | 2 +- .../MakeSeeded/argument-1-H/index.html | 2 +- .../Hashtbl/MakeSeeded/index.html | 2 +- .../ContainersLabels/Hashtbl/index.html | 32 +- .../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 +- dev/containers/ContainersLabels/index.html | 2 +- .../Containers_bencode/Decode/index.html | 2 +- .../Containers_bencode/Encode/index.html | 2 +- .../Containers_bencode/Str_map/index.html | 4 +- dev/containers/Containers_bencode/index.html | 2 +- dev/containers/Containers_cbor/index.html | 2 +- .../Containers_codegen/Bitfield/index.html | 2 +- .../Containers_codegen/Code/index.html | 2 +- dev/containers/Containers_codegen/index.html | 4 +- dev/containers/Containers_pp/Dump/index.html | 2 +- dev/containers/Containers_pp/Ext/index.html | 2 +- .../Containers_pp/Flatten/index.html | 2 +- dev/containers/Containers_pp/Infix/index.html | 2 +- dev/containers/Containers_pp/Out/index.html | 2 +- .../Containers_pp/Pretty/index.html | 2 +- .../Containers_pp/Term_color/index.html | 2 +- dev/containers/Containers_pp/index.html | 2 +- .../Make/argument-1-A/Node_tbl/index.html | 2 +- .../Make/argument-1-A/index.html | 2 +- dev/containers/Containers_scc/Make/index.html | 2 +- dev/containers/Containers_scc/index.html | 12 +- .../module-type-ARG/Node_tbl/index.html | 2 +- .../Containers_scc/module-type-ARG/index.html | 2 +- .../module-type-S/A/Node_tbl/index.html | 2 +- .../Containers_scc/module-type-S/A/index.html | 2 +- .../Containers_scc/module-type-S/index.html | 2 +- dev/containers/Containers_top/index.html | 2 +- dev/containers/index.html | 2 +- dev/either/Either/index.html | 18 +- dev/either/Either__/index.html | 2 - dev/either/Either__Either_intf/index.html | 2 - dev/either/index.html | 2 +- dev/fonts/fira-mono-v14-latin-500.woff2 | Bin 0 -> 16148 bytes dev/fonts/fira-mono-v14-latin-regular.woff2 | Bin 0 -> 16284 bytes dev/fonts/fira-sans-v17-latin-500.woff2 | Bin 0 -> 24020 bytes dev/fonts/fira-sans-v17-latin-500italic.woff2 | Bin 0 -> 24896 bytes dev/fonts/fira-sans-v17-latin-700.woff2 | Bin 0 -> 24964 bytes dev/fonts/fira-sans-v17-latin-700italic.woff2 | Bin 0 -> 26072 bytes dev/fonts/fira-sans-v17-latin-italic.woff2 | Bin 0 -> 24936 bytes dev/fonts/fira-sans-v17-latin-regular.woff2 | Bin 0 -> 23880 bytes dev/fonts/noticia-text-v15-latin-700.woff2 | Bin 0 -> 21972 bytes dev/fonts/noticia-text-v15-latin-italic.woff2 | Bin 0 -> 17356 bytes .../noticia-text-v15-latin-regular.woff2 | Bin 0 -> 22308 bytes dev/highlight.pack.js | 373 +++++++++++++----- dev/ocaml/Afl_instrument/index.html | 4 +- dev/ocaml/Alias_analysis/index.html | 6 +- dev/ocaml/Allocated_const/index.html | 2 +- dev/ocaml/Annot/index.html | 2 +- dev/ocaml/Arch/index.html | 4 +- .../Make/argument-1-S/Key/Map/index.html | 4 +- .../Make/argument-1-S/Key/index.html | 2 +- .../Make/argument-1-S/Value/index.html | 2 +- .../Arg_helper/Make/argument-1-S/index.html | 2 +- dev/ocaml/Arg_helper/Make/index.html | 2 +- dev/ocaml/Arg_helper/index.html | 2 +- dev/ocaml/Asmgen/index.html | 30 +- dev/ocaml/Asmlibrarian/index.html | 2 +- dev/ocaml/Asmlink/index.html | 6 +- dev/ocaml/Asmpackager/index.html | 8 +- dev/ocaml/Ast_helper/Attr/index.html | 2 +- dev/ocaml/Ast_helper/Cf/index.html | 36 +- dev/ocaml/Ast_helper/Ci/index.html | 16 +- dev/ocaml/Ast_helper/Cl/index.html | 40 +- dev/ocaml/Ast_helper/Const/index.html | 8 +- dev/ocaml/Ast_helper/Csig/index.html | 4 +- dev/ocaml/Ast_helper/Cstr/index.html | 4 +- dev/ocaml/Ast_helper/Ctf/index.html | 30 +- dev/ocaml/Ast_helper/Cty/index.html | 28 +- dev/ocaml/Ast_helper/Exp/index.html | 152 +++---- dev/ocaml/Ast_helper/Incl/index.html | 10 +- dev/ocaml/Ast_helper/Mb/index.html | 12 +- dev/ocaml/Ast_helper/Md/index.html | 12 +- dev/ocaml/Ast_helper/Mod/index.html | 34 +- dev/ocaml/Ast_helper/Ms/index.html | 12 +- dev/ocaml/Ast_helper/Mtd/index.html | 14 +- dev/ocaml/Ast_helper/Mty/index.html | 30 +- dev/ocaml/Ast_helper/Of/index.html | 12 +- dev/ocaml/Ast_helper/Opn/index.html | 12 +- dev/ocaml/Ast_helper/Pat/index.html | 64 +-- dev/ocaml/Ast_helper/Rf/index.html | 12 +- dev/ocaml/Ast_helper/Sig/index.html | 34 +- dev/ocaml/Ast_helper/Str/index.html | 36 +- dev/ocaml/Ast_helper/Te/index.html | 50 +-- dev/ocaml/Ast_helper/Typ/index.html | 50 +-- dev/ocaml/Ast_helper/Type/index.html | 42 +- dev/ocaml/Ast_helper/Val/index.html | 12 +- dev/ocaml/Ast_helper/Vb/index.html | 12 +- dev/ocaml/Ast_helper/index.html | 2 +- dev/ocaml/Ast_invariants/index.html | 2 +- dev/ocaml/Ast_iterator/index.html | 4 +- dev/ocaml/Ast_mapper/index.html | 16 +- dev/ocaml/Asttypes/index.html | 2 +- dev/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 +- dev/ocaml/Augment_specialised_args/index.html | 2 +- .../module-type-S/index.html | 8 +- dev/ocaml/Backend_intf/index.html | 2 +- .../Backend_intf/module-type-S/index.html | 2 +- dev/ocaml/Backend_var/Provenance/index.html | 10 +- .../Backend_var/With_provenance/index.html | 2 +- dev/ocaml/Backend_var/index.html | 2 +- dev/ocaml/Bigarray/index.html | 6 +- dev/ocaml/Binutils/index.html | 2 +- .../Make/argument-1-T/Cond_branch/index.html | 2 +- .../Make/argument-1-T/index.html | 8 +- dev/ocaml/Branch_relaxation/Make/index.html | 2 +- dev/ocaml/Branch_relaxation/index.html | 2 +- dev/ocaml/Branch_relaxation_intf/index.html | 2 +- .../module-type-S/Cond_branch/index.html | 2 +- .../module-type-S/index.html | 8 +- dev/ocaml/Btype/For_copy/index.html | 2 +- dev/ocaml/Btype/TransientTypeMap/index.html | 4 +- dev/ocaml/Btype/TypeHash/index.html | 2 +- dev/ocaml/Btype/TypeMap/index.html | 4 +- dev/ocaml/Btype/TypePairs/index.html | 2 +- dev/ocaml/Btype/TypeSet/index.html | 4 +- dev/ocaml/Btype/index.html | 8 +- dev/ocaml/Build_export_info/index.html | 6 +- dev/ocaml/Build_path_prefix_map/index.html | 2 +- dev/ocaml/Builtin_attributes/index.html | 16 +- dev/ocaml/Bytegen/index.html | 4 +- dev/ocaml/Bytelibrarian/index.html | 2 +- dev/ocaml/Bytelink/index.html | 2 +- dev/ocaml/Bytepackager/index.html | 6 +- dev/ocaml/Bytesections/index.html | 2 +- dev/ocaml/CSE/class-cse/index.html | 2 +- dev/ocaml/CSE/index.html | 2 +- dev/ocaml/CSEgen/class-cse_generic/index.html | 2 +- dev/ocaml/CSEgen/index.html | 2 +- dev/ocaml/CamlinternalAtomic/index.html | 2 +- dev/ocaml/CamlinternalFormat/index.html | 6 +- dev/ocaml/CamlinternalFormatBasics/index.html | 4 +- dev/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 +- .../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 +- dev/ocaml/CamlinternalMenhirLib/index.html | 2 +- dev/ocaml/CamlinternalMod/index.html | 2 +- dev/ocaml/CamlinternalOO/index.html | 4 +- dev/ocaml/Ccomp/index.html | 10 +- dev/ocaml/Clambda/index.html | 4 +- dev/ocaml/Clambda_primitives/index.html | 2 +- dev/ocaml/Clflags/Compiler_pass/index.html | 2 +- dev/ocaml/Clflags/Float_arg_helper/index.html | 2 +- dev/ocaml/Clflags/Int_arg_helper/index.html | 2 +- dev/ocaml/Clflags/index.html | 2 +- dev/ocaml/Closure/index.html | 8 +- dev/ocaml/Closure_conversion/index.html | 10 +- .../Closure_conversion_aux/Env/index.html | 2 +- .../Function_decls/Function_decl/index.html | 18 +- .../Function_decls/index.html | 2 +- dev/ocaml/Closure_conversion_aux/index.html | 2 +- dev/ocaml/Closure_element/Map/index.html | 8 +- dev/ocaml/Closure_element/Set/index.html | 2 +- dev/ocaml/Closure_element/T/index.html | 2 +- dev/ocaml/Closure_element/Tbl/index.html | 2 +- dev/ocaml/Closure_element/index.html | 2 +- dev/ocaml/Closure_id/Map/index.html | 8 +- dev/ocaml/Closure_id/Set/index.html | 2 +- dev/ocaml/Closure_id/T/index.html | 2 +- dev/ocaml/Closure_id/Tbl/index.html | 2 +- dev/ocaml/Closure_id/index.html | 2 +- dev/ocaml/Closure_middle_end/index.html | 10 +- dev/ocaml/Closure_offsets/index.html | 2 +- dev/ocaml/Closure_origin/Map/index.html | 8 +- dev/ocaml/Closure_origin/Set/index.html | 2 +- dev/ocaml/Closure_origin/T/index.html | 2 +- dev/ocaml/Closure_origin/Tbl/index.html | 2 +- dev/ocaml/Closure_origin/index.html | 2 +- dev/ocaml/Cmi_format/index.html | 2 +- dev/ocaml/Cmm/index.html | 4 +- dev/ocaml/Cmm_helpers/index.html | 14 +- dev/ocaml/Cmm_invariants/index.html | 2 +- dev/ocaml/Cmmgen/index.html | 4 +- dev/ocaml/Cmmgen_state/index.html | 2 +- dev/ocaml/Cmo_format/index.html | 2 +- dev/ocaml/Cmt2annot/index.html | 8 +- dev/ocaml/Cmt_format/index.html | 4 +- dev/ocaml/Cmx_format/index.html | 2 +- dev/ocaml/Cmxs_format/index.html | 2 +- dev/ocaml/Coloring/index.html | 2 +- dev/ocaml/Comballoc/index.html | 2 +- dev/ocaml/Compenv/index.html | 16 +- dev/ocaml/Compilation_unit/Map/index.html | 8 +- dev/ocaml/Compilation_unit/Set/index.html | 2 +- dev/ocaml/Compilation_unit/T/index.html | 2 +- dev/ocaml/Compilation_unit/Tbl/index.html | 2 +- dev/ocaml/Compilation_unit/index.html | 2 +- dev/ocaml/Compile/index.html | 10 +- dev/ocaml/Compile_common/index.html | 16 +- dev/ocaml/Compilenv/index.html | 8 +- dev/ocaml/Compmisc/index.html | 2 +- dev/ocaml/Condition/index.html | 4 +- dev/ocaml/Config/index.html | 2 +- .../argument-1-Module_name/Map/index.html | 4 +- .../argument-1-Module_name/Set/index.html | 4 +- .../argument-1-Module_name/Tbl/index.html | 2 +- .../Make/argument-1-Module_name/index.html | 2 +- dev/ocaml/Consistbl/Make/index.html | 4 +- dev/ocaml/Consistbl/index.html | 2 +- dev/ocaml/Convert_primitives/index.html | 2 +- dev/ocaml/Ctype/index.html | 42 +- .../Dataflow/Backward/argument-1-D/index.html | 2 +- dev/ocaml/Dataflow/Backward/index.html | 10 +- dev/ocaml/Dataflow/index.html | 2 +- .../Dataflow/module-type-DOMAIN/index.html | 2 +- dev/ocaml/Datarepr/index.html | 8 +- dev/ocaml/Deadcode/index.html | 2 +- .../Debuginfo/Scoped_location/index.html | 2 +- dev/ocaml/Debuginfo/index.html | 2 +- dev/ocaml/Depend/index.html | 2 +- .../Left_variadic/argument-1-_/index.html | 2 +- .../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 +- dev/ocaml/Diffing/Define/Simple/index.html | 2 +- .../Diffing/Define/argument-1-D/index.html | 2 +- dev/ocaml/Diffing/Define/index.html | 4 +- .../Define/module-type-Parameters/index.html | 2 +- .../Diffing/Define/module-type-S/index.html | 2 +- dev/ocaml/Diffing/index.html | 2 +- dev/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 +- dev/ocaml/Diffing_with_keys/Define/index.html | 2 +- .../Define/module-type-Parameters/index.html | 2 +- dev/ocaml/Diffing_with_keys/index.html | 2 +- dev/ocaml/Dll/index.html | 2 +- dev/ocaml/Docstrings/WithMenhir/index.html | 4 +- dev/ocaml/Docstrings/index.html | 4 +- dev/ocaml/Domainstate/index.html | 2 +- dev/ocaml/Dynlink/index.html | 2 +- dev/ocaml/Effect_analysis/index.html | 2 +- dev/ocaml/Emit/index.html | 2 +- dev/ocaml/Emitaux/index.html | 14 +- dev/ocaml/Emitcode/index.html | 10 +- dev/ocaml/Emitenv/index.html | 2 +- dev/ocaml/Env/index.html | 156 ++++---- dev/ocaml/Envaux/index.html | 2 +- dev/ocaml/Errors/index.html | 2 +- dev/ocaml/Errortrace/Subtype/index.html | 8 +- dev/ocaml/Errortrace/index.html | 16 +- dev/ocaml/Event/index.html | 2 +- dev/ocaml/Export_id/Map/index.html | 8 +- dev/ocaml/Export_id/Set/index.html | 2 +- dev/ocaml/Export_id/T/index.html | 2 +- dev/ocaml/Export_id/Tbl/index.html | 2 +- dev/ocaml/Export_id/index.html | 2 +- dev/ocaml/Export_info/index.html | 54 +-- dev/ocaml/Export_info_for_pack/index.html | 8 +- dev/ocaml/Expunge/index.html | 2 +- dev/ocaml/Extract_projections/index.html | 10 +- dev/ocaml/Find_recursive_functions/index.html | 6 +- .../Constant_defining_value/Map/index.html | 8 +- .../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 +- .../Flambda/With_free_variables/index.html | 2 +- dev/ocaml/Flambda/index.html | 98 ++--- dev/ocaml/Flambda_invariants/index.html | 2 +- dev/ocaml/Flambda_iterators/index.html | 50 +-- dev/ocaml/Flambda_middle_end/index.html | 10 +- dev/ocaml/Flambda_to_clambda/index.html | 6 +- .../Flambda_utils/Switch_storer/index.html | 2 +- dev/ocaml/Flambda_utils/index.html | 30 +- dev/ocaml/Freshening/Project_var/index.html | 6 +- dev/ocaml/Freshening/index.html | 16 +- .../Genprintval/Make/argument-1-O/index.html | 2 +- .../Genprintval/Make/argument-2-_/index.html | 2 +- dev/ocaml/Genprintval/Make/index.html | 4 +- dev/ocaml/Genprintval/index.html | 2 +- .../module-type-EVALPATH/index.html | 2 +- .../Genprintval/module-type-OBJ/index.html | 2 +- .../Genprintval/module-type-S/index.html | 4 +- dev/ocaml/Id_types/Id/index.html | 2 +- .../Id_types/UnitId/argument-1-_/index.html | 2 +- .../argument-2-Compilation_unit/index.html | 2 +- dev/ocaml/Id_types/UnitId/index.html | 2 +- dev/ocaml/Id_types/index.html | 4 +- .../Id_types/module-type-BaseId/index.html | 2 +- dev/ocaml/Id_types/module-type-Id/index.html | 2 +- .../Compilation_unit/index.html | 2 +- .../Id_types/module-type-UnitId/index.html | 2 +- dev/ocaml/Ident/Map/index.html | 8 +- dev/ocaml/Ident/Set/index.html | 2 +- dev/ocaml/Ident/T/index.html | 2 +- dev/ocaml/Ident/Tbl/index.html | 2 +- dev/ocaml/Ident/index.html | 2 +- dev/ocaml/Identifiable/Make/Map/index.html | 8 +- dev/ocaml/Identifiable/Make/Set/index.html | 2 +- dev/ocaml/Identifiable/Make/T/index.html | 2 +- dev/ocaml/Identifiable/Make/Tbl/index.html | 2 +- .../Identifiable/Make/argument-1-T/index.html | 2 +- dev/ocaml/Identifiable/Make/index.html | 2 +- .../Identifiable/Pair/argument-1-A/index.html | 2 +- .../Identifiable/Pair/argument-2-B/index.html | 2 +- dev/ocaml/Identifiable/Pair/index.html | 2 +- dev/ocaml/Identifiable/index.html | 2 +- .../Identifiable/module-type-Map/T/index.html | 2 +- .../Identifiable/module-type-Map/index.html | 8 +- .../Identifiable/module-type-S/Map/index.html | 8 +- .../Identifiable/module-type-S/Set/index.html | 2 +- .../Identifiable/module-type-S/T/index.html | 2 +- .../Identifiable/module-type-S/Tbl/index.html | 2 +- .../Identifiable/module-type-S/index.html | 2 +- .../Identifiable/module-type-Set/T/index.html | 2 +- .../Identifiable/module-type-Set/index.html | 2 +- .../Identifiable/module-type-Tbl/T/index.html | 2 +- .../Identifiable/module-type-Tbl/index.html | 2 +- .../Identifiable/module-type-Thing/index.html | 2 +- dev/ocaml/Import_approx/index.html | 2 +- dev/ocaml/Includeclass/index.html | 6 +- dev/ocaml/Includecore/index.html | 16 +- dev/ocaml/Includemod/Error/index.html | 4 +- dev/ocaml/Includemod/FieldMap/index.html | 4 +- .../Functor_app_diff/Defs/index.html | 2 +- .../Includemod/Functor_app_diff/index.html | 8 +- .../Functor_inclusion_diff/Defs/index.html | 2 +- .../Functor_inclusion_diff/index.html | 4 +- dev/ocaml/Includemod/index.html | 34 +- dev/ocaml/Includemod_errorprinter/index.html | 2 +- dev/ocaml/Inconstant_idents/index.html | 8 +- .../index.html | 4 +- dev/ocaml/Inline_and_simplify/index.html | 22 +- .../Inline_and_simplify_aux/Env/index.html | 28 +- .../Inline_and_simplify_aux/Result/index.html | 4 +- dev/ocaml/Inline_and_simplify_aux/index.html | 30 +- dev/ocaml/Inlining_cost/Benefit/index.html | 2 +- dev/ocaml/Inlining_cost/Threshold/index.html | 2 +- .../Whether_sufficient_benefit/index.html | 32 +- dev/ocaml/Inlining_cost/index.html | 8 +- dev/ocaml/Inlining_decision/index.html | 30 +- dev/ocaml/Inlining_decision_intf/index.html | 38 +- .../Inlining_stats/Closure_stack/index.html | 8 +- dev/ocaml/Inlining_stats/index.html | 6 +- .../Inlining_stats_types/Decision/index.html | 2 +- .../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 +- dev/ocaml/Inlining_stats_types/index.html | 2 +- dev/ocaml/Inlining_transforms/index.html | 58 +-- dev/ocaml/Instruct/index.html | 2 +- .../index.html | 2 +- dev/ocaml/Interf/index.html | 2 +- dev/ocaml/Internal_variable_names/index.html | 2 +- dev/ocaml/Interval/index.html | 2 +- dev/ocaml/Invariant_params/index.html | 10 +- dev/ocaml/Lambda/index.html | 24 +- dev/ocaml/Lazy_backtrack/index.html | 4 +- dev/ocaml/Lexer/index.html | 4 +- dev/ocaml/Lift_code/index.html | 10 +- dev/ocaml/Lift_constants/index.html | 6 +- .../Lift_let_to_initialize_symbol/index.html | 6 +- dev/ocaml/Linear/index.html | 4 +- dev/ocaml/Linear_format/index.html | 2 +- dev/ocaml/Linearize/index.html | 2 +- dev/ocaml/Linkage_name/Map/index.html | 8 +- dev/ocaml/Linkage_name/Set/index.html | 2 +- dev/ocaml/Linkage_name/T/index.html | 2 +- dev/ocaml/Linkage_name/Tbl/index.html | 2 +- dev/ocaml/Linkage_name/index.html | 2 +- dev/ocaml/Linscan/index.html | 2 +- dev/ocaml/Liveness/index.html | 2 +- dev/ocaml/Load_path/Dir/index.html | 2 +- dev/ocaml/Load_path/index.html | 2 +- dev/ocaml/Local_store/index.html | 2 +- dev/ocaml/Location/index.html | 20 +- dev/ocaml/Longident/index.html | 4 +- dev/ocaml/Mach/index.html | 4 +- dev/ocaml/Main/index.html | 2 +- dev/ocaml/Main_args/Default/Main/index.html | 2 +- .../Main_args/Default/Odoc_args/index.html | 2 +- .../Main_args/Default/Optmain/index.html | 2 +- .../Main_args/Default/Opttopmain/index.html | 2 +- .../Main_args/Default/Topmain/index.html | 2 +- dev/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 +- dev/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 +- dev/ocaml/Maindriver/index.html | 2 +- dev/ocaml/Makedepend/index.html | 2 +- dev/ocaml/Matching/index.html | 14 +- dev/ocaml/Meta/index.html | 4 +- dev/ocaml/Misc/Color/index.html | 2 +- dev/ocaml/Misc/Error_style/index.html | 2 +- .../Misc/Int_literal_converter/index.html | 2 +- dev/ocaml/Misc/LongString/index.html | 2 +- dev/ocaml/Misc/Magic_number/index.html | 6 +- dev/ocaml/Misc/Stdlib/Array/index.html | 2 +- dev/ocaml/Misc/Stdlib/List/index.html | 10 +- dev/ocaml/Misc/Stdlib/Option/index.html | 4 +- dev/ocaml/Misc/Stdlib/String/Map/index.html | 4 +- dev/ocaml/Misc/Stdlib/String/Set/index.html | 4 +- dev/ocaml/Misc/Stdlib/String/Tbl/index.html | 2 +- dev/ocaml/Misc/Stdlib/String/index.html | 4 +- dev/ocaml/Misc/Stdlib/index.html | 2 +- dev/ocaml/Misc/index.html | 18 +- dev/ocaml/Mtype/index.html | 12 +- dev/ocaml/Mutable_variable/Map/index.html | 8 +- dev/ocaml/Mutable_variable/Set/index.html | 2 +- dev/ocaml/Mutable_variable/T/index.html | 2 +- dev/ocaml/Mutable_variable/Tbl/index.html | 2 +- dev/ocaml/Mutable_variable/index.html | 8 +- dev/ocaml/Mutex/index.html | 4 +- dev/ocaml/Numbers/Float/Map/index.html | 8 +- dev/ocaml/Numbers/Float/Set/index.html | 2 +- dev/ocaml/Numbers/Float/T/index.html | 2 +- dev/ocaml/Numbers/Float/Tbl/index.html | 2 +- dev/ocaml/Numbers/Float/index.html | 2 +- dev/ocaml/Numbers/Int/Map/index.html | 8 +- dev/ocaml/Numbers/Int/Set/index.html | 2 +- dev/ocaml/Numbers/Int/T/index.html | 2 +- dev/ocaml/Numbers/Int/Tbl/index.html | 2 +- dev/ocaml/Numbers/Int/index.html | 2 +- dev/ocaml/Numbers/Int16/index.html | 2 +- dev/ocaml/Numbers/Int8/index.html | 2 +- dev/ocaml/Numbers/index.html | 2 +- dev/ocaml/Odoc/index.html | 2 +- dev/ocaml/Odoc_analyse/index.html | 6 +- dev/ocaml/Odoc_args/index.html | 2 +- .../Odoc_ast/Analyser/argument-1-_/index.html | 4 +- dev/ocaml/Odoc_ast/Analyser/index.html | 4 +- .../Odoc_ast/Typedtree_search/index.html | 4 +- dev/ocaml/Odoc_ast/index.html | 2 +- dev/ocaml/Odoc_class/index.html | 10 +- .../Basic_info_retriever/index.html | 4 +- dev/ocaml/Odoc_comments/index.html | 4 +- .../module-type-Texter/index.html | 2 +- dev/ocaml/Odoc_comments_global/index.html | 2 +- dev/ocaml/Odoc_config/index.html | 2 +- dev/ocaml/Odoc_control/index.html | 2 +- dev/ocaml/Odoc_cross/index.html | 4 +- dev/ocaml/Odoc_dag2html/index.html | 4 +- dev/ocaml/Odoc_dep/Dep/index.html | 2 +- dev/ocaml/Odoc_dep/index.html | 6 +- .../Odoc_dot/Generator/class-dot/index.html | 4 +- dev/ocaml/Odoc_dot/Generator/index.html | 2 +- dev/ocaml/Odoc_dot/index.html | 2 +- .../class-dot/index.html | 4 +- .../module-type-Dot_generator/index.html | 2 +- dev/ocaml/Odoc_env/index.html | 2 +- dev/ocaml/Odoc_exception/index.html | 2 +- dev/ocaml/Odoc_extension/index.html | 2 +- .../Base_generator/class-generator/index.html | 2 +- dev/ocaml/Odoc_gen/Base_generator/index.html | 2 +- .../class-type-doc_generator/index.html | 2 +- dev/ocaml/Odoc_gen/index.html | 4 +- .../class-generator/index.html | 2 +- .../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 | 60 +-- .../argument-1-_/index.html | 2 +- .../class-html/index.html | 60 +-- .../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 +- dev/ocaml/Odoc_global/index.html | 2 +- .../Odoc_html/Generator/class-html/index.html | 60 +-- dev/ocaml/Odoc_html/Generator/index.html | 2 +- dev/ocaml/Odoc_html/Naming/index.html | 4 +- dev/ocaml/Odoc_html/class-info/index.html | 6 +- .../Odoc_html/class-ocaml_code/index.html | 2 +- dev/ocaml/Odoc_html/class-text/index.html | 6 +- dev/ocaml/Odoc_html/index.html | 2 +- .../class-html/index.html | 60 +-- .../module-type-Html_generator/index.html | 2 +- dev/ocaml/Odoc_info/Class/index.html | 6 +- dev/ocaml/Odoc_info/Dep/index.html | 6 +- dev/ocaml/Odoc_info/Exception/index.html | 2 +- dev/ocaml/Odoc_info/Extension/index.html | 2 +- dev/ocaml/Odoc_info/Global/index.html | 2 +- dev/ocaml/Odoc_info/Module/index.html | 30 +- dev/ocaml/Odoc_info/Name/index.html | 2 +- dev/ocaml/Odoc_info/Parameter/index.html | 2 +- .../Odoc_info/Scan/class-scanner/index.html | 2 +- dev/ocaml/Odoc_info/Scan/index.html | 2 +- dev/ocaml/Odoc_info/Search/index.html | 2 +- dev/ocaml/Odoc_info/Type/index.html | 2 +- dev/ocaml/Odoc_info/Value/index.html | 2 +- dev/ocaml/Odoc_info/index.html | 22 +- dev/ocaml/Odoc_inherit/index.html | 2 +- .../Generator/class-latex/index.html | 28 +- dev/ocaml/Odoc_latex/Generator/index.html | 2 +- dev/ocaml/Odoc_latex/class-info/index.html | 6 +- dev/ocaml/Odoc_latex/class-text/index.html | 8 +- dev/ocaml/Odoc_latex/index.html | 4 +- .../class-latex/index.html | 28 +- .../module-type-Latex_generator/index.html | 2 +- dev/ocaml/Odoc_latex_style/index.html | 2 +- dev/ocaml/Odoc_lexer/index.html | 4 +- .../Odoc_man/Generator/class-man/index.html | 10 +- dev/ocaml/Odoc_man/Generator/index.html | 2 +- dev/ocaml/Odoc_man/class-info/index.html | 2 +- dev/ocaml/Odoc_man/index.html | 2 +- .../class-man/index.html | 10 +- .../module-type-Man_generator/index.html | 2 +- dev/ocaml/Odoc_merge/index.html | 4 +- dev/ocaml/Odoc_messages/index.html | 2 +- dev/ocaml/Odoc_misc/index.html | 4 +- dev/ocaml/Odoc_module/index.html | 50 +-- dev/ocaml/Odoc_name/Map/index.html | 4 +- dev/ocaml/Odoc_name/index.html | 2 +- dev/ocaml/Odoc_ocamlhtml/index.html | 2 +- dev/ocaml/Odoc_parameter/index.html | 4 +- dev/ocaml/Odoc_parser/index.html | 4 +- dev/ocaml/Odoc_print/index.html | 8 +- dev/ocaml/Odoc_scan/class-scanner/index.html | 4 +- dev/ocaml/Odoc_scan/index.html | 2 +- dev/ocaml/Odoc_search/P_name/index.html | 4 +- .../Search/argument-1-P/index.html | 2 +- dev/ocaml/Odoc_search/Search/index.html | 4 +- .../Odoc_search/Search_by_name/index.html | 4 +- dev/ocaml/Odoc_search/index.html | 4 +- .../module-type-Predicates/index.html | 2 +- dev/ocaml/Odoc_see_lexer/index.html | 2 +- .../Odoc_sig/Analyser/argument-1-_/index.html | 4 +- dev/ocaml/Odoc_sig/Analyser/index.html | 6 +- .../Odoc_sig/Signature_search/index.html | 4 +- dev/ocaml/Odoc_sig/index.html | 2 +- .../module-type-Info_retriever/index.html | 4 +- dev/ocaml/Odoc_str/index.html | 4 +- .../argument-1-G/class-generator/index.html | 2 +- .../Generator/argument-1-G/index.html | 2 +- .../Generator/class-generator/index.html | 2 +- .../Generator/class-string_gen/index.html | 4 +- dev/ocaml/Odoc_test/Generator/index.html | 2 +- dev/ocaml/Odoc_test/index.html | 4 +- .../Odoc_texi/Generator/class-texi/index.html | 22 +- dev/ocaml/Odoc_texi/Generator/index.html | 2 +- dev/ocaml/Odoc_texi/Texi/index.html | 4 +- dev/ocaml/Odoc_texi/class-text/index.html | 8 +- dev/ocaml/Odoc_texi/index.html | 4 +- .../class-texi/index.html | 22 +- .../module-type-Texi_generator/index.html | 2 +- dev/ocaml/Odoc_text/Texter/index.html | 2 +- dev/ocaml/Odoc_text/index.html | 2 +- dev/ocaml/Odoc_text_lexer/index.html | 4 +- dev/ocaml/Odoc_text_parser/index.html | 4 +- dev/ocaml/Odoc_to_text/class-info/index.html | 6 +- .../Odoc_to_text/class-to_text/index.html | 16 +- dev/ocaml/Odoc_to_text/index.html | 2 +- dev/ocaml/Odoc_type/index.html | 2 +- dev/ocaml/Odoc_types/index.html | 2 +- dev/ocaml/Odoc_value/index.html | 4 +- dev/ocaml/Opcodes/index.html | 2 +- dev/ocaml/Oprint/index.html | 4 +- dev/ocaml/Optcompile/index.html | 12 +- dev/ocaml/Opterrors/index.html | 2 +- dev/ocaml/Optmain/index.html | 2 +- dev/ocaml/Optmaindriver/index.html | 2 +- dev/ocaml/Outcometree/index.html | 4 +- dev/ocaml/Parameter/List/index.html | 2 +- dev/ocaml/Parameter/Map/index.html | 8 +- dev/ocaml/Parameter/Set/index.html | 2 +- dev/ocaml/Parameter/T/index.html | 2 +- dev/ocaml/Parameter/Tbl/index.html | 2 +- dev/ocaml/Parameter/index.html | 2 +- .../Parmatch/Compat/argument-1-_/index.html | 4 +- dev/ocaml/Parmatch/Compat/index.html | 2 +- dev/ocaml/Parmatch/index.html | 4 +- dev/ocaml/Parse/index.html | 2 +- dev/ocaml/Parser/Incremental/index.html | 4 +- dev/ocaml/Parser/MenhirInterpreter/index.html | 8 +- dev/ocaml/Parser/index.html | 4 +- dev/ocaml/Parsetree/index.html | 16 +- dev/ocaml/Pass_wrapper/index.html | 16 +- dev/ocaml/Path/Map/index.html | 4 +- dev/ocaml/Path/Set/index.html | 4 +- dev/ocaml/Path/index.html | 2 +- dev/ocaml/Patterns/General/index.html | 2 +- dev/ocaml/Patterns/Half_simple/index.html | 2 +- dev/ocaml/Patterns/Head/index.html | 2 +- dev/ocaml/Patterns/Non_empty_row/index.html | 2 +- dev/ocaml/Patterns/Simple/index.html | 4 +- dev/ocaml/Patterns/index.html | 2 +- dev/ocaml/Persistent_env/Consistbl/index.html | 4 +- .../Persistent_signature/index.html | 2 +- dev/ocaml/Persistent_env/index.html | 8 +- dev/ocaml/Polling/index.html | 10 +- dev/ocaml/Pparse/index.html | 18 +- dev/ocaml/Pprintast/index.html | 4 +- dev/ocaml/Predef/index.html | 4 +- dev/ocaml/Primitive/index.html | 18 +- dev/ocaml/Printast/index.html | 4 +- dev/ocaml/Printclambda/index.html | 4 +- dev/ocaml/Printclambda_primitives/index.html | 2 +- dev/ocaml/Printcmm/index.html | 4 +- dev/ocaml/Printinstr/index.html | 2 +- dev/ocaml/Printlambda/index.html | 4 +- dev/ocaml/Printlinear/index.html | 2 +- dev/ocaml/Printmach/index.html | 4 +- dev/ocaml/Printpat/index.html | 4 +- dev/ocaml/Printtyp/Conflicts/index.html | 4 +- dev/ocaml/Printtyp/Naming_context/index.html | 2 +- dev/ocaml/Printtyp/Out_name/index.html | 2 +- dev/ocaml/Printtyp/Subtype/index.html | 4 +- dev/ocaml/Printtyp/index.html | 10 +- dev/ocaml/Printtyped/index.html | 4 +- dev/ocaml/Proc/index.html | 2 +- dev/ocaml/Profile/index.html | 2 +- dev/ocaml/Profiling/index.html | 2 +- dev/ocaml/Projection/Map/index.html | 8 +- dev/ocaml/Projection/Set/index.html | 2 +- dev/ocaml/Projection/T/index.html | 2 +- dev/ocaml/Projection/Tbl/index.html | 2 +- dev/ocaml/Projection/index.html | 4 +- dev/ocaml/Rec_check/index.html | 4 +- dev/ocaml/Ref_to_variables/index.html | 2 +- dev/ocaml/Reg/Map/index.html | 4 +- dev/ocaml/Reg/Raw_name/index.html | 2 +- dev/ocaml/Reg/Set/index.html | 4 +- dev/ocaml/Reg/index.html | 2 +- dev/ocaml/Reload/index.html | 2 +- .../Reloadgen/class-reload_generic/index.html | 4 +- dev/ocaml/Reloadgen/index.html | 2 +- .../Remove_free_vars_equal_to_args/index.html | 6 +- dev/ocaml/Remove_unused_arguments/index.html | 8 +- .../Remove_unused_closure_vars/index.html | 6 +- .../index.html | 2 +- dev/ocaml/Runtimedef/index.html | 2 +- .../class-scheduler_generic/index.html | 2 +- dev/ocaml/Schedgen/index.html | 2 +- dev/ocaml/Scheduling/index.html | 2 +- dev/ocaml/Selectgen/Coeffect/index.html | 2 +- dev/ocaml/Selectgen/Effect/index.html | 2 +- .../Selectgen/Effect_and_coeffect/index.html | 2 +- .../class-selector_generic/index.html | 6 +- dev/ocaml/Selectgen/index.html | 6 +- dev/ocaml/Selection/index.html | 6 +- dev/ocaml/Semantics_of_primitives/index.html | 2 +- dev/ocaml/Semaphore/Binary/index.html | 2 +- dev/ocaml/Semaphore/Counting/index.html | 2 +- dev/ocaml/Semaphore/index.html | 2 +- dev/ocaml/Set_of_closures_id/Map/index.html | 8 +- dev/ocaml/Set_of_closures_id/Set/index.html | 2 +- dev/ocaml/Set_of_closures_id/T/index.html | 2 +- dev/ocaml/Set_of_closures_id/Tbl/index.html | 2 +- dev/ocaml/Set_of_closures_id/index.html | 2 +- .../Set_of_closures_origin/Map/index.html | 8 +- .../Set_of_closures_origin/Set/index.html | 2 +- dev/ocaml/Set_of_closures_origin/T/index.html | 2 +- .../Set_of_closures_origin/Tbl/index.html | 2 +- dev/ocaml/Set_of_closures_origin/index.html | 2 +- dev/ocaml/Shape/Item/Map/index.html | 4 +- dev/ocaml/Shape/Item/index.html | 2 +- .../Make_reduce/argument-1-Context/index.html | 2 +- dev/ocaml/Shape/Make_reduce/index.html | 2 +- dev/ocaml/Shape/Map/index.html | 2 +- dev/ocaml/Shape/Sig_component_kind/index.html | 2 +- dev/ocaml/Shape/Uid/Map/index.html | 8 +- dev/ocaml/Shape/Uid/Set/index.html | 2 +- dev/ocaml/Shape/Uid/T/index.html | 2 +- dev/ocaml/Shape/Uid/Tbl/index.html | 2 +- dev/ocaml/Shape/Uid/index.html | 2 +- dev/ocaml/Shape/index.html | 8 +- dev/ocaml/Share_constants/index.html | 2 +- dev/ocaml/Signature_group/index.html | 6 +- dev/ocaml/Simple_value_approx/index.html | 46 +-- dev/ocaml/Simplif/index.html | 18 +- .../Simplify_boxed_int32/index.html | 6 +- .../Simplify_boxed_int64/index.html | 6 +- .../Simplify_boxed_nativeint/index.html | 6 +- .../Simplify_boxed_integer_ops/index.html | 4 +- .../index.html | 2 +- .../module-type-S/index.html | 6 +- dev/ocaml/Simplify_common/index.html | 4 +- dev/ocaml/Simplify_primitives/index.html | 6 +- dev/ocaml/Spill/index.html | 2 +- dev/ocaml/Split/index.html | 2 +- dev/ocaml/Static_exception/Map/index.html | 8 +- dev/ocaml/Static_exception/Set/index.html | 2 +- dev/ocaml/Static_exception/T/index.html | 2 +- dev/ocaml/Static_exception/Tbl/index.html | 2 +- dev/ocaml/Static_exception/index.html | 2 +- dev/ocaml/Std_exit/index.html | 2 +- dev/ocaml/Stdlib/Arg/index.html | 8 +- dev/ocaml/Stdlib/Array/index.html | 2 +- dev/ocaml/Stdlib/ArrayLabels/index.html | 20 +- dev/ocaml/Stdlib/Atomic/index.html | 2 +- dev/ocaml/Stdlib/Bigarray/Array0/index.html | 2 +- dev/ocaml/Stdlib/Bigarray/Array1/index.html | 2 +- dev/ocaml/Stdlib/Bigarray/Array2/index.html | 4 +- dev/ocaml/Stdlib/Bigarray/Array3/index.html | 4 +- dev/ocaml/Stdlib/Bigarray/Genarray/index.html | 8 +- dev/ocaml/Stdlib/Bigarray/index.html | 6 +- dev/ocaml/Stdlib/Bool/index.html | 2 +- dev/ocaml/Stdlib/Buffer/index.html | 4 +- dev/ocaml/Stdlib/Bytes/index.html | 8 +- dev/ocaml/Stdlib/BytesLabels/index.html | 34 +- dev/ocaml/Stdlib/Callback/index.html | 2 +- dev/ocaml/Stdlib/Char/index.html | 2 +- dev/ocaml/Stdlib/Complex/index.html | 2 +- dev/ocaml/Stdlib/Digest/index.html | 2 +- dev/ocaml/Stdlib/Either/index.html | 18 +- .../MakeSeeded/argument-1-H/index.html | 2 +- .../GenHashTable/MakeSeeded/index.html | 2 +- .../Stdlib/Ephemeron/GenHashTable/index.html | 2 +- .../Stdlib/Ephemeron/K1/Bucket/index.html | 2 +- .../Ephemeron/K1/Make/argument-1-H/index.html | 2 +- dev/ocaml/Stdlib/Ephemeron/K1/Make/index.html | 2 +- .../K1/MakeSeeded/argument-1-H/index.html | 2 +- .../Stdlib/Ephemeron/K1/MakeSeeded/index.html | 2 +- dev/ocaml/Stdlib/Ephemeron/K1/index.html | 2 +- .../Stdlib/Ephemeron/K2/Bucket/index.html | 2 +- .../K2/Make/argument-1-H1/index.html | 2 +- .../K2/Make/argument-2-H2/index.html | 2 +- dev/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 +- dev/ocaml/Stdlib/Ephemeron/K2/index.html | 4 +- .../Stdlib/Ephemeron/Kn/Bucket/index.html | 2 +- .../Ephemeron/Kn/Make/argument-1-H/index.html | 2 +- dev/ocaml/Stdlib/Ephemeron/Kn/Make/index.html | 2 +- .../Kn/MakeSeeded/argument-1-H/index.html | 2 +- .../Stdlib/Ephemeron/Kn/MakeSeeded/index.html | 2 +- dev/ocaml/Stdlib/Ephemeron/Kn/index.html | 4 +- dev/ocaml/Stdlib/Ephemeron/index.html | 2 +- .../Stdlib/Ephemeron/module-type-S/index.html | 2 +- .../Ephemeron/module-type-SeededS/index.html | 2 +- dev/ocaml/Stdlib/Filename/index.html | 18 +- dev/ocaml/Stdlib/Float/Array/index.html | 2 +- dev/ocaml/Stdlib/Float/ArrayLabels/index.html | 2 +- dev/ocaml/Stdlib/Float/index.html | 2 +- dev/ocaml/Stdlib/Format/index.html | 42 +- dev/ocaml/Stdlib/Fun/index.html | 2 +- dev/ocaml/Stdlib/Gc/Memprof/index.html | 8 +- dev/ocaml/Stdlib/Gc/index.html | 2 +- dev/ocaml/Stdlib/Genlex/index.html | 4 +- .../Hashtbl/Make/argument-1-H/index.html | 2 +- dev/ocaml/Stdlib/Hashtbl/Make/index.html | 2 +- .../MakeSeeded/argument-1-H/index.html | 2 +- .../Stdlib/Hashtbl/MakeSeeded/index.html | 2 +- dev/ocaml/Stdlib/Hashtbl/index.html | 4 +- .../Hashtbl/module-type-HashedType/index.html | 2 +- .../Stdlib/Hashtbl/module-type-S/index.html | 2 +- .../module-type-SeededHashedType/index.html | 2 +- .../Hashtbl/module-type-SeededS/index.html | 2 +- dev/ocaml/Stdlib/In_channel/index.html | 4 +- dev/ocaml/Stdlib/Int/index.html | 2 +- dev/ocaml/Stdlib/Int32/index.html | 4 +- dev/ocaml/Stdlib/Int64/index.html | 4 +- dev/ocaml/Stdlib/LargeFile/index.html | 2 +- dev/ocaml/Stdlib/Lazy/index.html | 4 +- dev/ocaml/Stdlib/Lexing/index.html | 2 +- dev/ocaml/Stdlib/List/index.html | 2 +- dev/ocaml/Stdlib/ListLabels/index.html | 20 +- .../Stdlib/Map/Make/argument-1-Ord/index.html | 2 +- dev/ocaml/Stdlib/Map/Make/index.html | 4 +- dev/ocaml/Stdlib/Map/index.html | 4 +- .../Map/module-type-OrderedType/index.html | 2 +- dev/ocaml/Stdlib/Map/module-type-S/index.html | 4 +- dev/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 +- .../Stdlib/MoreLabels/Hashtbl/index.html | 8 +- .../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 +- .../Stdlib/MoreLabels/Map/Make/index.html | 8 +- dev/ocaml/Stdlib/MoreLabels/Map/index.html | 4 +- .../Map/module-type-OrderedType/index.html | 2 +- .../MoreLabels/Map/module-type-S/index.html | 8 +- .../Set/Make/argument-1-Ord/index.html | 2 +- .../Stdlib/MoreLabels/Set/Make/index.html | 4 +- dev/ocaml/Stdlib/MoreLabels/Set/index.html | 4 +- .../Set/module-type-OrderedType/index.html | 2 +- .../MoreLabels/Set/module-type-S/index.html | 4 +- dev/ocaml/Stdlib/MoreLabels/index.html | 4 +- dev/ocaml/Stdlib/Nativeint/index.html | 6 +- dev/ocaml/Stdlib/Obj/Closure/index.html | 2 +- dev/ocaml/Stdlib/Obj/Ephemeron/index.html | 2 +- .../Obj/Extension_constructor/index.html | 2 +- dev/ocaml/Stdlib/Obj/index.html | 2 +- dev/ocaml/Stdlib/Oo/index.html | 2 +- dev/ocaml/Stdlib/Option/index.html | 2 +- dev/ocaml/Stdlib/Out_channel/index.html | 4 +- dev/ocaml/Stdlib/Parsing/index.html | 2 +- dev/ocaml/Stdlib/Pervasives/index.html | 4 +- dev/ocaml/Stdlib/Printexc/Slot/index.html | 2 +- dev/ocaml/Stdlib/Printexc/index.html | 4 +- dev/ocaml/Stdlib/Printf/index.html | 4 +- dev/ocaml/Stdlib/Queue/index.html | 2 +- dev/ocaml/Stdlib/Random/State/index.html | 2 +- dev/ocaml/Stdlib/Random/index.html | 2 +- dev/ocaml/Stdlib/Result/index.html | 12 +- dev/ocaml/Stdlib/Scanf/Scanning/index.html | 2 +- dev/ocaml/Stdlib/Scanf/index.html | 8 +- dev/ocaml/Stdlib/Seq/index.html | 2 +- .../Stdlib/Set/Make/argument-1-Ord/index.html | 2 +- dev/ocaml/Stdlib/Set/Make/index.html | 4 +- dev/ocaml/Stdlib/Set/index.html | 4 +- .../Set/module-type-OrderedType/index.html | 2 +- dev/ocaml/Stdlib/Set/module-type-S/index.html | 4 +- dev/ocaml/Stdlib/Stack/index.html | 2 +- dev/ocaml/Stdlib/StdLabels/index.html | 4 +- dev/ocaml/Stdlib/Stream/index.html | 2 +- dev/ocaml/Stdlib/String/index.html | 6 +- dev/ocaml/Stdlib/StringLabels/index.html | 18 +- .../Make/argument-1-Immediate/index.html | 2 +- .../Make/argument-2-Non_immediate/index.html | 2 +- .../Stdlib/Sys/Immediate64/Make/index.html | 2 +- dev/ocaml/Stdlib/Sys/Immediate64/index.html | 4 +- .../module-type-Immediate/index.html | 2 +- .../module-type-Non_immediate/index.html | 2 +- dev/ocaml/Stdlib/Sys/index.html | 4 +- dev/ocaml/Stdlib/Uchar/index.html | 2 +- dev/ocaml/Stdlib/Unit/index.html | 2 +- .../Stdlib/Weak/Make/argument-1-H/index.html | 2 +- dev/ocaml/Stdlib/Weak/Make/index.html | 2 +- dev/ocaml/Stdlib/Weak/index.html | 2 +- .../Stdlib/Weak/module-type-S/index.html | 2 +- dev/ocaml/Stdlib/index.html | 4 +- dev/ocaml/Stdlib__Arg/index.html | 2 - dev/ocaml/Stdlib__Array/index.html | 2 - dev/ocaml/Stdlib__ArrayLabels/index.html | 2 - dev/ocaml/Stdlib__Atomic/index.html | 2 - dev/ocaml/Stdlib__Bigarray/index.html | 2 - dev/ocaml/Stdlib__Bool/index.html | 2 - dev/ocaml/Stdlib__Buffer/index.html | 2 - dev/ocaml/Stdlib__Bytes/index.html | 2 - dev/ocaml/Stdlib__BytesLabels/index.html | 2 - dev/ocaml/Stdlib__Callback/index.html | 2 - dev/ocaml/Stdlib__Char/index.html | 2 - dev/ocaml/Stdlib__Complex/index.html | 2 - dev/ocaml/Stdlib__Digest/index.html | 2 - dev/ocaml/Stdlib__Either/index.html | 2 - dev/ocaml/Stdlib__Ephemeron/index.html | 2 - dev/ocaml/Stdlib__Filename/index.html | 2 - dev/ocaml/Stdlib__Float/index.html | 2 - dev/ocaml/Stdlib__Format/index.html | 2 - dev/ocaml/Stdlib__Fun/index.html | 2 - dev/ocaml/Stdlib__Gc/index.html | 2 - dev/ocaml/Stdlib__Genlex/index.html | 2 - dev/ocaml/Stdlib__Hashtbl/index.html | 2 - dev/ocaml/Stdlib__In_channel/index.html | 2 - dev/ocaml/Stdlib__Int/index.html | 2 - dev/ocaml/Stdlib__Int32/index.html | 2 - dev/ocaml/Stdlib__Int64/index.html | 2 - dev/ocaml/Stdlib__Lazy/index.html | 2 - dev/ocaml/Stdlib__Lexing/index.html | 2 - dev/ocaml/Stdlib__List/index.html | 2 - dev/ocaml/Stdlib__ListLabels/index.html | 2 - dev/ocaml/Stdlib__Map/index.html | 2 - dev/ocaml/Stdlib__Marshal/index.html | 2 - dev/ocaml/Stdlib__MoreLabels/index.html | 2 - dev/ocaml/Stdlib__Nativeint/index.html | 2 - dev/ocaml/Stdlib__Obj/index.html | 2 - dev/ocaml/Stdlib__Oo/index.html | 2 - dev/ocaml/Stdlib__Option/index.html | 2 - dev/ocaml/Stdlib__Out_channel/index.html | 2 - dev/ocaml/Stdlib__Parsing/index.html | 2 - dev/ocaml/Stdlib__Pervasives/index.html | 2 - dev/ocaml/Stdlib__Printexc/index.html | 2 - dev/ocaml/Stdlib__Printf/index.html | 2 - dev/ocaml/Stdlib__Queue/index.html | 2 - dev/ocaml/Stdlib__Random/index.html | 2 - dev/ocaml/Stdlib__Result/index.html | 2 - dev/ocaml/Stdlib__Scanf/index.html | 2 - dev/ocaml/Stdlib__Seq/index.html | 2 - dev/ocaml/Stdlib__Set/index.html | 2 - dev/ocaml/Stdlib__Stack/index.html | 2 - dev/ocaml/Stdlib__StdLabels/index.html | 2 - dev/ocaml/Stdlib__Stream/index.html | 2 - dev/ocaml/Stdlib__String/index.html | 2 - dev/ocaml/Stdlib__StringLabels/index.html | 2 - dev/ocaml/Stdlib__Sys/index.html | 2 - dev/ocaml/Stdlib__Uchar/index.html | 2 - dev/ocaml/Stdlib__Unit/index.html | 2 - dev/ocaml/Stdlib__Weak/index.html | 2 - dev/ocaml/Str/index.html | 4 +- .../Strmatch/Make/argument-1-_/index.html | 4 +- dev/ocaml/Strmatch/Make/index.html | 4 +- dev/ocaml/Strmatch/index.html | 2 +- dev/ocaml/Strmatch/module-type-I/index.html | 4 +- .../Make/argument-1-Id/Map/index.html | 8 +- .../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 | 8 +- .../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 +- dev/ocaml/Stypes/index.html | 4 +- dev/ocaml/Subst/Lazy/index.html | 4 +- dev/ocaml/Subst/index.html | 8 +- .../Switch/CtxStore/argument-1-A/index.html | 2 +- dev/ocaml/Switch/CtxStore/index.html | 2 +- .../Switch/Make/argument-1-Arg/index.html | 2 +- dev/ocaml/Switch/Make/index.html | 4 +- .../Switch/Store/argument-1-A/index.html | 2 +- dev/ocaml/Switch/Store/index.html | 2 +- dev/ocaml/Switch/index.html | 2 +- .../Switch/module-type-CtxStored/index.html | 2 +- dev/ocaml/Switch/module-type-S/index.html | 2 +- .../Switch/module-type-Stored/index.html | 2 +- dev/ocaml/Symbol/Map/index.html | 8 +- dev/ocaml/Symbol/Set/index.html | 2 +- dev/ocaml/Symbol/T/index.html | 2 +- dev/ocaml/Symbol/Tbl/index.html | 2 +- dev/ocaml/Symbol/index.html | 2 +- dev/ocaml/Symtable/index.html | 4 +- dev/ocaml/Syntaxerr/index.html | 2 +- dev/ocaml/Tag/Map/index.html | 8 +- dev/ocaml/Tag/Set/index.html | 2 +- dev/ocaml/Tag/T/index.html | 2 +- dev/ocaml/Tag/Tbl/index.html | 2 +- dev/ocaml/Tag/index.html | 2 +- dev/ocaml/Targetint/index.html | 4 +- dev/ocaml/Tast_iterator/index.html | 4 +- dev/ocaml/Tast_mapper/index.html | 4 +- dev/ocaml/Terminfo/index.html | 2 +- dev/ocaml/Thread/index.html | 4 +- dev/ocaml/ThreadUnix/index.html | 10 +- dev/ocaml/Tmc/index.html | 4 +- dev/ocaml/Topcommon/index.html | 4 +- dev/ocaml/Topdirs/index.html | 2 +- dev/ocaml/Topeval/index.html | 2 +- dev/ocaml/Tophooks/index.html | 4 +- dev/ocaml/Toploop/index.html | 4 +- dev/ocaml/Topmain/index.html | 2 +- dev/ocaml/Topstart/index.html | 2 +- dev/ocaml/Trace/index.html | 4 +- dev/ocaml/Translattribute/index.html | 4 +- dev/ocaml/Translclass/index.html | 6 +- dev/ocaml/Translcore/index.html | 26 +- dev/ocaml/Translmod/index.html | 4 +- dev/ocaml/Translobj/index.html | 4 +- dev/ocaml/Translprim/index.html | 4 +- .../Traverse_for_exported_symbols/index.html | 16 +- dev/ocaml/Type_immediacy/Violation/index.html | 2 +- dev/ocaml/Type_immediacy/index.html | 2 +- dev/ocaml/Typeclass/index.html | 6 +- dev/ocaml/Typecore/Datatype_kind/index.html | 2 +- dev/ocaml/Typecore/index.html | 16 +- dev/ocaml/Typedecl/index.html | 14 +- dev/ocaml/Typedecl_immediacy/index.html | 4 +- dev/ocaml/Typedecl_properties/index.html | 4 +- dev/ocaml/Typedecl_separability/index.html | 4 +- dev/ocaml/Typedecl_unboxed/index.html | 4 +- dev/ocaml/Typedecl_variance/index.html | 6 +- dev/ocaml/Typedtree/index.html | 4 +- .../Typemod/Sig_component_kind/index.html | 2 +- dev/ocaml/Typemod/Signature_names/index.html | 2 +- dev/ocaml/Typemod/index.html | 12 +- dev/ocaml/Typeopt/index.html | 4 +- dev/ocaml/Types/MethSet/index.html | 4 +- dev/ocaml/Types/Meths/index.html | 4 +- dev/ocaml/Types/Separability/index.html | 2 +- dev/ocaml/Types/TransientTypeOps/index.html | 2 +- dev/ocaml/Types/Transient_expr/index.html | 2 +- dev/ocaml/Types/VarSet/index.html | 4 +- dev/ocaml/Types/Variance/index.html | 2 +- dev/ocaml/Types/Vars/index.html | 4 +- dev/ocaml/Types/index.html | 30 +- dev/ocaml/Typetexp/index.html | 6 +- dev/ocaml/Un_anf/index.html | 8 +- dev/ocaml/Unbox_closures/index.html | 18 +- .../Unbox_free_vars_of_closures/index.html | 8 +- dev/ocaml/Unbox_specialised_args/index.html | 18 +- dev/ocaml/Unix/LargeFile/index.html | 2 +- dev/ocaml/Unix/index.html | 20 +- dev/ocaml/UnixLabels/LargeFile/index.html | 2 +- dev/ocaml/UnixLabels/index.html | 134 +++---- dev/ocaml/Untypeast/index.html | 12 +- dev/ocaml/Var_within_closure/Map/index.html | 8 +- dev/ocaml/Var_within_closure/Set/index.html | 2 +- dev/ocaml/Var_within_closure/T/index.html | 2 +- dev/ocaml/Var_within_closure/Tbl/index.html | 2 +- dev/ocaml/Var_within_closure/index.html | 2 +- dev/ocaml/Variable/Map/index.html | 8 +- dev/ocaml/Variable/Pair/Map/index.html | 8 +- dev/ocaml/Variable/Pair/Set/index.html | 2 +- dev/ocaml/Variable/Pair/T/index.html | 2 +- dev/ocaml/Variable/Pair/Tbl/index.html | 2 +- dev/ocaml/Variable/Pair/index.html | 2 +- dev/ocaml/Variable/Set/index.html | 2 +- dev/ocaml/Variable/T/index.html | 2 +- dev/ocaml/Variable/Tbl/index.html | 2 +- dev/ocaml/Variable/index.html | 6 +- dev/ocaml/Warnings/index.html | 2 +- dev/ocaml/X86_ast/index.html | 2 +- dev/ocaml/X86_dsl/D/index.html | 2 +- dev/ocaml/X86_dsl/I/index.html | 2 +- dev/ocaml/X86_dsl/index.html | 16 +- dev/ocaml/X86_gas/index.html | 2 +- dev/ocaml/X86_masm/index.html | 2 +- dev/ocaml/X86_proc/index.html | 4 +- dev/ocaml/index.html | 2 +- dev/odoc.css | 236 ++++++++++- 1361 files changed, 4294 insertions(+), 4033 deletions(-) delete mode 100644 dev/either/Either__/index.html delete mode 100644 dev/either/Either__Either_intf/index.html create mode 100644 dev/fonts/fira-mono-v14-latin-500.woff2 create mode 100644 dev/fonts/fira-mono-v14-latin-regular.woff2 create mode 100644 dev/fonts/fira-sans-v17-latin-500.woff2 create mode 100644 dev/fonts/fira-sans-v17-latin-500italic.woff2 create mode 100644 dev/fonts/fira-sans-v17-latin-700.woff2 create mode 100644 dev/fonts/fira-sans-v17-latin-700italic.woff2 create mode 100644 dev/fonts/fira-sans-v17-latin-italic.woff2 create mode 100644 dev/fonts/fira-sans-v17-latin-regular.woff2 create mode 100644 dev/fonts/noticia-text-v15-latin-700.woff2 create mode 100644 dev/fonts/noticia-text-v15-latin-italic.woff2 create mode 100644 dev/fonts/noticia-text-v15-latin-regular.woff2 delete mode 100644 dev/ocaml/Stdlib__Arg/index.html delete mode 100644 dev/ocaml/Stdlib__Array/index.html delete mode 100644 dev/ocaml/Stdlib__ArrayLabels/index.html delete mode 100644 dev/ocaml/Stdlib__Atomic/index.html delete mode 100644 dev/ocaml/Stdlib__Bigarray/index.html delete mode 100644 dev/ocaml/Stdlib__Bool/index.html delete mode 100644 dev/ocaml/Stdlib__Buffer/index.html delete mode 100644 dev/ocaml/Stdlib__Bytes/index.html delete mode 100644 dev/ocaml/Stdlib__BytesLabels/index.html delete mode 100644 dev/ocaml/Stdlib__Callback/index.html delete mode 100644 dev/ocaml/Stdlib__Char/index.html delete mode 100644 dev/ocaml/Stdlib__Complex/index.html delete mode 100644 dev/ocaml/Stdlib__Digest/index.html delete mode 100644 dev/ocaml/Stdlib__Either/index.html delete mode 100644 dev/ocaml/Stdlib__Ephemeron/index.html delete mode 100644 dev/ocaml/Stdlib__Filename/index.html delete mode 100644 dev/ocaml/Stdlib__Float/index.html delete mode 100644 dev/ocaml/Stdlib__Format/index.html delete mode 100644 dev/ocaml/Stdlib__Fun/index.html delete mode 100644 dev/ocaml/Stdlib__Gc/index.html delete mode 100644 dev/ocaml/Stdlib__Genlex/index.html delete mode 100644 dev/ocaml/Stdlib__Hashtbl/index.html delete mode 100644 dev/ocaml/Stdlib__In_channel/index.html delete mode 100644 dev/ocaml/Stdlib__Int/index.html delete mode 100644 dev/ocaml/Stdlib__Int32/index.html delete mode 100644 dev/ocaml/Stdlib__Int64/index.html delete mode 100644 dev/ocaml/Stdlib__Lazy/index.html delete mode 100644 dev/ocaml/Stdlib__Lexing/index.html delete mode 100644 dev/ocaml/Stdlib__List/index.html delete mode 100644 dev/ocaml/Stdlib__ListLabels/index.html delete mode 100644 dev/ocaml/Stdlib__Map/index.html delete mode 100644 dev/ocaml/Stdlib__Marshal/index.html delete mode 100644 dev/ocaml/Stdlib__MoreLabels/index.html delete mode 100644 dev/ocaml/Stdlib__Nativeint/index.html delete mode 100644 dev/ocaml/Stdlib__Obj/index.html delete mode 100644 dev/ocaml/Stdlib__Oo/index.html delete mode 100644 dev/ocaml/Stdlib__Option/index.html delete mode 100644 dev/ocaml/Stdlib__Out_channel/index.html delete mode 100644 dev/ocaml/Stdlib__Parsing/index.html delete mode 100644 dev/ocaml/Stdlib__Pervasives/index.html delete mode 100644 dev/ocaml/Stdlib__Printexc/index.html delete mode 100644 dev/ocaml/Stdlib__Printf/index.html delete mode 100644 dev/ocaml/Stdlib__Queue/index.html delete mode 100644 dev/ocaml/Stdlib__Random/index.html delete mode 100644 dev/ocaml/Stdlib__Result/index.html delete mode 100644 dev/ocaml/Stdlib__Scanf/index.html delete mode 100644 dev/ocaml/Stdlib__Seq/index.html delete mode 100644 dev/ocaml/Stdlib__Set/index.html delete mode 100644 dev/ocaml/Stdlib__Stack/index.html delete mode 100644 dev/ocaml/Stdlib__StdLabels/index.html delete mode 100644 dev/ocaml/Stdlib__Stream/index.html delete mode 100644 dev/ocaml/Stdlib__String/index.html delete mode 100644 dev/ocaml/Stdlib__StringLabels/index.html delete mode 100644 dev/ocaml/Stdlib__Sys/index.html delete mode 100644 dev/ocaml/Stdlib__Uchar/index.html delete mode 100644 dev/ocaml/Stdlib__Unit/index.html delete mode 100644 dev/ocaml/Stdlib__Weak/index.html diff --git a/dev/containers-data/CCBV/index.html b/dev/containers-data/CCBV/index.html index 0e142551..5c65c172 100644 --- a/dev/containers-data/CCBV/index.html +++ b/dev/containers-data/CCBV/index.html @@ -1,3 +1,3 @@ -CCBV (containers-data.CCBV)

Module CCBV

Imperative Bitvectors.

A bitvector is stored in some form of internal array (on the heap). Is it a bit similar to a more storage-efficient version of bool - CCVector.vector, with additional operations.

BREAKING CHANGES since 1.2: size is now stored along with the bitvector. Some functions have a new signature.

The size of the bitvector used to be rounded up to the multiple of 30 or 62. In other words some functions such as iter would iterate on more bits than what was originally asked for. This is not the case anymore.

type t

A resizable bitvector

val empty : unit -> t

Empty bitvector. Length is 0.

val create : size:int -> bool -> t

Create a bitvector of given size, with given default value. Length of result is size.

val init : int -> (int -> bool) -> t

init len f initializes a bitvector of length len, where bit i is true iff f i is.

  • since 3.9
val copy : t -> t

Copy of bitvector.

val cardinal : t -> int

Number of bits set to one, seen as a set of bits.

val length : t -> int

Size of underlying bitvector. This is not related to the underlying implementation. Changed at 1.2

val capacity : t -> int

The number of bits this bitvector can store without resizing.

  • since 1.2
val resize : t -> int -> unit

Resize the BV so that it has the specified length. This can grow the underlying array, but it will not shrink it, to minimize memory traffic.

  • raises Invalid_argument

    on negative sizes.

val resize_minimize_memory : t -> int -> unit

Same as resize, but this can also shrink the underlying array if this reduces the size.

  • raises Invalid_argument

    on negative sizes.

  • since 3.9
val is_empty : t -> bool

Are there any true bits?

val set : t -> int -> unit

Set i-th bit, extending the bitvector if needed.

val get : t -> int -> bool

Is the i-th bit true? Return false if the index is too high.

val reset : t -> int -> unit

Set i-th bit to 0, extending the bitvector if needed.

val set_bool : t -> int -> bool -> unit

Set or reset i-th bit.

  • since 3.9
val flip : t -> int -> unit

Flip i-th bit, extending the bitvector if needed.

val clear : t -> unit

Set every bit to 0. Does not change the length.

val clear_and_shrink : t -> unit

Set every bit to 0, and set length to 0.

  • since 3.9
val iter : t -> (int -> bool -> unit) -> unit

Iterate on all bits.

val iter_true : t -> (int -> unit) -> unit

Iterate on bits set to 1.

val to_list : t -> int list

List of indexes that are true.

val to_sorted_list : t -> int list

Same as to_list, but also guarantees the list is sorted in increasing order.

val of_list : int list -> t

From a list of true bits.

The bits are interpreted as indices into the returned bitvector, so the final bitvector bv will have length bv equal to 1 more than max of list indices.

val first : t -> int option

First set bit, or return None. Changed type at 1.2

val first_exn : t -> int

First set bit, or

  • raises Not_found

    if all bits are 0.

  • since 1.2
val filter : t -> (int -> bool) -> unit

filter bv p only keeps the true bits of bv whose index satisfies p index. Length is unchanged.

val negate_self : t -> unit

negate_self t flips all of the bits in t. Length is unchanged.

  • since 1.2
val negate : t -> t

negate t returns a copy of t with all of the bits flipped. Length is unchanged.

val union_into : into:t -> t -> unit

union_into ~into bv sets into to the union of itself and bv. Also updates the length of into to be at least length bv.

val inter_into : into:t -> t -> unit

inter_into ~into bv sets into to the intersection of itself and bv. Also updates the length of into to be at most length bv.

After executing:

  • length ~into' = min (length into) (length bv).
  • for all i: get into' ==> get into i /\ get bv i
val union : t -> t -> t

union bv1 bv2 returns the union of the two sets. The length of the result is the max of the inputs' lengths.

val inter : t -> t -> t

inter bv1 bv2 returns the intersection of the two sets. The length of the result is the min of the inputs' lengths.

val diff_into : into:t -> t -> unit

diff_into ~into t modifies into with only the bits set but not in t.

  • since 1.2
val diff : t -> t -> t

diff t1 t2 returns those bits found in t1 but not in t2.

  • since 1.2
val select : t -> 'a array -> 'a list

select arr bv selects the elements of arr whose index corresponds to a true bit in bv. If bv is too short, elements of arr with too high an index cannot be selected and are therefore not selected.

val selecti : t -> 'a array -> ('a * int) list

Same as select, but selected elements are paired with their indexes.

val equal : t -> t -> bool

Bitwise comparison, including the size (equal a b implies length a=length b).

  • since 3.5
type 'a iter = ('a -> unit) -> unit
val to_iter : t -> int iter

Iterate over the true bits.

val of_iter : int iter -> t

Build from true bits.

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

Print the bitvector as a string of bits.

  • since 0.13
\ No newline at end of file +CCBV (containers-data.CCBV)

Module CCBV

Imperative Bitvectors.

A bitvector is stored in some form of internal array (on the heap). Is it a bit similar to a more storage-efficient version of bool + CCVector.vector, with additional operations.

BREAKING CHANGES since 1.2: size is now stored along with the bitvector. Some functions have a new signature.

The size of the bitvector used to be rounded up to the multiple of 30 or 62. In other words some functions such as iter would iterate on more bits than what was originally asked for. This is not the case anymore.

type t

A resizable bitvector

val empty : unit -> t

Empty bitvector. Length is 0.

val create : size:int -> bool -> t

Create a bitvector of given size, with given default value. Length of result is size.

val init : int -> (int -> bool) -> t

init len f initializes a bitvector of length len, where bit i is true iff f i is.

  • since 3.9
val copy : t -> t

Copy of bitvector.

val cardinal : t -> int

Number of bits set to one, seen as a set of bits.

val length : t -> int

Size of underlying bitvector. This is not related to the underlying implementation. Changed at 1.2

val capacity : t -> int

The number of bits this bitvector can store without resizing.

  • since 1.2
val resize : t -> int -> unit

Resize the BV so that it has the specified length. This can grow the underlying array, but it will not shrink it, to minimize memory traffic.

  • raises Invalid_argument

    on negative sizes.

val resize_minimize_memory : t -> int -> unit

Same as resize, but this can also shrink the underlying array if this reduces the size.

  • raises Invalid_argument

    on negative sizes.

  • since 3.9
val is_empty : t -> bool

Are there any true bits?

val set : t -> int -> unit

Set i-th bit, extending the bitvector if needed.

val get : t -> int -> bool

Is the i-th bit true? Return false if the index is too high.

val reset : t -> int -> unit

Set i-th bit to 0, extending the bitvector if needed.

val set_bool : t -> int -> bool -> unit

Set or reset i-th bit.

  • since 3.9
val flip : t -> int -> unit

Flip i-th bit, extending the bitvector if needed.

val clear : t -> unit

Set every bit to 0. Does not change the length.

val clear_and_shrink : t -> unit

Set every bit to 0, and set length to 0.

  • since 3.9
val iter : t -> (int -> bool -> unit) -> unit

Iterate on all bits.

val iter_true : t -> (int -> unit) -> unit

Iterate on bits set to 1.

val to_list : t -> int list

List of indexes that are true.

val to_sorted_list : t -> int list

Same as to_list, but also guarantees the list is sorted in increasing order.

val of_list : int list -> t

From a list of true bits.

The bits are interpreted as indices into the returned bitvector, so the final bitvector bv will have length bv equal to 1 more than max of list indices.

val first : t -> int option

First set bit, or return None. Changed type at 1.2

val first_exn : t -> int

First set bit, or

  • raises Not_found

    if all bits are 0.

  • since 1.2
val filter : t -> (int -> bool) -> unit

filter bv p only keeps the true bits of bv whose index satisfies p index. Length is unchanged.

val negate_self : t -> unit

negate_self t flips all of the bits in t. Length is unchanged.

  • since 1.2
val negate : t -> t

negate t returns a copy of t with all of the bits flipped. Length is unchanged.

val union_into : into:t -> t -> unit

union_into ~into bv sets into to the union of itself and bv. Also updates the length of into to be at least length bv.

val inter_into : into:t -> t -> unit

inter_into ~into bv sets into to the intersection of itself and bv. Also updates the length of into to be at most length bv.

After executing:

  • length ~into' = min (length into) (length bv).
  • for all i: get into' ==> get into i /\ get bv i
val union : t -> t -> t

union bv1 bv2 returns the union of the two sets. The length of the result is the max of the inputs' lengths.

val inter : t -> t -> t

inter bv1 bv2 returns the intersection of the two sets. The length of the result is the min of the inputs' lengths.

val diff_into : into:t -> t -> unit

diff_into ~into t modifies into with only the bits set but not in t.

  • since 1.2
val diff : t -> t -> t

diff t1 t2 returns those bits found in t1 but not in t2.

  • since 1.2
val select : t -> 'a array -> 'a list

select arr bv selects the elements of arr whose index corresponds to a true bit in bv. If bv is too short, elements of arr with too high an index cannot be selected and are therefore not selected.

val selecti : t -> 'a array -> ('a * int) list

Same as select, but selected elements are paired with their indexes.

val equal : t -> t -> bool

Bitwise comparison, including the size (equal a b implies length a=length b).

  • since 3.5
type 'a iter = ('a -> unit) -> unit
val to_iter : t -> int iter

Iterate over the true bits.

val of_iter : int iter -> t

Build from true bits.

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

Print the bitvector as a string of bits.

  • since 0.13
diff --git a/dev/containers-data/CCBijection/Make/argument-1-L/index.html b/dev/containers-data/CCBijection/Make/argument-1-L/index.html index 24a63144..4216200f 100644 --- a/dev/containers-data/CCBijection/Make/argument-1-L/index.html +++ b/dev/containers-data/CCBijection/Make/argument-1-L/index.html @@ -1,2 +1,2 @@ -L (containers-data.CCBijection.Make.L)

Parameter Make.L

type t
val compare : t -> t -> int
\ No newline at end of file +L (containers-data.CCBijection.Make.L)

Parameter Make.L

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCBijection/Make/argument-2-R/index.html b/dev/containers-data/CCBijection/Make/argument-2-R/index.html index f752c203..876f0072 100644 --- a/dev/containers-data/CCBijection/Make/argument-2-R/index.html +++ b/dev/containers-data/CCBijection/Make/argument-2-R/index.html @@ -1,2 +1,2 @@ -R (containers-data.CCBijection.Make.R)

Parameter Make.R

type t
val compare : t -> t -> int
\ No newline at end of file +R (containers-data.CCBijection.Make.R)

Parameter Make.R

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCBijection/Make/index.html b/dev/containers-data/CCBijection/Make/index.html index d5c161a9..481a726c 100644 --- a/dev/containers-data/CCBijection/Make/index.html +++ b/dev/containers-data/CCBijection/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCBijection.Make)

Module CCBijection.Make

Parameters

module L : OrderedType
module R : OrderedType

Signature

type t
type left = L.t
type right = R.t
val empty : t
val is_empty : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val add : left -> right -> t -> t

Add left and right correspondence to bijection such that left and right are unique in their respective sets and only correspond to each other.

val cardinal : t -> int

Number of bindings. O(n) time.

val mem : left -> right -> t -> bool

Check both sides for key membership.

val mem_left : left -> t -> bool

Check for membership of correspondence using left key.

val mem_right : right -> t -> bool

Check for membership of correspondence using right key.

val find_left : left -> t -> right
  • raises Not_found

    if left is not found.

val find_right : right -> t -> left
  • raises Not_found

    if right is not found.

val remove : left -> right -> t -> t

Remove the left, right binding if it exists. Return the same bijection otherwise.

val remove_left : left -> t -> t

Remove the binding with left key if it exists. Return the same bijection otherwise.

val remove_right : right -> t -> t

Remove the binding with right key if it exists. Return the same bijection otherwise.

val list_left : t -> (left * right) list

Return the bindings as a list of (left, right) values.

val list_right : t -> (right * left) list

Return the bindings as a list of (right, left) values.

val add_iter : (left * right) iter -> t -> t
val of_iter : (left * right) iter -> t
val to_iter : t -> (left * right) iter
val add_list : (left * right) list -> t -> t
val of_list : (left * right) list -> t
val to_list : t -> (left * right) list
\ No newline at end of file +Make (containers-data.CCBijection.Make)

Module CCBijection.Make

Parameters

module L : OrderedType
module R : OrderedType

Signature

type t
type left = L.t
type right = R.t
val empty : t
val is_empty : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val add : left -> right -> t -> t

Add left and right correspondence to bijection such that left and right are unique in their respective sets and only correspond to each other.

val cardinal : t -> int

Number of bindings. O(n) time.

val mem : left -> right -> t -> bool

Check both sides for key membership.

val mem_left : left -> t -> bool

Check for membership of correspondence using left key.

val mem_right : right -> t -> bool

Check for membership of correspondence using right key.

val find_left : left -> t -> right
  • raises Not_found

    if left is not found.

val find_right : right -> t -> left
  • raises Not_found

    if right is not found.

val remove : left -> right -> t -> t

Remove the left, right binding if it exists. Return the same bijection otherwise.

val remove_left : left -> t -> t

Remove the binding with left key if it exists. Return the same bijection otherwise.

val remove_right : right -> t -> t

Remove the binding with right key if it exists. Return the same bijection otherwise.

val list_left : t -> (left * right) list

Return the bindings as a list of (left, right) values.

val list_right : t -> (right * left) list

Return the bindings as a list of (right, left) values.

val add_iter : (left * right) iter -> t -> t
val of_iter : (left * right) iter -> t
val to_iter : t -> (left * right) iter
val add_list : (left * right) list -> t -> t
val of_list : (left * right) list -> t
val to_list : t -> (left * right) list
diff --git a/dev/containers-data/CCBijection/index.html b/dev/containers-data/CCBijection/index.html index 1fbcbf72..c3a1bc5d 100644 --- a/dev/containers-data/CCBijection/index.html +++ b/dev/containers-data/CCBijection/index.html @@ -1,5 +1,5 @@ -CCBijection (containers-data.CCBijection)

Module CCBijection

Functor to build a bijection Represents 1-to-1 mappings between two types. Each element from the "left" is mapped to one "right" value, and conversely.

type 'a iter = ('a -> unit) -> unit
module type OrderedType = sig ... end
module type S = sig ... end
module Make +CCBijection (containers-data.CCBijection)

Module CCBijection

Functor to build a bijection Represents 1-to-1 mappings between two types. Each element from the "left" is mapped to one "right" value, and conversely.

  • since 2.1
type 'a iter = ('a -> unit) -> unit
module type OrderedType = sig ... end
module type S = sig ... end
module Make (L : OrderedType) (R : OrderedType) : - S with type left = L.t and type right = R.t
\ No newline at end of file + S with type left = L.t and type right = R.t
diff --git a/dev/containers-data/CCBijection/module-type-OrderedType/index.html b/dev/containers-data/CCBijection/module-type-OrderedType/index.html index d5842799..1747d7c4 100644 --- a/dev/containers-data/CCBijection/module-type-OrderedType/index.html +++ b/dev/containers-data/CCBijection/module-type-OrderedType/index.html @@ -1,2 +1,2 @@ -OrderedType (containers-data.CCBijection.OrderedType)

Module type CCBijection.OrderedType

type t
val compare : t -> t -> int
\ No newline at end of file +OrderedType (containers-data.CCBijection.OrderedType)

Module type CCBijection.OrderedType

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCBijection/module-type-S/index.html b/dev/containers-data/CCBijection/module-type-S/index.html index 4f2576c5..6fcd3912 100644 --- a/dev/containers-data/CCBijection/module-type-S/index.html +++ b/dev/containers-data/CCBijection/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCBijection.S)

Module type CCBijection.S

type t
type left
type right
val empty : t
val is_empty : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val add : left -> right -> t -> t

Add left and right correspondence to bijection such that left and right are unique in their respective sets and only correspond to each other.

val cardinal : t -> int

Number of bindings. O(n) time.

val mem : left -> right -> t -> bool

Check both sides for key membership.

val mem_left : left -> t -> bool

Check for membership of correspondence using left key.

val mem_right : right -> t -> bool

Check for membership of correspondence using right key.

val find_left : left -> t -> right
  • raises Not_found

    if left is not found.

val find_right : right -> t -> left
  • raises Not_found

    if right is not found.

val remove : left -> right -> t -> t

Remove the left, right binding if it exists. Return the same bijection otherwise.

val remove_left : left -> t -> t

Remove the binding with left key if it exists. Return the same bijection otherwise.

val remove_right : right -> t -> t

Remove the binding with right key if it exists. Return the same bijection otherwise.

val list_left : t -> (left * right) list

Return the bindings as a list of (left, right) values.

val list_right : t -> (right * left) list

Return the bindings as a list of (right, left) values.

val add_iter : (left * right) iter -> t -> t
val of_iter : (left * right) iter -> t
val to_iter : t -> (left * right) iter
val add_list : (left * right) list -> t -> t
val of_list : (left * right) list -> t
val to_list : t -> (left * right) list
\ No newline at end of file +S (containers-data.CCBijection.S)

Module type CCBijection.S

type t
type left
type right
val empty : t
val is_empty : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val add : left -> right -> t -> t

Add left and right correspondence to bijection such that left and right are unique in their respective sets and only correspond to each other.

val cardinal : t -> int

Number of bindings. O(n) time.

val mem : left -> right -> t -> bool

Check both sides for key membership.

val mem_left : left -> t -> bool

Check for membership of correspondence using left key.

val mem_right : right -> t -> bool

Check for membership of correspondence using right key.

val find_left : left -> t -> right
  • raises Not_found

    if left is not found.

val find_right : right -> t -> left
  • raises Not_found

    if right is not found.

val remove : left -> right -> t -> t

Remove the left, right binding if it exists. Return the same bijection otherwise.

val remove_left : left -> t -> t

Remove the binding with left key if it exists. Return the same bijection otherwise.

val remove_right : right -> t -> t

Remove the binding with right key if it exists. Return the same bijection otherwise.

val list_left : t -> (left * right) list

Return the bindings as a list of (left, right) values.

val list_right : t -> (right * left) list

Return the bindings as a list of (right, left) values.

val add_iter : (left * right) iter -> t -> t
val of_iter : (left * right) iter -> t
val to_iter : t -> (left * right) iter
val add_list : (left * right) list -> t -> t
val of_list : (left * right) list -> t
val to_list : t -> (left * right) list
diff --git a/dev/containers-data/CCBitField/Make/index.html b/dev/containers-data/CCBitField/Make/index.html index eab260b2..7858713f 100644 --- a/dev/containers-data/CCBitField/Make/index.html +++ b/dev/containers-data/CCBitField/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCBitField.Make)

Module CCBitField.Make

Create a new bitfield type

Parameters

Signature

type t = private int

Generative type of bitfields. Each instantiation of the functor should create a new, incompatible type

val empty : t

Empty bitfields (all bits 0).

type field
val get : field -> t -> bool

Get the value of this field.

val set : field -> bool -> t -> t

Set the value of this field.

val mk_field : unit -> field

Make a new field.

val freeze : unit -> unit

Prevent new fields from being added. From now on, creating a field will raise Frozen.

val total_width : unit -> int

Current width of the bitfield.

\ No newline at end of file +Make (containers-data.CCBitField.Make)

Module CCBitField.Make

Create a new bitfield type

Parameters

Signature

type t = private int

Generative type of bitfields. Each instantiation of the functor should create a new, incompatible type

val empty : t

Empty bitfields (all bits 0).

type field
val get : field -> t -> bool

Get the value of this field.

val set : field -> bool -> t -> t

Set the value of this field.

val mk_field : unit -> field

Make a new field.

val freeze : unit -> unit

Prevent new fields from being added. From now on, creating a field will raise Frozen.

val total_width : unit -> int

Current width of the bitfield.

diff --git a/dev/containers-data/CCBitField/index.html b/dev/containers-data/CCBitField/index.html index 042e4b27..1beb4792 100644 --- a/dev/containers-data/CCBitField/index.html +++ b/dev/containers-data/CCBitField/index.html @@ -1,5 +1,5 @@ -CCBitField (containers-data.CCBitField)

Module CCBitField

Efficient Bit Field for up to 31 or 61 fiels

This module defines efficient bitfields up to 31 or 61 bits (depending on the architecture) in a relatively type-safe way.

module B = CCBitField.Make(struct end);;
+CCBitField (containers-data.CCBitField)

Module CCBitField

Efficient Bit Field for up to 31 or 61 fiels

This module defines efficient bitfields up to 31 or 61 bits (depending on the architecture) in a relatively type-safe way.

module B = CCBitField.Make(struct end);;
 
 let x = B.mk_field ()
 let y = B.mk_field ()
@@ -9,4 +9,4 @@ let f = B.empty |> B.set x true |> B.set y true;;
 
 assert (not (B.get z f)) ;;
 
-assert (f |> B.set z true |> B.get z);;
exception TooManyFields

Raised when too many fields are packed into one bitfield.

exception Frozen

Raised when a frozen bitfield is modified.

val max_width : int

System-dependent maximum width for a bitfield, typically 30 or 62.

module type S = sig ... end
module Make () : S

Create a new bitfield type

\ No newline at end of file +assert (f |> B.set z true |> B.get z);;
exception TooManyFields

Raised when too many fields are packed into one bitfield.

exception Frozen

Raised when a frozen bitfield is modified.

val max_width : int

System-dependent maximum width for a bitfield, typically 30 or 62.

module type S = sig ... end
module Make () : S

Create a new bitfield type

diff --git a/dev/containers-data/CCBitField/module-type-S/index.html b/dev/containers-data/CCBitField/module-type-S/index.html index 52df051b..fa43ea8b 100644 --- a/dev/containers-data/CCBitField/module-type-S/index.html +++ b/dev/containers-data/CCBitField/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCBitField.S)

Module type CCBitField.S

Bitfield Signature

type t = private int

Generative type of bitfields. Each instantiation of the functor should create a new, incompatible type

val empty : t

Empty bitfields (all bits 0).

type field
val get : field -> t -> bool

Get the value of this field.

val set : field -> bool -> t -> t

Set the value of this field.

val mk_field : unit -> field

Make a new field.

val freeze : unit -> unit

Prevent new fields from being added. From now on, creating a field will raise Frozen.

val total_width : unit -> int

Current width of the bitfield.

\ No newline at end of file +S (containers-data.CCBitField.S)

Module type CCBitField.S

Bitfield Signature

type t = private int

Generative type of bitfields. Each instantiation of the functor should create a new, incompatible type

val empty : t

Empty bitfields (all bits 0).

type field
val get : field -> t -> bool

Get the value of this field.

val set : field -> bool -> t -> t

Set the value of this field.

val mk_field : unit -> field

Make a new field.

val freeze : unit -> unit

Prevent new fields from being added. From now on, creating a field will raise Frozen.

val total_width : unit -> int

Current width of the bitfield.

diff --git a/dev/containers-data/CCCache/index.html b/dev/containers-data/CCCache/index.html index 8c3f4c2a..5dc1b1b0 100644 --- a/dev/containers-data/CCCache/index.html +++ b/dev/containers-data/CCCache/index.html @@ -1,13 +1,13 @@ -CCCache (containers-data.CCCache)

Module CCCache

Caches Utils

Particularly useful for memoization. See with_cache and with_cache_rec for more details.

type 'a equal = 'a -> 'a -> bool
type 'a hash = 'a -> int

Value interface

Typical use case: one wants to memoize a function f : 'a -> 'b. Code sample:

let f x =
+CCCache (containers-data.CCCache)

Module CCCache

Caches Utils

Particularly useful for memoization. See with_cache and with_cache_rec for more details.

  • since 0.6
type 'a equal = 'a -> 'a -> bool
type 'a hash = 'a -> int

Value interface

Typical use case: one wants to memoize a function f : 'a -> 'b. Code sample:

let f x =
   print_endline "call f";
   x + 1;;
 
 let f' = with_cache (lru 256) f;;
 f' 0;;  (* prints *)
 f' 1;;  (* prints *)
-f' 0;;  (* doesn't print, returns cached value *)
  • since 0.6
type ('a, 'b) t
val clear : (_, _) t -> unit

Clear the content of the cache.

type ('a, 'b) callback = in_cache:bool -> 'a -> 'b -> unit

Type of the callback that is called once a cached value is found or not. Should never raise.

  • parameter in_cache

    is true if the value was in cache, false if the value was just produced.

  • since 1.3
val with_cache : ?cb:('a, 'b) callback -> ('a, 'b) t -> ('a -> 'b) -> 'a -> 'b

with_cache c f behaves like f, but caches calls to f in the cache c. It always returns the same value as f x, if f x returns, or raise the same exception. However, f may not be called if x is in the cache.

  • parameter cb

    called after the value is generated or retrieved.

val with_cache_rec : - ?cb:('a, 'b) callback -> +f' 0;; (* doesn't print, returns cached value *)
type ('a, 'b) t
val clear : (_, _) t -> unit

Clear the content of the cache.

type ('a, 'b) callback = in_cache:bool -> 'a -> 'b -> unit

Type of the callback that is called once a cached value is found or not. Should never raise.

  • parameter in_cache

    is true if the value was in cache, false if the value was just produced.

  • since 1.3
val with_cache : ?cb:('a, 'b) callback -> ('a, 'b) t -> ('a -> 'b) -> 'a -> 'b

with_cache c f behaves like f, but caches calls to f in the cache c. It always returns the same value as f x, if f x returns, or raise the same exception. However, f may not be called if x is in the cache.

  • parameter cb

    called after the value is generated or retrieved.

val with_cache_rec : + ?cb:('a, 'b) callback -> ('a, 'b) t -> (('a -> 'b) -> 'a -> 'b) -> 'a -> @@ -17,4 +17,4 @@ f' 0;; (* doesn't print, returns cached value *)
  • parameter cb

    called after the value is generated or retrieved.

val size : (_, _) t -> int

Size of the cache (number of entries). At most linear in the number of entries.

val iter : ('a, 'b) t -> ('a -> 'b -> unit) -> unit

Iterate on cached values. Should yield size cache pairs.

val add : ('a, 'b) t -> 'a -> 'b -> bool

Manually add a cached value. Return true if the value has successfully been added, and false if the value was already bound.

  • since 1.5
val dummy : ('a, 'b) t

Dummy cache, never stores any value.

val linear : eq:'a equal -> int -> ('a, 'b) t

Linear cache with the given size. It stores key/value pairs in an array and does linear search at every call, so it should only be used with small size.

  • parameter eq

    optional equality predicate for keys.

val replacing : eq:'a equal -> ?hash:'a hash -> int -> ('a, 'b) t

Replacing cache of the given size. Equality and hash functions can be parametrized. It's a hash table that handles collisions by replacing the old value with the new (so a cache entry is evicted when another entry with the same hash (modulo size) is added). Never grows wider than the given size.

val lru : eq:'a equal -> ?hash:'a hash -> int -> ('a, 'b) t

LRU cache of the given size ("Least Recently Used": keys that have not been used recently are deleted first). Never grows wider than the given size.

val unbounded : eq:'a equal -> ?hash:'a hash -> int -> ('a, 'b) t

Unbounded cache, backed by a Hash table. Will grow forever unless clear is called manually.

\ No newline at end of file +fib 70;;
val size : (_, _) t -> int

Size of the cache (number of entries). At most linear in the number of entries.

val iter : ('a, 'b) t -> ('a -> 'b -> unit) -> unit

Iterate on cached values. Should yield size cache pairs.

val add : ('a, 'b) t -> 'a -> 'b -> bool

Manually add a cached value. Return true if the value has successfully been added, and false if the value was already bound.

  • since 1.5
val dummy : ('a, 'b) t

Dummy cache, never stores any value.

val linear : eq:'a equal -> int -> ('a, 'b) t

Linear cache with the given size. It stores key/value pairs in an array and does linear search at every call, so it should only be used with small size.

  • parameter eq

    optional equality predicate for keys.

val replacing : eq:'a equal -> ?hash:'a hash -> int -> ('a, 'b) t

Replacing cache of the given size. Equality and hash functions can be parametrized. It's a hash table that handles collisions by replacing the old value with the new (so a cache entry is evicted when another entry with the same hash (modulo size) is added). Never grows wider than the given size.

val lru : eq:'a equal -> ?hash:'a hash -> int -> ('a, 'b) t

LRU cache of the given size ("Least Recently Used": keys that have not been used recently are deleted first). Never grows wider than the given size.

val unbounded : eq:'a equal -> ?hash:'a hash -> int -> ('a, 'b) t

Unbounded cache, backed by a Hash table. Will grow forever unless clear is called manually.

diff --git a/dev/containers-data/CCDeque/index.html b/dev/containers-data/CCDeque/index.html index 926278bf..219d7c23 100644 --- a/dev/containers-data/CCDeque/index.html +++ b/dev/containers-data/CCDeque/index.html @@ -1,2 +1,2 @@ -CCDeque (containers-data.CCDeque)

Module CCDeque

Imperative deque

This structure provides fast access to its front and back elements, with O(1) operations.

type 'a t

Contains 'a elements, queue in both ways

exception Empty
val create : unit -> 'a t

New deque.

val clear : _ t -> unit

Remove all elements.

  • since 0.13
val is_empty : 'a t -> bool

Is the deque empty?

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

equal a b checks whether a and b contain the same sequence of elements.

  • parameter eq

    comparison function for elements.

  • since 0.13
val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

compare a b compares lexicographically a and b.

  • parameter cmp

    comparison function for elements.

  • since 0.13
val length : 'a t -> int

Number of elements. Used to be linear time, now constant time.

val push_front : 'a t -> 'a -> unit

Push value at the front.

val push_back : 'a t -> 'a -> unit

Push value at the back.

val peek_front : 'a t -> 'a

First value.

  • raises Empty

    if empty.

val peek_front_opt : 'a t -> 'a option

First value.

  • since 2.7
val peek_back : 'a t -> 'a

Last value.

  • raises Empty

    if empty.

val peek_back_opt : 'a t -> 'a option

Last value.

  • since 2.7
val remove_back : 'a t -> unit

Remove last value. If the deque is empty do nothing

  • since 2.7
val remove_front : 'a t -> unit

Remove first value. If the deque is empty do nothing

  • since 2.7
val take_back : 'a t -> 'a

Take last value.

  • raises Empty

    if empty.

val take_back_opt : 'a t -> 'a option

Take last value.

  • since 2.7
val take_front : 'a t -> 'a

Take first value.

  • raises Empty

    if empty.

val take_front_opt : 'a t -> 'a option

Take first value.

  • since 2.7
val update_back : 'a t -> ('a -> 'a option) -> unit

Update last value. If the deque is empty do nothing. If the function returns None, remove last element; if it returns Some x, replace last element with x.

  • since 2.7
val update_front : 'a t -> ('a -> 'a option) -> unit

Update first value. If the deque is empty do nothing. Similar to update_back but for the first value.

  • since 2.7
val append_front : into:'a t -> 'a t -> unit

append_front ~into q adds all elements of q at the front of into. O(length q) in time.

  • since 0.13
val append_back : into:'a t -> 'a t -> unit

append_back ~into q adds all elements of q at the back of into. O(length q) in time.

  • since 0.13
val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements.

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

Fold on elements.

  • since 0.13

Conversions

type 'a gen = unit -> 'a option
type 'a iter = ('a -> unit) -> unit
val of_iter : 'a iter -> 'a t

Create a deque from the sequence. Optional argument deque disappears, use add_iter_back instead.

  • since 0.13
val to_iter : 'a t -> 'a iter

Iterate on the elements.

val of_gen : 'a gen -> 'a t

of_gen g makes a deque containing the elements of g.

  • since 0.13
val to_gen : 'a t -> 'a gen

Iterate on the elements of the deque.

  • since 0.13
val add_iter_front : 'a t -> 'a iter -> unit

add_iter_front q seq adds elements of seq into the front of q, in reverse order. O(n) in time, where n is the number of elements to add.

  • since 0.13
val add_iter_back : 'a t -> 'a iter -> unit

add_iter_back q seq adds elements of seq into the back of q, in order. O(n) in time, where n is the number of elements to add.

  • since 0.13
val copy : 'a t -> 'a t

Fresh copy, O(n) in time.

val of_list : 'a list -> 'a t

Conversion from list, in order.

  • since 0.13
val to_list : 'a t -> 'a list

List of elements, in order. Less efficient than to_rev_list.

  • since 0.13
val to_rev_list : 'a t -> 'a list

Efficient conversion to list, in reverse order.

  • since 0.13
val filter : ('a -> bool) -> 'a t -> 'a t

Filter into a new copy.

  • since 2.7
val filter_map : ('a -> 'b option) -> 'a t -> 'b t

Filter map into a new copy

  • since 2.7
val filter_in_place : 'a t -> ('a -> bool) -> unit

Keep only elements that satisfy the predicate.

  • since 2.7

print

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : 'a printer -> 'a t printer

Print the elements.

  • since 0.13
\ No newline at end of file +CCDeque (containers-data.CCDeque)

Module CCDeque

Imperative deque

This structure provides fast access to its front and back elements, with O(1) operations.

type 'a t

Contains 'a elements, queue in both ways

exception Empty
val create : unit -> 'a t

New deque.

val clear : _ t -> unit

Remove all elements.

  • since 0.13
val is_empty : 'a t -> bool

Is the deque empty?

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

equal a b checks whether a and b contain the same sequence of elements.

  • parameter eq

    comparison function for elements.

  • since 0.13
val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

compare a b compares lexicographically a and b.

  • parameter cmp

    comparison function for elements.

  • since 0.13
val length : 'a t -> int

Number of elements. Used to be linear time, now constant time.

val push_front : 'a t -> 'a -> unit

Push value at the front.

val push_back : 'a t -> 'a -> unit

Push value at the back.

val peek_front : 'a t -> 'a

First value.

val peek_front_opt : 'a t -> 'a option

First value.

  • since 2.7
val peek_back : 'a t -> 'a

Last value.

val peek_back_opt : 'a t -> 'a option

Last value.

  • since 2.7
val remove_back : 'a t -> unit

Remove last value. If the deque is empty do nothing

  • since 2.7
val remove_front : 'a t -> unit

Remove first value. If the deque is empty do nothing

  • since 2.7
val take_back : 'a t -> 'a

Take last value.

val take_back_opt : 'a t -> 'a option

Take last value.

  • since 2.7
val take_front : 'a t -> 'a

Take first value.

val take_front_opt : 'a t -> 'a option

Take first value.

  • since 2.7
val update_back : 'a t -> ('a -> 'a option) -> unit

Update last value. If the deque is empty do nothing. If the function returns None, remove last element; if it returns Some x, replace last element with x.

  • since 2.7
val update_front : 'a t -> ('a -> 'a option) -> unit

Update first value. If the deque is empty do nothing. Similar to update_back but for the first value.

  • since 2.7
val append_front : into:'a t -> 'a t -> unit

append_front ~into q adds all elements of q at the front of into. O(length q) in time.

  • since 0.13
val append_back : into:'a t -> 'a t -> unit

append_back ~into q adds all elements of q at the back of into. O(length q) in time.

  • since 0.13
val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements.

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

Fold on elements.

  • since 0.13

Conversions

type 'a gen = unit -> 'a option
type 'a iter = ('a -> unit) -> unit
val of_iter : 'a iter -> 'a t

Create a deque from the sequence. Optional argument deque disappears, use add_iter_back instead.

  • since 0.13
val to_iter : 'a t -> 'a iter

Iterate on the elements.

val of_gen : 'a gen -> 'a t

of_gen g makes a deque containing the elements of g.

  • since 0.13
val to_gen : 'a t -> 'a gen

Iterate on the elements of the deque.

  • since 0.13
val add_iter_front : 'a t -> 'a iter -> unit

add_iter_front q seq adds elements of seq into the front of q, in reverse order. O(n) in time, where n is the number of elements to add.

  • since 0.13
val add_iter_back : 'a t -> 'a iter -> unit

add_iter_back q seq adds elements of seq into the back of q, in order. O(n) in time, where n is the number of elements to add.

  • since 0.13
val copy : 'a t -> 'a t

Fresh copy, O(n) in time.

val of_list : 'a list -> 'a t

Conversion from list, in order.

  • since 0.13
val to_list : 'a t -> 'a list

List of elements, in order. Less efficient than to_rev_list.

  • since 0.13
val to_rev_list : 'a t -> 'a list

Efficient conversion to list, in reverse order.

  • since 0.13
val filter : ('a -> bool) -> 'a t -> 'a t

Filter into a new copy.

  • since 2.7
val filter_map : ('a -> 'b option) -> 'a t -> 'b t

Filter map into a new copy

  • since 2.7
val filter_in_place : 'a t -> ('a -> bool) -> unit

Keep only elements that satisfy the predicate.

  • since 2.7

print

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : 'a printer -> 'a t printer

Print the elements.

  • since 0.13
diff --git a/dev/containers-data/CCFQueue/index.html b/dev/containers-data/CCFQueue/index.html index 0445e5f5..5296b356 100644 --- a/dev/containers-data/CCFQueue/index.html +++ b/dev/containers-data/CCFQueue/index.html @@ -1,2 +1,2 @@ -CCFQueue (containers-data.CCFQueue)

Module CCFQueue

Functional queues

type 'a iter = ('a -> unit) -> unit
type 'a equal = 'a -> 'a -> bool
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

type +'a t

Queue containing elements of type 'a

val empty : 'a t
val is_empty : 'a t -> bool
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
exception Empty
val cons : 'a -> 'a t -> 'a t

Push element at the front of the queue.

val snoc : 'a t -> 'a -> 'a t

Push element at the end of the queue.

val take_front : 'a t -> ('a * 'a t) option

Get and remove the first element.

val take_front_exn : 'a t -> 'a * 'a t

Same as take_front, but fails on empty queues.

  • raises Empty

    if the queue is empty.

val take_front_l : int -> 'a t -> 'a list * 'a t

take_front_l n q takes at most n elements from the front of q, and returns them wrapped in a list.

  • raises Invalid_argument

    if n<0.

val take_front_while : ('a -> bool) -> 'a t -> 'a list * 'a t
val take_back : 'a t -> ('a t * 'a) option

Take last element.

val take_back_exn : 'a t -> 'a t * 'a

Same as take_back, but fails on empty queues.

  • raises Empty

    if the queue is empty.

val take_back_l : int -> 'a t -> 'a t * 'a list

take_back_l n q removes and returns the last n elements of q. The elements are in the order of the queue, that is, the head of the returned list is the first element to appear via take_front. take_back_l 2 (of_list [1;2;3;4]) = of_list [1;2], [3;4].

  • raises Invalid_argument

    if n<0.

val take_back_while : ('a -> bool) -> 'a t -> 'a t * 'a list

Individual extraction

val first : 'a t -> 'a option

First element of the queue.

val last : 'a t -> 'a option

Last element of the queue.

val first_exn : 'a t -> 'a

Same as first but

  • raises Empty

    if the queue is empty.

val last_exn : 'a t -> 'a
val nth : int -> 'a t -> 'a option

Return the i-th element of the queue in logarithmic time.

val nth_exn : int -> 'a t -> 'a

Unsafe version of nth.

  • raises Not_found

    if the index is wrong.

val tail : 'a t -> 'a t

Queue deprived of its first element. Does nothing on empty queues.

val init : 'a t -> 'a t

Queue deprived of its last element. Does nothing on empty queues.

Global Operations

val append : 'a t -> 'a t -> 'a t

Append two queues. Elements from the second one come after elements of the first one. Linear in the size of the second queue.

val rev : 'a t -> 'a t

Reverse the queue, O(n) complexity.

  • since 0.10
val map : ('a -> 'b) -> 'a t -> 'b t

Map values.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Synonym to map.

val size : 'a t -> int

Number of elements in the queue (constant time).

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val iter : ('a -> unit) -> 'a t -> unit
val equal : 'a equal -> 'a t equal

Conversions

val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val add_iter_front : 'a iter -> 'a t -> 'a t
  • since 3.0
val add_iter_back : 'a t -> 'a iter -> 'a t
  • since 3.0
val to_iter : 'a t -> 'a iter
  • since 3.0
val of_iter : 'a iter -> 'a t
  • since 3.0
val add_seq_front : 'a Stdlib.Seq.t -> 'a t -> 'a t
  • since 3.0
val add_seq_back : 'a t -> 'a Stdlib.Seq.t -> 'a t
  • since 3.0
val to_seq : 'a t -> 'a Stdlib.Seq.t
  • since 3.0
val of_seq : 'a Stdlib.Seq.t -> 'a t
  • since 3.0
val (--) : int -> int -> int t

a -- b is the integer range from a to b, both included.

  • since 0.10
val (--^) : int -> int -> int t

a -- b is the integer range from a to b, where b is excluded.

  • since 0.17
val pp : 'a printer -> 'a t printer
  • since 0.13
\ No newline at end of file +CCFQueue (containers-data.CCFQueue)

Module CCFQueue

Functional queues

type 'a iter = ('a -> unit) -> unit
type 'a equal = 'a -> 'a -> bool
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

type +'a t

Queue containing elements of type 'a

val empty : 'a t
val is_empty : 'a t -> bool
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
exception Empty
val cons : 'a -> 'a t -> 'a t

Push element at the front of the queue.

val snoc : 'a t -> 'a -> 'a t

Push element at the end of the queue.

val take_front : 'a t -> ('a * 'a t) option

Get and remove the first element.

val take_front_exn : 'a t -> 'a * 'a t

Same as take_front, but fails on empty queues.

  • raises Empty

    if the queue is empty.

val take_front_l : int -> 'a t -> 'a list * 'a t

take_front_l n q takes at most n elements from the front of q, and returns them wrapped in a list.

  • raises Invalid_argument

    if n<0.

val take_front_while : ('a -> bool) -> 'a t -> 'a list * 'a t
val take_back : 'a t -> ('a t * 'a) option

Take last element.

val take_back_exn : 'a t -> 'a t * 'a

Same as take_back, but fails on empty queues.

  • raises Empty

    if the queue is empty.

val take_back_l : int -> 'a t -> 'a t * 'a list

take_back_l n q removes and returns the last n elements of q. The elements are in the order of the queue, that is, the head of the returned list is the first element to appear via take_front. take_back_l 2 (of_list [1;2;3;4]) = of_list [1;2], [3;4].

  • raises Invalid_argument

    if n<0.

val take_back_while : ('a -> bool) -> 'a t -> 'a t * 'a list

Individual extraction

val first : 'a t -> 'a option

First element of the queue.

val last : 'a t -> 'a option

Last element of the queue.

val first_exn : 'a t -> 'a

Same as first but

  • raises Empty

    if the queue is empty.

val last_exn : 'a t -> 'a
val nth : int -> 'a t -> 'a option

Return the i-th element of the queue in logarithmic time.

val nth_exn : int -> 'a t -> 'a

Unsafe version of nth.

  • raises Not_found

    if the index is wrong.

val tail : 'a t -> 'a t

Queue deprived of its first element. Does nothing on empty queues.

val init : 'a t -> 'a t

Queue deprived of its last element. Does nothing on empty queues.

Global Operations

val append : 'a t -> 'a t -> 'a t

Append two queues. Elements from the second one come after elements of the first one. Linear in the size of the second queue.

val rev : 'a t -> 'a t

Reverse the queue, O(n) complexity.

  • since 0.10
val map : ('a -> 'b) -> 'a t -> 'b t

Map values.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Synonym to map.

val size : 'a t -> int

Number of elements in the queue (constant time).

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val iter : ('a -> unit) -> 'a t -> unit
val equal : 'a equal -> 'a t equal

Conversions

val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val add_iter_front : 'a iter -> 'a t -> 'a t
  • since 3.0
val add_iter_back : 'a t -> 'a iter -> 'a t
  • since 3.0
val to_iter : 'a t -> 'a iter
  • since 3.0
val of_iter : 'a iter -> 'a t
  • since 3.0
val add_seq_front : 'a Stdlib.Seq.t -> 'a t -> 'a t
  • since 3.0
val add_seq_back : 'a t -> 'a Stdlib.Seq.t -> 'a t
  • since 3.0
val to_seq : 'a t -> 'a Stdlib.Seq.t
  • since 3.0
val of_seq : 'a Stdlib.Seq.t -> 'a t
  • since 3.0
val (--) : int -> int -> int t

a -- b is the integer range from a to b, both included.

  • since 0.10
val (--^) : int -> int -> int t

a -- b is the integer range from a to b, where b is excluded.

  • since 0.17
val pp : 'a printer -> 'a t printer
  • since 0.13
diff --git a/dev/containers-data/CCFun_vec/index.html b/dev/containers-data/CCFun_vec/index.html index 196ba1da..4d7e2d2d 100644 --- a/dev/containers-data/CCFun_vec/index.html +++ b/dev/containers-data/CCFun_vec/index.html @@ -1,2 +1,2 @@ -CCFun_vec (containers-data.CCFun_vec)

Module CCFun_vec

Functional Vectors

Tree with a large branching factor for logarithmic operations with a low multiplicative factor.

status: experimental. DO NOT USE (yet)

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ]

Signature

type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val length : _ t -> int
val push : 'a -> 'a t -> 'a t

Add element at the end.

val get : int -> 'a t -> 'a option
val get_exn : int -> 'a t -> 'a
  • raises Not_found

    if key not present.

val pop_exn : 'a t -> 'a * 'a t

Pop last element.

  • raises Invalid_argument

    in case the vec is empty.

val pop : 'a t -> ('a * 'a t) option

Pop last element.

  • since 2.5
val iter : f:('a -> unit) -> 'a t -> unit
val iteri : f:(int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index, in increasing order.

val iteri_rev : f:(int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index, but starting from the end.

val fold : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val foldi : f:('b -> int -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val append : 'a t -> 'a t -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val choose : 'a t -> 'a option
Conversions
val to_list : 'a t -> 'a list
val of_list : 'a list -> 'a t
val add_list : 'a t -> 'a list -> 'a t
val add_iter : 'a t -> 'a iter -> 'a t
val of_iter : 'a iter -> 'a t
val to_iter : 'a t -> 'a iter
val add_gen : 'a t -> 'a gen -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen
IO
val pp : 'a printer -> 'a t printer
\ No newline at end of file +CCFun_vec (containers-data.CCFun_vec)

Module CCFun_vec

Functional Vectors

Tree with a large branching factor for logarithmic operations with a low multiplicative factor.

status: experimental. DO NOT USE (yet)

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ]

Signature

type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val length : _ t -> int
val push : 'a -> 'a t -> 'a t

Add element at the end.

val get : int -> 'a t -> 'a option
val get_exn : int -> 'a t -> 'a
  • raises Not_found

    if key not present.

val pop_exn : 'a t -> 'a * 'a t

Pop last element.

  • raises Invalid_argument

    in case the vec is empty.

val pop : 'a t -> ('a * 'a t) option

Pop last element.

  • since 2.5
val iter : f:('a -> unit) -> 'a t -> unit
val iteri : f:(int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index, in increasing order.

val iteri_rev : f:(int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index, but starting from the end.

val fold : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val foldi : f:('b -> int -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val append : 'a t -> 'a t -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val choose : 'a t -> 'a option
Conversions
val to_list : 'a t -> 'a list
val of_list : 'a list -> 'a t
val add_list : 'a t -> 'a list -> 'a t
val add_iter : 'a t -> 'a iter -> 'a t
val of_iter : 'a iter -> 'a t
val to_iter : 'a t -> 'a iter
val add_gen : 'a t -> 'a gen -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen
IO
val pp : 'a printer -> 'a t printer
diff --git a/dev/containers-data/CCGraph/Dot/index.html b/dev/containers-data/CCGraph/Dot/index.html index 1df6484d..6655c5f8 100644 --- a/dev/containers-data/CCGraph/Dot/index.html +++ b/dev/containers-data/CCGraph/Dot/index.html @@ -1,20 +1,20 @@ -Dot (containers-data.CCGraph.Dot)

Module CCGraph.Dot

type attribute = [
  1. | `Color of string
  2. | `Shape of string
  3. | `Weight of int
  4. | `Style of string
  5. | `Label of string
  6. | `Other of string * string
]

Dot attribute

type vertex_state

Hidden state associated to a vertex

val pp : - tbl:('v, vertex_state) table -> - eq:('v -> 'v -> bool) -> - ?attrs_v:('v -> attribute list) -> - ?attrs_e:('e -> attribute list) -> - ?name:string -> - graph:('v, 'e) t -> +Dot (containers-data.CCGraph.Dot)

Module CCGraph.Dot

type attribute = [
  1. | `Color of string
  2. | `Shape of string
  3. | `Weight of int
  4. | `Style of string
  5. | `Label of string
  6. | `Other of string * string
]

Dot attribute

type vertex_state

Hidden state associated to a vertex

val pp : + tbl:('v, vertex_state) table -> + eq:('v -> 'v -> bool) -> + ?attrs_v:('v -> attribute list) -> + ?attrs_e:('e -> attribute list) -> + ?name:string -> + graph:('v, 'e) t -> Stdlib.Format.formatter -> 'v -> unit

Print the graph, starting from given vertex, on the formatter.

  • parameter attrs_v

    attributes for vertices.

  • parameter attrs_e

    attributes for edges.

  • parameter name

    name of the graph.

val pp_all : - tbl:('v, vertex_state) table -> - eq:('v -> 'v -> bool) -> - ?attrs_v:('v -> attribute list) -> - ?attrs_e:('e -> attribute list) -> - ?name:string -> - graph:('v, 'e) t -> + tbl:('v, vertex_state) table -> + eq:('v -> 'v -> bool) -> + ?attrs_v:('v -> attribute list) -> + ?attrs_e:('e -> attribute list) -> + ?name:string -> + graph:('v, 'e) t -> Stdlib.Format.formatter -> 'v iter -> - unit

Same as pp but starting from several vertices, not just one.

  • since 2.8
val with_out : string -> (Stdlib.Format.formatter -> 'a) -> 'a

Shortcut to open a file and write to it.

\ No newline at end of file + unit

Same as pp but starting from several vertices, not just one.

  • since 2.8
val with_out : string -> (Stdlib.Format.formatter -> 'a) -> 'a

Shortcut to open a file and write to it.

diff --git a/dev/containers-data/CCGraph/Iter/index.html b/dev/containers-data/CCGraph/Iter/index.html index ca6d40a7..55332d34 100644 --- a/dev/containers-data/CCGraph/Iter/index.html +++ b/dev/containers-data/CCGraph/Iter/index.html @@ -1,2 +1,2 @@ -Iter (containers-data.CCGraph.Iter)

Module CCGraph.Iter

type 'a t = 'a iter
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val map : ('a -> 'b) -> 'a t -> 'b t
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
val iter : ('a -> unit) -> 'a t -> unit
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val to_list : 'a t -> 'a list
\ No newline at end of file +Iter (containers-data.CCGraph.Iter)

Module CCGraph.Iter

type 'a t = 'a iter
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val map : ('a -> 'b) -> 'a t -> 'b t
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
val iter : ('a -> unit) -> 'a t -> unit
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val to_list : 'a t -> 'a list
diff --git a/dev/containers-data/CCGraph/Lazy_tree/index.html b/dev/containers-data/CCGraph/Lazy_tree/index.html index 1b1f468e..7cb1d813 100644 --- a/dev/containers-data/CCGraph/Lazy_tree/index.html +++ b/dev/containers-data/CCGraph/Lazy_tree/index.html @@ -1,2 +1,2 @@ -Lazy_tree (containers-data.CCGraph.Lazy_tree)

Module CCGraph.Lazy_tree

type ('v, 'e) t = {
  1. vertex : 'v;
  2. children : ('e * ('v, 'e) t) list Stdlib.Lazy.t;
}
val map_v : ('a -> 'b) -> ('a, 'e) t -> ('b, 'e) t
val fold_v : ('acc -> 'v -> 'acc) -> 'acc -> ('v, _) t -> 'acc
\ No newline at end of file +Lazy_tree (containers-data.CCGraph.Lazy_tree)

Module CCGraph.Lazy_tree

type ('v, 'e) t = {
  1. vertex : 'v;
  2. children : ('e * ('v, 'e) t) list Stdlib.Lazy.t;
}
val map_v : ('a -> 'b) -> ('a, 'e) t -> ('b, 'e) t
val fold_v : ('acc -> 'v -> 'acc) -> 'acc -> ('v, _) t -> 'acc
diff --git a/dev/containers-data/CCGraph/Map/argument-1-O/index.html b/dev/containers-data/CCGraph/Map/argument-1-O/index.html index 2ca54d1d..ca6d2093 100644 --- a/dev/containers-data/CCGraph/Map/argument-1-O/index.html +++ b/dev/containers-data/CCGraph/Map/argument-1-O/index.html @@ -1,2 +1,2 @@ -O (containers-data.CCGraph.Map.O)

Parameter Map.O

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 +O (containers-data.CCGraph.Map.O)

Parameter Map.O

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/dev/containers-data/CCGraph/Map/index.html b/dev/containers-data/CCGraph/Map/index.html index a0c15aad..32e1d0ec 100644 --- a/dev/containers-data/CCGraph/Map/index.html +++ b/dev/containers-data/CCGraph/Map/index.html @@ -1,2 +1,2 @@ -Map (containers-data.CCGraph.Map)

Module CCGraph.Map

Parameters

Signature

type vertex = O.t
type 'a t
val as_graph : 'a t -> (vertex, 'a) graph

Graph view of the map.

val empty : 'a t
val add_edge : vertex -> 'a -> vertex -> 'a t -> 'a t
val remove_edge : vertex -> vertex -> 'a t -> 'a t
val add : vertex -> 'a t -> 'a t

Add a vertex, possibly with no outgoing edge.

val remove : vertex -> 'a t -> 'a t

Remove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.

val union : 'a t -> 'a t -> 'a t
val vertices : _ t -> vertex iter
val vertices_l : _ t -> vertex list
val of_list : (vertex * 'a * vertex) list -> 'a t
val add_list : (vertex * 'a * vertex) list -> 'a t -> 'a t
val to_list : 'a t -> (vertex * 'a * vertex) list
val of_iter : (vertex * 'a * vertex) iter -> 'a t
  • since 2.8
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
  • since 2.8
val to_iter : 'a t -> (vertex * 'a * vertex) iter
  • since 2.8
\ No newline at end of file +Map (containers-data.CCGraph.Map)

Module CCGraph.Map

Parameters

Signature

type vertex = O.t
type 'a t
val as_graph : 'a t -> (vertex, 'a) graph

Graph view of the map.

val empty : 'a t
val add_edge : vertex -> 'a -> vertex -> 'a t -> 'a t
val remove_edge : vertex -> vertex -> 'a t -> 'a t
val add : vertex -> 'a t -> 'a t

Add a vertex, possibly with no outgoing edge.

val remove : vertex -> 'a t -> 'a t

Remove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.

val union : 'a t -> 'a t -> 'a t
val vertices : _ t -> vertex iter
val vertices_l : _ t -> vertex list
val of_list : (vertex * 'a * vertex) list -> 'a t
val add_list : (vertex * 'a * vertex) list -> 'a t -> 'a t
val to_list : 'a t -> (vertex * 'a * vertex) list
val of_iter : (vertex * 'a * vertex) iter -> 'a t
  • since 2.8
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
  • since 2.8
val to_iter : 'a t -> (vertex * 'a * vertex) iter
  • since 2.8
diff --git a/dev/containers-data/CCGraph/Traverse/Event/index.html b/dev/containers-data/CCGraph/Traverse/Event/index.html index 6995e731..231f68b4 100644 --- a/dev/containers-data/CCGraph/Traverse/Event/index.html +++ b/dev/containers-data/CCGraph/Traverse/Event/index.html @@ -1,12 +1,12 @@ -Event (containers-data.CCGraph.Traverse.Event)

Module Traverse.Event

More detailed interface

type edge_kind = [
  1. | `Forward
  2. | `Back
  3. | `Cross
]
type ('v, 'e) t = [
  1. | `Enter of 'v * int * ('v, 'e) path
  2. | `Exit of 'v
  3. | `Edge of 'v * 'e * 'v * edge_kind
]

A traversal is a sequence of such events

val get_vertex : ('v, 'e) t -> ('v * [ `Enter | `Exit ]) option
val get_enter : ('v, 'e) t -> 'v option
val get_exit : ('v, 'e) t -> 'v option
val get_edge : ('v, 'e) t -> ('v * 'e * 'v) option
val get_edge_kind : ('v, 'e) t -> ('v * 'e * 'v * edge_kind) option
val dfs : - tbl:'v set -> - eq:('v -> 'v -> bool) -> - graph:('v, 'e) graph -> +Event (containers-data.CCGraph.Traverse.Event)

Module Traverse.Event

More detailed interface

type edge_kind = [
  1. | `Forward
  2. | `Back
  3. | `Cross
]
type ('v, 'e) t = [
  1. | `Enter of 'v * int * ('v, 'e) path
  2. | `Exit of 'v
  3. | `Edge of 'v * 'e * 'v * edge_kind
]

A traversal is a sequence of such events

val get_vertex : ('v, 'e) t -> ('v * [ `Enter | `Exit ]) option
val get_enter : ('v, 'e) t -> 'v option
val get_exit : ('v, 'e) t -> 'v option
val get_edge : ('v, 'e) t -> ('v * 'e * 'v) option
val get_edge_kind : ('v, 'e) t -> ('v * 'e * 'v * edge_kind) option
val dfs : + tbl:'v set -> + eq:('v -> 'v -> bool) -> + graph:('v, 'e) graph -> 'v iter -> ('v, 'e) t iter_once

Full version of DFS.

  • parameter eq

    equality predicate on vertices.

val dfs_tag : - eq:('v -> 'v -> bool) -> - tags:'v tag_set -> - graph:('v, 'e) graph -> + eq:('v -> 'v -> bool) -> + tags:'v tag_set -> + graph:('v, 'e) graph -> 'v iter -> - ('v, 'e) t iter_once

Full version of DFS using integer tags.

  • parameter eq

    equality predicate on vertices.

\ No newline at end of file + ('v, 'e) t iter_once

Full version of DFS using integer tags.

  • parameter eq

    equality predicate on vertices.

diff --git a/dev/containers-data/CCGraph/Traverse/index.html b/dev/containers-data/CCGraph/Traverse/index.html index 48a61cfb..487b5d25 100644 --- a/dev/containers-data/CCGraph/Traverse/index.html +++ b/dev/containers-data/CCGraph/Traverse/index.html @@ -1,22 +1,22 @@ -Traverse (containers-data.CCGraph.Traverse)

Module CCGraph.Traverse

type ('v, 'e) path = ('v * 'e * 'v) list
val generic : - tbl:'v set -> - bag:'v bag -> - graph:('v, 'e) t -> +Traverse (containers-data.CCGraph.Traverse)

Module CCGraph.Traverse

type ('v, 'e) path = ('v * 'e * 'v) list
val generic : + tbl:'v set -> + bag:'v bag -> + graph:('v, 'e) t -> 'v iter -> 'v iter_once

Traversal of the given graph, starting from a sequence of vertices, using the given bag to choose the next vertex to explore. Each vertex is visited at most once.

val generic_tag : - tags:'v tag_set -> - bag:'v bag -> - graph:('v, 'e) t -> + tags:'v tag_set -> + bag:'v bag -> + graph:('v, 'e) t -> 'v iter -> - 'v iter_once

One-shot traversal of the graph using a tag set and the given bag.

val dfs : tbl:'v set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
val dfs_tag : tags:'v tag_set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
val bfs : tbl:'v set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
val bfs_tag : tags:'v tag_set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
val dijkstra : - tbl:'v set -> - ?dist:('e -> int) -> - graph:('v, 'e) t -> + 'v iter_once

One-shot traversal of the graph using a tag set and the given bag.

val dfs : tbl:'v set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
val dfs_tag : tags:'v tag_set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
val bfs : tbl:'v set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
val bfs_tag : tags:'v tag_set -> graph:('v, 'e) t -> 'v iter -> 'v iter_once
val dijkstra : + tbl:'v set -> + ?dist:('e -> int) -> + graph:('v, 'e) t -> 'v iter -> ('v * int * ('v, 'e) path) iter_once

Dijkstra algorithm, traverses a graph in increasing distance order. Yields each vertex paired with its distance to the set of initial vertices (the smallest distance needed to reach the node from the initial vertices).

  • parameter dist

    distance from origin of the edge to destination, must be strictly positive. Default is 1 for every edge.

val dijkstra_tag : - ?dist:('e -> int) -> - tags:'v tag_set -> - graph:('v, 'e) t -> + ?dist:('e -> int) -> + tags:'v tag_set -> + graph:('v, 'e) t -> 'v iter -> - ('v * int * ('v, 'e) path) iter_once
module Event : sig ... end
\ No newline at end of file + ('v * int * ('v, 'e) path) iter_once
module Event : sig ... end
diff --git a/dev/containers-data/CCGraph/index.html b/dev/containers-data/CCGraph/index.html index a95f23ab..123ed4a7 100644 --- a/dev/containers-data/CCGraph/index.html +++ b/dev/containers-data/CCGraph/index.html @@ -1,44 +1,44 @@ -CCGraph (containers-data.CCGraph)

Module CCGraph

Simple Graph Interface

A collections of algorithms on (mostly read-only) graph structures. The user provides her own graph structure as a ('v, 'e) CCGraph.t, where 'v is the type of vertices and 'e the type of edges (for instance, 'e = ('v * 'v) is perfectly fine in many cases).

Such a ('v, 'e) CCGraph.t structure is a record containing three functions: two relate edges to their origin and destination, and one maps vertices to their outgoing edges. This abstract notion of graph makes it possible to run the algorithms on any user-specific type that happens to have a graph structure.

Many graph algorithms here take an iterator of vertices as input. The helper module Iter contains basic functions for that, as does the iter library on opam. If the user only has a single vertex (e.g., for a topological sort from a given vertex), they can use Iter.return x to build a iter of one element.

status: unstable

Iter Helpers

type 'a iter = ('a -> unit) -> unit

A sequence of items of type 'a, possibly infinite

  • since 2.8
type 'a iter_once = 'a iter

Iter that should be used only once

  • since 2.8
exception Iter_once

Raised when a sequence meant to be used once is used several times.

module Iter : sig ... end

Interfaces for graphs

This interface is designed for oriented graphs with labels on edges

type ('v, 'e) t = 'v -> ('e * 'v) iter

Directed graph with vertices of type 'v and edges labeled with e'

type ('v, 'e) graph = ('v, 'e) t
val make : ('v -> ('e * 'v) iter) -> ('v, 'e) t

Make a graph by providing the children function.

type 'v tag_set = {
  1. get_tag : 'v -> bool;
  2. set_tag : 'v -> unit;
    (*

    Set tag for the given element

    *)
}

Tags

Mutable tags from values of type 'v to tags of type bool

type ('k, 'a) table = {
  1. mem : 'k -> bool;
  2. find : 'k -> 'a;
    (*
    • raises Not_found

      if element not added before

    *)
  3. add : 'k -> 'a -> unit;
    (*

    Erases previous binding

    *)
}

Table

Mutable table with keys 'k and values 'a

type 'a set = ('a, unit) table

Mutable set

val mk_table : - eq:('k -> 'k -> bool) -> - ?hash:('k -> int) -> +CCGraph (containers-data.CCGraph)

Module CCGraph

Simple Graph Interface

A collections of algorithms on (mostly read-only) graph structures. The user provides her own graph structure as a ('v, 'e) CCGraph.t, where 'v is the type of vertices and 'e the type of edges (for instance, 'e = ('v * 'v) is perfectly fine in many cases).

Such a ('v, 'e) CCGraph.t structure is a record containing three functions: two relate edges to their origin and destination, and one maps vertices to their outgoing edges. This abstract notion of graph makes it possible to run the algorithms on any user-specific type that happens to have a graph structure.

Many graph algorithms here take an iterator of vertices as input. The helper module Iter contains basic functions for that, as does the iter library on opam. If the user only has a single vertex (e.g., for a topological sort from a given vertex), they can use Iter.return x to build a iter of one element.

status: unstable

  • since 0.12

Iter Helpers

type 'a iter = ('a -> unit) -> unit

A sequence of items of type 'a, possibly infinite

  • since 2.8
type 'a iter_once = 'a iter

Iter that should be used only once

  • since 2.8
exception Iter_once

Raised when a sequence meant to be used once is used several times.

module Iter : sig ... end

Interfaces for graphs

This interface is designed for oriented graphs with labels on edges

type ('v, 'e) t = 'v -> ('e * 'v) iter

Directed graph with vertices of type 'v and edges labeled with e'

type ('v, 'e) graph = ('v, 'e) t
val make : ('v -> ('e * 'v) iter) -> ('v, 'e) t

Make a graph by providing the children function.

type 'v tag_set = {
  1. get_tag : 'v -> bool;
  2. set_tag : 'v -> unit;
    (*

    Set tag for the given element

    *)
}

Tags

Mutable tags from values of type 'v to tags of type bool

type ('k, 'a) table = {
  1. mem : 'k -> bool;
  2. find : 'k -> 'a;
    (*
    • raises Not_found

      if element not added before

    *)
  3. add : 'k -> 'a -> unit;
    (*

    Erases previous binding

    *)
}

Table

Mutable table with keys 'k and values 'a

type 'a set = ('a, unit) table

Mutable set

val mk_table : + eq:('k -> 'k -> bool) -> + ?hash:('k -> int) -> int -> - ('k, 'a) table

Default implementation for Table: a Hashtbl.t.

val mk_map : cmp:('k -> 'k -> int) -> unit -> ('k, 'a) table

Use a Map.S underneath.

Bags of vertices

type 'a bag = {
  1. push : 'a -> unit;
  2. is_empty : unit -> bool;
  3. pop : unit -> 'a;
    (*

    raises some exception is empty

    *)
}

Bag of elements of type 'a

val mk_queue : unit -> 'a bag
val mk_stack : unit -> 'a bag
val mk_heap : leq:('a -> 'a -> bool) -> 'a bag

mk_heap ~leq makes a priority queue where leq x y = true means that x is smaller than y and should be prioritary.

Traversals

module Traverse : sig ... end

Cycles

val is_dag : - tbl:'v set -> - eq:('v -> 'v -> bool) -> - graph:('v, _) t -> + ('k, 'a) table

Default implementation for Table: a Hashtbl.t.

val mk_map : cmp:('k -> 'k -> int) -> unit -> ('k, 'a) table

Use a Map.S underneath.

Bags of vertices

type 'a bag = {
  1. push : 'a -> unit;
  2. is_empty : unit -> bool;
  3. pop : unit -> 'a;
    (*

    raises some exception is empty

    *)
}

Bag of elements of type 'a

val mk_queue : unit -> 'a bag
val mk_stack : unit -> 'a bag
val mk_heap : leq:('a -> 'a -> bool) -> 'a bag

mk_heap ~leq makes a priority queue where leq x y = true means that x is smaller than y and should be prioritary.

Traversals

module Traverse : sig ... end

Cycles

val is_dag : + tbl:'v set -> + eq:('v -> 'v -> bool) -> + graph:('v, _) t -> 'v iter -> bool

is_dag ~graph vs returns true if the subset of graph reachable from vs is acyclic.

  • since 0.18

Topological Sort

exception Has_cycle
val topo_sort : - eq:('v -> 'v -> bool) -> - ?rev:bool -> - tbl:'v set -> - graph:('v, 'e) t -> + eq:('v -> 'v -> bool) -> + ?rev:bool -> + tbl:'v set -> + graph:('v, 'e) t -> 'v iter -> - 'v list

topo_sort ~graph seq returns a list of vertices l where each element of l is reachable from seq. The list is sorted in a way such that if v -> v' in the graph, then v comes before v' in the list (i.e. has a smaller index). Basically v -> v' means that v is smaller than v'. See wikipedia.

  • parameter eq

    equality predicate on vertices (default (=)).

  • parameter rev

    if true, the dependency relation is inverted (v -> v' means v' occurs before v).

  • raises Has_cycle

    if the graph is not a DAG.

val topo_sort_tag : - eq:('v -> 'v -> bool) -> - ?rev:bool -> - tags:'v tag_set -> - graph:('v, 'e) t -> + 'v list

topo_sort ~graph seq returns a list of vertices l where each element of l is reachable from seq. The list is sorted in a way such that if v -> v' in the graph, then v comes before v' in the list (i.e. has a smaller index). Basically v -> v' means that v is smaller than v'. See wikipedia.

  • parameter eq

    equality predicate on vertices (default (=)).

  • parameter rev

    if true, the dependency relation is inverted (v -> v' means v' occurs before v).

val topo_sort_tag : + eq:('v -> 'v -> bool) -> + ?rev:bool -> + tags:'v tag_set -> + graph:('v, 'e) t -> 'v iter -> - 'v list

Same as topo_sort but uses an explicit tag set.

  • raises Has_cycle

    if the graph is not a DAG.

Lazy Spanning Tree

module Lazy_tree : sig ... end
val spanning_tree : - tbl:'v set -> - graph:('v, 'e) t -> + 'v list

Same as topo_sort but uses an explicit tag set.

Lazy Spanning Tree

module Lazy_tree : sig ... end
val spanning_tree : + tbl:'v set -> + graph:('v, 'e) t -> 'v -> ('v, 'e) Lazy_tree.t

spanning_tree ~graph v computes a lazy spanning tree that has v as a root. The table tbl is used for the memoization part.

val spanning_tree_tag : - tags:'v tag_set -> - graph:('v, 'e) t -> + tags:'v tag_set -> + graph:('v, 'e) t -> 'v -> ('v, 'e) Lazy_tree.t

Strongly Connected Components

type 'v scc_state

Hidden state for scc.

val scc : - tbl:('v, 'v scc_state) table -> - graph:('v, 'e) t -> + tbl:('v, 'v scc_state) table -> + graph:('v, 'e) t -> 'v iter -> - 'v list iter_once

Strongly connected components reachable from the given vertices. Each component is a list of vertices that are all mutually reachable in the graph. The components are explored in a topological order (if C1 and C2 are components, and C1 points to C2, then C2 will be yielded before C1). Uses Tarjan's algorithm.

  • parameter tbl

    table used to map nodes to some hidden state.

  • raises Iter_once

    if the result is iterated on more than once.

Pretty printing in the DOT (graphviz) format

Example (print divisors from 42):

let open CCGraph in
+  'v list iter_once

Strongly connected components reachable from the given vertices. Each component is a list of vertices that are all mutually reachable in the graph. The components are explored in a topological order (if C1 and C2 are components, and C1 points to C2, then C2 will be yielded before C1). Uses Tarjan's algorithm.

  • parameter tbl

    table used to map nodes to some hidden state.

  • raises Iter_once

    if the result is iterated on more than once.

Pretty printing in the DOT (graphviz) format

Example (print divisors from 42):

let open CCGraph in
 let open Dot in
 with_out "/tmp/truc.dot"
   (fun out ->
      pp ~attrs_v:(fun i -> [`Label (string_of_int i)]) ~graph:divisors_graph out 42
   )
module Dot : sig ... end

Mutable Graph

type ('v, 'e) mut_graph = {
  1. graph : ('v, 'e) t;
  2. add_edge : 'v -> 'e -> 'v -> unit;
  3. remove : 'v -> unit;
}
val mk_mut_tbl : - eq:('v -> 'v -> bool) -> - ?hash:('v -> int) -> + eq:('v -> 'v -> bool) -> + ?hash:('v -> int) -> int -> - ('v, 'a) mut_graph

Make a new mutable graph from a Hashtbl. Edges are labelled with type 'a.

Immutable Graph

A classic implementation of a graph structure on totally ordered vertices, with unlabelled edges. The graph allows to add and remove edges and vertices, and to iterate on edges and vertices.

module type MAP = sig ... end
module Map (O : Stdlib.Map.OrderedType) : MAP with type vertex = O.t

Misc

val of_list : eq:('v -> 'v -> bool) -> ('v * 'v) list -> ('v, unit) t

of_list l makes a graph from a list of pairs of vertices. Each pair (a,b) is an edge from a to b.

  • parameter eq

    equality used to compare vertices.

val of_hashtbl : ('v, 'v list) Stdlib.Hashtbl.t -> ('v, unit) t

of_hashtbl tbl makes a graph from a hashtable that maps vertices to lists of children.

val of_fun : ('v -> 'v list) -> ('v, unit) t

of_fun f makes a graph out of a function that maps a vertex to the list of its children. The function is assumed to be deterministic.

val divisors_graph : (int, unit) t

n points to all its strict divisors.

\ No newline at end of file + ('v, 'a) mut_graph

Make a new mutable graph from a Hashtbl. Edges are labelled with type 'a.

Immutable Graph

A classic implementation of a graph structure on totally ordered vertices, with unlabelled edges. The graph allows to add and remove edges and vertices, and to iterate on edges and vertices.

module type MAP = sig ... end
module Map (O : Stdlib.Map.OrderedType) : MAP with type vertex = O.t

Misc

val of_list : eq:('v -> 'v -> bool) -> ('v * 'v) list -> ('v, unit) t

of_list l makes a graph from a list of pairs of vertices. Each pair (a,b) is an edge from a to b.

  • parameter eq

    equality used to compare vertices.

val of_hashtbl : ('v, 'v list) Stdlib.Hashtbl.t -> ('v, unit) t

of_hashtbl tbl makes a graph from a hashtable that maps vertices to lists of children.

val of_fun : ('v -> 'v list) -> ('v, unit) t

of_fun f makes a graph out of a function that maps a vertex to the list of its children. The function is assumed to be deterministic.

val divisors_graph : (int, unit) t

n points to all its strict divisors.

diff --git a/dev/containers-data/CCGraph/module-type-MAP/index.html b/dev/containers-data/CCGraph/module-type-MAP/index.html index 7e82c700..4cb50bc7 100644 --- a/dev/containers-data/CCGraph/module-type-MAP/index.html +++ b/dev/containers-data/CCGraph/module-type-MAP/index.html @@ -1,2 +1,2 @@ -MAP (containers-data.CCGraph.MAP)

Module type CCGraph.MAP

type vertex
type 'a t
val as_graph : 'a t -> (vertex, 'a) graph

Graph view of the map.

val empty : 'a t
val add_edge : vertex -> 'a -> vertex -> 'a t -> 'a t
val remove_edge : vertex -> vertex -> 'a t -> 'a t
val add : vertex -> 'a t -> 'a t

Add a vertex, possibly with no outgoing edge.

val remove : vertex -> 'a t -> 'a t

Remove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.

val union : 'a t -> 'a t -> 'a t
val vertices : _ t -> vertex iter
val vertices_l : _ t -> vertex list
val of_list : (vertex * 'a * vertex) list -> 'a t
val add_list : (vertex * 'a * vertex) list -> 'a t -> 'a t
val to_list : 'a t -> (vertex * 'a * vertex) list
val of_iter : (vertex * 'a * vertex) iter -> 'a t
  • since 2.8
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
  • since 2.8
val to_iter : 'a t -> (vertex * 'a * vertex) iter
  • since 2.8
\ No newline at end of file +MAP (containers-data.CCGraph.MAP)

Module type CCGraph.MAP

type vertex
type 'a t
val as_graph : 'a t -> (vertex, 'a) graph

Graph view of the map.

val empty : 'a t
val add_edge : vertex -> 'a -> vertex -> 'a t -> 'a t
val remove_edge : vertex -> vertex -> 'a t -> 'a t
val add : vertex -> 'a t -> 'a t

Add a vertex, possibly with no outgoing edge.

val remove : vertex -> 'a t -> 'a t

Remove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.

val union : 'a t -> 'a t -> 'a t
val vertices : _ t -> vertex iter
val vertices_l : _ t -> vertex list
val of_list : (vertex * 'a * vertex) list -> 'a t
val add_list : (vertex * 'a * vertex) list -> 'a t -> 'a t
val to_list : 'a t -> (vertex * 'a * vertex) list
val of_iter : (vertex * 'a * vertex) iter -> 'a t
  • since 2.8
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
  • since 2.8
val to_iter : 'a t -> (vertex * 'a * vertex) iter
  • since 2.8
diff --git a/dev/containers-data/CCHashSet/Make/argument-1-E/index.html b/dev/containers-data/CCHashSet/Make/argument-1-E/index.html index e0c7bb53..330b626d 100644 --- a/dev/containers-data/CCHashSet/Make/argument-1-E/index.html +++ b/dev/containers-data/CCHashSet/Make/argument-1-E/index.html @@ -1,2 +1,2 @@ -E (containers-data.CCHashSet.Make.E)

Parameter Make.E

type t
val equal : t -> t -> bool
val hash : t -> int

Positive value

\ No newline at end of file +E (containers-data.CCHashSet.Make.E)

Parameter Make.E

type t
val equal : t -> t -> bool
val hash : t -> int

Positive value

diff --git a/dev/containers-data/CCHashSet/Make/index.html b/dev/containers-data/CCHashSet/Make/index.html index 3c0dd34f..a408b48c 100644 --- a/dev/containers-data/CCHashSet/Make/index.html +++ b/dev/containers-data/CCHashSet/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCHashSet.Make)

Module CCHashSet.Make

Parameters

module E : ELEMENT

Signature

type t
type elt = E.t
val create : int -> t

create n makes a new set with the given capacity n.

val singleton : elt -> t

singleton x is the singleton {x}.

val clear : t -> unit

clear s removes all elements from s.

val copy : t -> t

Fresh copy.

val copy_into : into:t -> t -> unit

copy_into ~into s copies all elements of s into into.

val insert : t -> elt -> unit

insert s x adds x into s.

val remove : t -> elt -> unit

Remove the element, if it were in there.

val cardinal : t -> int

cardinal s returns the number of elements in s.

val mem : t -> elt -> bool

mem s x returns true iff x is in s.

val find_exn : t -> elt -> elt

find_exn s x returns y if x and y are equal, and mem s y.

  • raises Not_found

    if x not in s.

val find : t -> elt -> elt option

Safe version of find_exn.

val inter : t -> t -> t

inter a b returns a โˆฉ b.

val inter_mut : into:t -> t -> unit

inter_mut ~into a changes into into a โˆฉ into.

val union : t -> t -> t

union a b returns a โˆช b.

val union_mut : into:t -> t -> unit

union_mut ~into a changes into into a โˆช into.

val diff : t -> t -> t

diff a b returns a - b.

val subset : t -> t -> bool

subset a b returns true if all elements of a are in b.

val equal : t -> t -> bool

equal a b is extensional equality (a and b have the same elements).

val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val iter : (elt -> unit) -> t -> unit

Iterate on values.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

Fold on values.

val elements : t -> elt list

List of elements.

val of_list : elt list -> t
val to_iter : t -> elt iter
val of_iter : elt iter -> t
val add_iter : t -> elt iter -> unit
val pp : ?pp_sep:unit printer -> elt printer -> t printer

pp pp_elt returns a set printer, given a printer for individual elements.

\ No newline at end of file +Make (containers-data.CCHashSet.Make)

Module CCHashSet.Make

Parameters

module E : ELEMENT

Signature

type t
type elt = E.t
val create : int -> t

create n makes a new set with the given capacity n.

val singleton : elt -> t

singleton x is the singleton {x}.

val clear : t -> unit

clear s removes all elements from s.

val copy : t -> t

Fresh copy.

val copy_into : into:t -> t -> unit

copy_into ~into s copies all elements of s into into.

val insert : t -> elt -> unit

insert s x adds x into s.

val remove : t -> elt -> unit

Remove the element, if it were in there.

val cardinal : t -> int

cardinal s returns the number of elements in s.

val mem : t -> elt -> bool

mem s x returns true iff x is in s.

val find_exn : t -> elt -> elt

find_exn s x returns y if x and y are equal, and mem s y.

  • raises Not_found

    if x not in s.

val find : t -> elt -> elt option

Safe version of find_exn.

val inter : t -> t -> t

inter a b returns a โˆฉ b.

val inter_mut : into:t -> t -> unit

inter_mut ~into a changes into into a โˆฉ into.

val union : t -> t -> t

union a b returns a โˆช b.

val union_mut : into:t -> t -> unit

union_mut ~into a changes into into a โˆช into.

val diff : t -> t -> t

diff a b returns a - b.

val subset : t -> t -> bool

subset a b returns true if all elements of a are in b.

val equal : t -> t -> bool

equal a b is extensional equality (a and b have the same elements).

val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val iter : (elt -> unit) -> t -> unit

Iterate on values.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

Fold on values.

val elements : t -> elt list

List of elements.

val of_list : elt list -> t
val to_iter : t -> elt iter
val of_iter : elt iter -> t
val add_iter : t -> elt iter -> unit
val pp : ?pp_sep:unit printer -> elt printer -> t printer

pp pp_elt returns a set printer, given a printer for individual elements.

diff --git a/dev/containers-data/CCHashSet/index.html b/dev/containers-data/CCHashSet/index.html index aae4a0c3..86da1c2a 100644 --- a/dev/containers-data/CCHashSet/index.html +++ b/dev/containers-data/CCHashSet/index.html @@ -1,2 +1,2 @@ -CCHashSet (containers-data.CCHashSet)

Module CCHashSet

Mutable Set

status: unstable

type 'a iter = ('a -> unit) -> unit
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type S = sig ... end
module type ELEMENT = sig ... end
module Make (E : ELEMENT) : S with type elt = E.t
\ No newline at end of file +CCHashSet (containers-data.CCHashSet)

Module CCHashSet

Mutable Set

status: unstable

type 'a iter = ('a -> unit) -> unit
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type S = sig ... end
module type ELEMENT = sig ... end
module Make (E : ELEMENT) : S with type elt = E.t
diff --git a/dev/containers-data/CCHashSet/module-type-ELEMENT/index.html b/dev/containers-data/CCHashSet/module-type-ELEMENT/index.html index 9feac93c..9a615bbc 100644 --- a/dev/containers-data/CCHashSet/module-type-ELEMENT/index.html +++ b/dev/containers-data/CCHashSet/module-type-ELEMENT/index.html @@ -1,2 +1,2 @@ -ELEMENT (containers-data.CCHashSet.ELEMENT)

Module type CCHashSet.ELEMENT

type t
val equal : t -> t -> bool
val hash : t -> int

Positive value

\ No newline at end of file +ELEMENT (containers-data.CCHashSet.ELEMENT)

Module type CCHashSet.ELEMENT

type t
val equal : t -> t -> bool
val hash : t -> int

Positive value

diff --git a/dev/containers-data/CCHashSet/module-type-S/index.html b/dev/containers-data/CCHashSet/module-type-S/index.html index 2165826d..2976884e 100644 --- a/dev/containers-data/CCHashSet/module-type-S/index.html +++ b/dev/containers-data/CCHashSet/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCHashSet.S)

Module type CCHashSet.S

type t
type elt
val create : int -> t

create n makes a new set with the given capacity n.

val singleton : elt -> t

singleton x is the singleton {x}.

val clear : t -> unit

clear s removes all elements from s.

val copy : t -> t

Fresh copy.

val copy_into : into:t -> t -> unit

copy_into ~into s copies all elements of s into into.

val insert : t -> elt -> unit

insert s x adds x into s.

val remove : t -> elt -> unit

Remove the element, if it were in there.

val cardinal : t -> int

cardinal s returns the number of elements in s.

val mem : t -> elt -> bool

mem s x returns true iff x is in s.

val find_exn : t -> elt -> elt

find_exn s x returns y if x and y are equal, and mem s y.

  • raises Not_found

    if x not in s.

val find : t -> elt -> elt option

Safe version of find_exn.

val inter : t -> t -> t

inter a b returns a โˆฉ b.

val inter_mut : into:t -> t -> unit

inter_mut ~into a changes into into a โˆฉ into.

val union : t -> t -> t

union a b returns a โˆช b.

val union_mut : into:t -> t -> unit

union_mut ~into a changes into into a โˆช into.

val diff : t -> t -> t

diff a b returns a - b.

val subset : t -> t -> bool

subset a b returns true if all elements of a are in b.

val equal : t -> t -> bool

equal a b is extensional equality (a and b have the same elements).

val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val iter : (elt -> unit) -> t -> unit

Iterate on values.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

Fold on values.

val elements : t -> elt list

List of elements.

val of_list : elt list -> t
val to_iter : t -> elt iter
val of_iter : elt iter -> t
val add_iter : t -> elt iter -> unit
val pp : ?pp_sep:unit printer -> elt printer -> t printer

pp pp_elt returns a set printer, given a printer for individual elements.

\ No newline at end of file +S (containers-data.CCHashSet.S)

Module type CCHashSet.S

type t
type elt
val create : int -> t

create n makes a new set with the given capacity n.

val singleton : elt -> t

singleton x is the singleton {x}.

val clear : t -> unit

clear s removes all elements from s.

val copy : t -> t

Fresh copy.

val copy_into : into:t -> t -> unit

copy_into ~into s copies all elements of s into into.

val insert : t -> elt -> unit

insert s x adds x into s.

val remove : t -> elt -> unit

Remove the element, if it were in there.

val cardinal : t -> int

cardinal s returns the number of elements in s.

val mem : t -> elt -> bool

mem s x returns true iff x is in s.

val find_exn : t -> elt -> elt

find_exn s x returns y if x and y are equal, and mem s y.

  • raises Not_found

    if x not in s.

val find : t -> elt -> elt option

Safe version of find_exn.

val inter : t -> t -> t

inter a b returns a โˆฉ b.

val inter_mut : into:t -> t -> unit

inter_mut ~into a changes into into a โˆฉ into.

val union : t -> t -> t

union a b returns a โˆช b.

val union_mut : into:t -> t -> unit

union_mut ~into a changes into into a โˆช into.

val diff : t -> t -> t

diff a b returns a - b.

val subset : t -> t -> bool

subset a b returns true if all elements of a are in b.

val equal : t -> t -> bool

equal a b is extensional equality (a and b have the same elements).

val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val iter : (elt -> unit) -> t -> unit

Iterate on values.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

Fold on values.

val elements : t -> elt list

List of elements.

val of_list : elt list -> t
val to_iter : t -> elt iter
val of_iter : elt iter -> t
val add_iter : t -> elt iter -> unit
val pp : ?pp_sep:unit printer -> elt printer -> t printer

pp pp_elt returns a set printer, given a printer for individual elements.

diff --git a/dev/containers-data/CCHashTrie/Make/argument-1-K/index.html b/dev/containers-data/CCHashTrie/Make/argument-1-K/index.html index 24619536..df95937b 100644 --- a/dev/containers-data/CCHashTrie/Make/argument-1-K/index.html +++ b/dev/containers-data/CCHashTrie/Make/argument-1-K/index.html @@ -1,2 +1,2 @@ -K (containers-data.CCHashTrie.Make.K)

Parameter Make.K

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +K (containers-data.CCHashTrie.Make.K)

Parameter Make.K

type t
val equal : t -> t -> bool
val hash : t -> int
diff --git a/dev/containers-data/CCHashTrie/Make/index.html b/dev/containers-data/CCHashTrie/Make/index.html index 604e25c1..571dc12a 100644 --- a/dev/containers-data/CCHashTrie/Make/index.html +++ b/dev/containers-data/CCHashTrie/Make/index.html @@ -1,7 +1,7 @@ -Make (containers-data.CCHashTrie.Make)

Module CCHashTrie.Make

Functors

Parameters

module K : KEY

Signature

type key = K.t
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val add : key -> 'a -> 'a t -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if key not present.

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

Remove the key, if present.

val update : key -> f:('a option -> 'a option) -> 'a t -> 'a t

update k ~f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a t

add_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).

  • raises Transient.Frozen

    if id is frozen.

val remove_mut : id:Transient.t -> key -> 'a t -> 'a t

Same as remove, but modifies in place whenever possible.

  • raises Transient.Frozen

    if id is frozen.

val update_mut : - id:Transient.t -> +Make (containers-data.CCHashTrie.Make)

Module CCHashTrie.Make

Functors

Parameters

module K : KEY

Signature

type key = K.t
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val add : key -> 'a -> 'a t -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if key not present.

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

Remove the key, if present.

val update : key -> f:('a option -> 'a option) -> 'a t -> 'a t

update k ~f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a t

add_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).

val remove_mut : id:Transient.t -> key -> 'a t -> 'a t

Same as remove, but modifies in place whenever possible.

val update_mut : + id:Transient.t -> key -> - f:('a option -> 'a option) -> + f:('a option -> 'a option) -> 'a t -> - 'a t

Same as update but with mutability.

  • raises Transient.Frozen

    if id is frozen.

val cardinal : _ t -> int
val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if not pair was found.

val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
Conversions
val to_list : 'a t -> (key * 'a) list
val add_list : 'a t -> (key * 'a) list -> 'a t
val add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_list : (key * 'a) list -> 'a t
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val add_iter_mut : id:Transient.t -> 'a t -> (key * 'a) iter -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
IO
val pp : key printer -> 'a printer -> 'a t printer

Renamed from val print.

  • since 2.0
val as_tree : 'a t -> [ `L of int * (key * 'a) list | `N ] ktree

For debugging purpose: explore the structure of the tree, with `L (h,l) being a leaf (with shared hash h) and `N an inner node.

\ No newline at end of file + 'a t

Same as update but with mutability.

val cardinal : _ t -> int
val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if not pair was found.

val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
Conversions
val to_list : 'a t -> (key * 'a) list
val add_list : 'a t -> (key * 'a) list -> 'a t
val add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_list : (key * 'a) list -> 'a t
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val add_iter_mut : id:Transient.t -> 'a t -> (key * 'a) iter -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
IO
val pp : key printer -> 'a printer -> 'a t printer

Renamed from val print.

  • since 2.0
val as_tree : 'a t -> [ `L of int * (key * 'a) list | `N ] ktree

For debugging purpose: explore the structure of the tree, with `L (h,l) being a leaf (with shared hash h) and `N an inner node.

diff --git a/dev/containers-data/CCHashTrie/Transient/index.html b/dev/containers-data/CCHashTrie/Transient/index.html index fa81ff95..e3e1a982 100644 --- a/dev/containers-data/CCHashTrie/Transient/index.html +++ b/dev/containers-data/CCHashTrie/Transient/index.html @@ -1,2 +1,2 @@ -Transient (containers-data.CCHashTrie.Transient)

Module CCHashTrie.Transient

Transient Identifiers

type t

Identifiers for transient modifications. A transient modification is uniquely identified by a Transient.t. Once Transient.freeze r is called, r cannot be used to modify the structure again.

val create : unit -> t

Create a new, active ID.

val equal : t -> t -> bool

Equality between IDs.

val frozen : t -> bool

frozen i returns true if freeze i was called before. In this case, the ID cannot be used for modifications again.

val active : t -> bool

active i is not (frozen i).

val freeze : t -> unit

freeze i makes i unusable for new modifications. The values created with i will now be immutable.

val with_ : (t -> 'a) -> 'a

with_ f creates a transient ID i, calls f i, freezes the ID i and returns the result of f i.

exception Frozen

Raised when a frozen ID is used.

\ No newline at end of file +Transient (containers-data.CCHashTrie.Transient)

Module CCHashTrie.Transient

Transient Identifiers

type t

Identifiers for transient modifications. A transient modification is uniquely identified by a Transient.t. Once Transient.freeze r is called, r cannot be used to modify the structure again.

val create : unit -> t

Create a new, active ID.

val equal : t -> t -> bool

Equality between IDs.

val frozen : t -> bool

frozen i returns true if freeze i was called before. In this case, the ID cannot be used for modifications again.

val active : t -> bool

active i is not (frozen i).

val freeze : t -> unit

freeze i makes i unusable for new modifications. The values created with i will now be immutable.

val with_ : (t -> 'a) -> 'a

with_ f creates a transient ID i, calls f i, freezes the ID i and returns the result of f i.

exception Frozen

Raised when a frozen ID is used.

diff --git a/dev/containers-data/CCHashTrie/index.html b/dev/containers-data/CCHashTrie/index.html index 631cc2cc..2526615f 100644 --- a/dev/containers-data/CCHashTrie/index.html +++ b/dev/containers-data/CCHashTrie/index.html @@ -1,2 +1,2 @@ -CCHashTrie (containers-data.CCHashTrie)

Module CCHashTrie

Hash Tries

Trie indexed by the hash of the keys, where the branching factor is fixed. The goal is to have a quite efficient functional structure with fast update and access if the hash function is good. The trie is not binary, to improve cache locality and decrease depth.

Preliminary benchmarks (see the "tbl" section of benchmarks) tend to show that this type is quite efficient for small data sets.

status: unstable

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ]
module Transient : sig ... end
module type S = sig ... end
module type KEY = sig ... end
module Make (K : KEY) : S with type key = K.t
\ No newline at end of file +CCHashTrie (containers-data.CCHashTrie)

Module CCHashTrie

Hash Tries

Trie indexed by the hash of the keys, where the branching factor is fixed. The goal is to have a quite efficient functional structure with fast update and access if the hash function is good. The trie is not binary, to improve cache locality and decrease depth.

Preliminary benchmarks (see the "tbl" section of benchmarks) tend to show that this type is quite efficient for small data sets.

status: unstable

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ]
module Transient : sig ... end
module type S = sig ... end
module type KEY = sig ... end
module Make (K : KEY) : S with type key = K.t
diff --git a/dev/containers-data/CCHashTrie/module-type-KEY/index.html b/dev/containers-data/CCHashTrie/module-type-KEY/index.html index 57190413..4e905777 100644 --- a/dev/containers-data/CCHashTrie/module-type-KEY/index.html +++ b/dev/containers-data/CCHashTrie/module-type-KEY/index.html @@ -1,2 +1,2 @@ -KEY (containers-data.CCHashTrie.KEY)

Module type CCHashTrie.KEY

Type for keys

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +KEY (containers-data.CCHashTrie.KEY)

Module type CCHashTrie.KEY

Type for keys

type t
val equal : t -> t -> bool
val hash : t -> int
diff --git a/dev/containers-data/CCHashTrie/module-type-S/index.html b/dev/containers-data/CCHashTrie/module-type-S/index.html index 9e37163c..2aaa183c 100644 --- a/dev/containers-data/CCHashTrie/module-type-S/index.html +++ b/dev/containers-data/CCHashTrie/module-type-S/index.html @@ -1,7 +1,7 @@ -S (containers-data.CCHashTrie.S)

Module type CCHashTrie.S

Signature

type key
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val add : key -> 'a -> 'a t -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if key not present.

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

Remove the key, if present.

val update : key -> f:('a option -> 'a option) -> 'a t -> 'a t

update k ~f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a t

add_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).

  • raises Transient.Frozen

    if id is frozen.

val remove_mut : id:Transient.t -> key -> 'a t -> 'a t

Same as remove, but modifies in place whenever possible.

  • raises Transient.Frozen

    if id is frozen.

val update_mut : - id:Transient.t -> +S (containers-data.CCHashTrie.S)

Module type CCHashTrie.S

Signature

type key
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val add : key -> 'a -> 'a t -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if key not present.

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

Remove the key, if present.

val update : key -> f:('a option -> 'a option) -> 'a t -> 'a t

update k ~f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a t

add_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).

val remove_mut : id:Transient.t -> key -> 'a t -> 'a t

Same as remove, but modifies in place whenever possible.

val update_mut : + id:Transient.t -> key -> - f:('a option -> 'a option) -> + f:('a option -> 'a option) -> 'a t -> - 'a t

Same as update but with mutability.

  • raises Transient.Frozen

    if id is frozen.

val cardinal : _ t -> int
val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if not pair was found.

val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
Conversions
val to_list : 'a t -> (key * 'a) list
val add_list : 'a t -> (key * 'a) list -> 'a t
val add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_list : (key * 'a) list -> 'a t
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val add_iter_mut : id:Transient.t -> 'a t -> (key * 'a) iter -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
IO
val pp : key printer -> 'a printer -> 'a t printer

Renamed from val print.

  • since 2.0
val as_tree : 'a t -> [ `L of int * (key * 'a) list | `N ] ktree

For debugging purpose: explore the structure of the tree, with `L (h,l) being a leaf (with shared hash h) and `N an inner node.

\ No newline at end of file + 'a t

Same as update but with mutability.

val cardinal : _ t -> int
val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if not pair was found.

val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
Conversions
val to_list : 'a t -> (key * 'a) list
val add_list : 'a t -> (key * 'a) list -> 'a t
val add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_list : (key * 'a) list -> 'a t
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val add_iter_mut : id:Transient.t -> 'a t -> (key * 'a) iter -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a t
  • raises Frozen

    if the ID is frozen.

val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
IO
val pp : key printer -> 'a printer -> 'a t printer

Renamed from val print.

  • since 2.0
val as_tree : 'a t -> [ `L of int * (key * 'a) list | `N ] ktree

For debugging purpose: explore the structure of the tree, with `L (h,l) being a leaf (with shared hash h) and `N an inner node.

diff --git a/dev/containers-data/CCHet/Key/index.html b/dev/containers-data/CCHet/Key/index.html index 9963d8b5..c203b761 100644 --- a/dev/containers-data/CCHet/Key/index.html +++ b/dev/containers-data/CCHet/Key/index.html @@ -1,2 +1,2 @@ -Key (containers-data.CCHet.Key)

Module CCHet.Key

Keys with a type witness.

type 'a t

A key of type 'a t is used to access the portion of the map or table that associates keys of type 'a to values.

val create : unit -> 'a t

Make a new key. This is generative, so calling create () twice with the same return type will produce incompatible keys that cannot see each other's bindings.

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

Compare two keys that have compatible types.

\ No newline at end of file +Key (containers-data.CCHet.Key)

Module CCHet.Key

Keys with a type witness.

type 'a t

A key of type 'a t is used to access the portion of the map or table that associates keys of type 'a to values.

val create : unit -> 'a t

Make a new key. This is generative, so calling create () twice with the same return type will produce incompatible keys that cannot see each other's bindings.

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

Compare two keys that have compatible types.

diff --git a/dev/containers-data/CCHet/Map/index.html b/dev/containers-data/CCHet/Map/index.html index 9a4453e1..af4cddc4 100644 --- a/dev/containers-data/CCHet/Map/index.html +++ b/dev/containers-data/CCHet/Map/index.html @@ -1,2 +1,2 @@ -Map (containers-data.CCHet.Map)

Module CCHet.Map

Immutable map

type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
  • raises Not_found

    if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file +Map (containers-data.CCHet.Map)

Module CCHet.Map

Immutable map

type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
  • raises Not_found

    if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
diff --git a/dev/containers-data/CCHet/Tbl/index.html b/dev/containers-data/CCHet/Tbl/index.html index 18276aa4..6058b6cb 100644 --- a/dev/containers-data/CCHet/Tbl/index.html +++ b/dev/containers-data/CCHet/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (containers-data.CCHet.Tbl)

Module CCHet.Tbl

Imperative table indexed by Key

type t
val create : ?size:int -> unit -> t
val mem : t -> _ Key.t -> bool
val add : t -> 'a Key.t -> 'a -> unit
val remove : t -> _ Key.t -> unit
val length : t -> int
val find : t -> 'a Key.t -> 'a option
val clear : t -> unit

clear the table (like Hashtbl.clear)

  • since 3.11
val reset : t -> unit

reset the table (like Hashtbl.reset)

  • since 3.11
val find_exn : t -> 'a Key.t -> 'a
  • raises Not_found

    if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> unit
val add_list : t -> pair list -> unit
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file +Tbl (containers-data.CCHet.Tbl)

Module CCHet.Tbl

Imperative table indexed by Key

type t
val create : ?size:int -> unit -> t
val mem : t -> _ Key.t -> bool
val add : t -> 'a Key.t -> 'a -> unit
val remove : t -> _ Key.t -> unit
val length : t -> int
val find : t -> 'a Key.t -> 'a option
val clear : t -> unit

clear the table (like Hashtbl.clear)

  • since 3.11
val reset : t -> unit

reset the table (like Hashtbl.reset)

  • since 3.11
val find_exn : t -> 'a Key.t -> 'a
  • raises Not_found

    if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> unit
val add_list : t -> pair list -> unit
val of_list : pair list -> t
val to_list : t -> pair list
diff --git a/dev/containers-data/CCHet/index.html b/dev/containers-data/CCHet/index.html index 09991041..18000c5c 100644 --- a/dev/containers-data/CCHet/index.html +++ b/dev/containers-data/CCHet/index.html @@ -1,2 +1,2 @@ -CCHet (containers-data.CCHet)

Module CCHet

Associative containers with Heterogeneous Values

This is similar to CCMixtbl, but the injection is directly used as a key.

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module Key : sig ... end

Keys with a type witness.

type pair =
  1. | Pair : 'a Key.t * 'a -> pair
module Tbl : sig ... end
module Map : sig ... end
\ No newline at end of file +CCHet (containers-data.CCHet)

Module CCHet

Associative containers with Heterogeneous Values

This is similar to CCMixtbl, but the injection is directly used as a key.

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module Key : sig ... end

Keys with a type witness.

type pair =
  1. | Pair : 'a Key.t * 'a -> pair
module Tbl : sig ... end
module Map : sig ... end
diff --git a/dev/containers-data/CCImmutArray/index.html b/dev/containers-data/CCImmutArray/index.html index 0c9886e6..7d811db8 100644 --- a/dev/containers-data/CCImmutArray/index.html +++ b/dev/containers-data/CCImmutArray/index.html @@ -1,7 +1,7 @@ -CCImmutArray (containers-data.CCImmutArray)

Module CCImmutArray

Immutable Arrays

Purely functional use of arrays. Update is costly, but reads are very fast. Sadly, it is not possible to make this type covariant without using black magic.

type 'a t

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val length : _ t -> int
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x.

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

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

  • raises Invalid_argument

    if n < 0.

val get : 'a t -> int -> 'a

Access the element.

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy.

val sub : 'a t -> int -> int -> 'a t

sub a start len returns a fresh array of length len, containing the elements from start to pstart + len - 1 of array a.

Raises Invalid_argument "Array.sub" if start and len do not designate a valid subarray of a; that is, if start < 0, or len < 0, or start + len > Array.length a.

  • since 1.5
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> +CCImmutArray (containers-data.CCImmutArray)

Module CCImmutArray

Immutable Arrays

Purely functional use of arrays. Update is costly, but reads are very fast. Sadly, it is not possible to make this type covariant without using black magic.

  • since 0.17
type 'a t

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val length : _ t -> int
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x.

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

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

  • raises Invalid_argument

    if n < 0.

val get : 'a t -> int -> 'a

Access the element.

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy.

val sub : 'a t -> int -> int -> 'a t

sub a start len returns a fresh array of length len, containing the elements from start to pstart + len - 1 of array a.

Raises Invalid_argument "Array.sub" if start and len do not designate a valid subarray of a; that is, if start < 0, or len < 0, or start + len > Array.length a.

  • since 1.5
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> 'a printer -> - 'a t printer

pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

\ No newline at end of file + 'a t printer

pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

diff --git a/dev/containers-data/CCIntMap/index.html b/dev/containers-data/CCIntMap/index.html index 5d691141..a71b334c 100644 --- a/dev/containers-data/CCIntMap/index.html +++ b/dev/containers-data/CCIntMap/index.html @@ -1,6 +1,6 @@ -CCIntMap (containers-data.CCIntMap)

Module CCIntMap

Map specialized for Int keys

status: stable

type +'a t
val empty : 'a t
val is_empty : _ t -> bool

Is the map empty?

  • since 2.3
val singleton : int -> 'a -> 'a t
val doubleton : int -> 'a -> int -> 'a -> 'a t
val mem : int -> _ t -> bool
val find : int -> 'a t -> 'a option
val find_exn : int -> 'a t -> 'a

Same as find but unsafe.

  • raises Not_found

    if key is not present.

val add : int -> 'a -> 'a t -> 'a t
val remove : int -> 'a t -> 'a t
val equal : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal ~eq a b checks whether a and b have the same set of pairs (key, value), comparing values with eq.

  • since 0.13
val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

Total order between maps; the precise order is unspecified.

  • since 0.13
val update : int -> ('a option -> 'a option) -> 'a t -> 'a t
val filter : (int -> 'a -> bool) -> 'a t -> 'a t

Filter values using the given predicate

  • since 2.3
val filter_map : (int -> 'a -> 'b option) -> 'a t -> 'b t

Filter-map values using the given function

  • since 2.3
val cardinal : _ t -> int

Number of bindings in the map. Linear time.

val iter : (int -> 'a -> unit) -> 'a t -> unit
val fold : (int -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t
  • since 0.17
val choose : 'a t -> (int * 'a) option
val choose_exn : 'a t -> int * 'a
  • raises Not_found

    if not pair was found.

val union : (int -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val inter : (int -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val merge : - f:(int -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> +CCIntMap (containers-data.CCIntMap)

Module CCIntMap

Map specialized for Int keys

status: stable

  • since 0.10
type +'a t
val empty : 'a t
val is_empty : _ t -> bool

Is the map empty?

  • since 2.3
val singleton : int -> 'a -> 'a t
val doubleton : int -> 'a -> int -> 'a -> 'a t
val mem : int -> _ t -> bool
val find : int -> 'a t -> 'a option
val find_exn : int -> 'a t -> 'a

Same as find but unsafe.

  • raises Not_found

    if key is not present.

val add : int -> 'a -> 'a t -> 'a t
val remove : int -> 'a t -> 'a t
val equal : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal ~eq a b checks whether a and b have the same set of pairs (key, value), comparing values with eq.

  • since 0.13
val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

Total order between maps; the precise order is unspecified.

  • since 0.13
val update : int -> ('a option -> 'a option) -> 'a t -> 'a t
val filter : (int -> 'a -> bool) -> 'a t -> 'a t

Filter values using the given predicate

  • since 2.3
val filter_map : (int -> 'a -> 'b option) -> 'a t -> 'b t

Filter-map values using the given function

  • since 2.3
val cardinal : _ t -> int

Number of bindings in the map. Linear time.

val iter : (int -> 'a -> unit) -> 'a t -> unit
val fold : (int -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t
  • since 0.17
val choose : 'a t -> (int * 'a) option
val choose_exn : 'a t -> int * 'a
  • raises Not_found

    if not pair was found.

val union : (int -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val inter : (int -> 'a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val merge : + f:(int -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> 'a t -> 'b t -> - 'c t

merge ~f m1 m2 merges m1 and m2 together, calling f once on every key that occurs in at least one of m1 and m2. if f k binding = Some c then k -> c is part of the result, else k is not part of the result.

  • since 2.3

Whole-collection operations

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val add_list : 'a t -> (int * 'a) list -> 'a t
val of_list : (int * 'a) list -> 'a t
val to_list : 'a t -> (int * 'a) list
val add_iter : 'a t -> (int * 'a) iter -> 'a t
val of_iter : (int * 'a) iter -> 'a t
val to_iter : 'a t -> (int * 'a) iter
val keys : _ t -> int iter
val values : 'a t -> 'a iter
val add_gen : 'a t -> (int * 'a) gen -> 'a t
  • since 0.13
val of_gen : (int * 'a) gen -> 'a t
  • since 0.13
val to_gen : 'a t -> (int * 'a) gen
  • since 0.13
val add_seq : 'a t -> (int * 'a) Stdlib.Seq.t -> 'a t
  • since 3.0
val of_seq : (int * 'a) Stdlib.Seq.t -> 'a t
  • since 3.0
val to_seq : 'a t -> (int * 'a) Stdlib.Seq.t
  • since 3.0
type 'a tree = unit -> [ `Nil | `Node of 'a * 'a tree list ]
val as_tree : 'a t -> [ `Node of int * int | `Leaf of int * 'a ] tree

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : 'a printer -> 'a t printer
  • since 0.13

Helpers

\ No newline at end of file + 'c t

merge ~f m1 m2 merges m1 and m2 together, calling f once on every key that occurs in at least one of m1 and m2. if f k binding = Some c then k -> c is part of the result, else k is not part of the result.

  • since 2.3

Whole-collection operations

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val add_list : 'a t -> (int * 'a) list -> 'a t
val of_list : (int * 'a) list -> 'a t
val to_list : 'a t -> (int * 'a) list
val add_iter : 'a t -> (int * 'a) iter -> 'a t
val of_iter : (int * 'a) iter -> 'a t
val to_iter : 'a t -> (int * 'a) iter
val keys : _ t -> int iter
val values : 'a t -> 'a iter
val add_gen : 'a t -> (int * 'a) gen -> 'a t
  • since 0.13
val of_gen : (int * 'a) gen -> 'a t
  • since 0.13
val to_gen : 'a t -> (int * 'a) gen
  • since 0.13
val add_seq : 'a t -> (int * 'a) Stdlib.Seq.t -> 'a t
  • since 3.0
val of_seq : (int * 'a) Stdlib.Seq.t -> 'a t
  • since 3.0
val to_seq : 'a t -> (int * 'a) Stdlib.Seq.t
  • since 3.0
type 'a tree = unit -> [ `Nil | `Node of 'a * 'a tree list ]
val as_tree : 'a t -> [ `Node of int * int | `Leaf of int * 'a ] tree

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : 'a printer -> 'a t printer
  • since 0.13

Helpers

diff --git a/dev/containers-data/CCKTree/Dot/index.html b/dev/containers-data/CCKTree/Dot/index.html index cccf0c5b..4bb139f7 100644 --- a/dev/containers-data/CCKTree/Dot/index.html +++ b/dev/containers-data/CCKTree/Dot/index.html @@ -1,2 +1,2 @@ -Dot (containers-data.CCKTree.Dot)

Module CCKTree.Dot

type attribute = [
  1. | `Color of string
  2. | `Shape of string
  3. | `Weight of int
  4. | `Style of string
  5. | `Label of string
  6. | `Id of string
    (*

    Unique ID in the graph. Allows sharing.

    *)
  7. | `Other of string * string
]

Dot attributes for nodes

type graph = string * attribute list t list

A dot graph is a name, plus a list of trees labelled with attributes

val mk_id : ('a, Stdlib.Buffer.t, unit, attribute) format4 -> 'a

Using a formatter string, build an ID.

val mk_label : ('a, Stdlib.Buffer.t, unit, attribute) format4 -> 'a

Using a formatter string, build a label.

val make : name:string -> attribute list t list -> graph
val singleton : name:string -> attribute list t -> graph
val pp_single : string -> attribute list t printer
val pp : graph printer

Printer to DOT with indentation, etc.

  • since 0.6.1
val print_to_file : string -> graph -> unit

print_to_file filename g prints g into a file whose name is filename.

  • since 0.6.1
val to_file : ?name:string -> string -> attribute list t list -> unit

to_file filename trees makes a graph out of the trees, opens the file filename and prints the graph into the file.

  • parameter name

    name of the graph.

  • since 0.6.1
\ No newline at end of file +Dot (containers-data.CCKTree.Dot)

Module CCKTree.Dot

type attribute = [
  1. | `Color of string
  2. | `Shape of string
  3. | `Weight of int
  4. | `Style of string
  5. | `Label of string
  6. | `Id of string
    (*

    Unique ID in the graph. Allows sharing.

    *)
  7. | `Other of string * string
]

Dot attributes for nodes

type graph = string * attribute list t list

A dot graph is a name, plus a list of trees labelled with attributes

val mk_id : ('a, Stdlib.Buffer.t, unit, attribute) format4 -> 'a

Using a formatter string, build an ID.

val mk_label : ('a, Stdlib.Buffer.t, unit, attribute) format4 -> 'a

Using a formatter string, build a label.

val make : name:string -> attribute list t list -> graph
val singleton : name:string -> attribute list t -> graph
val pp_single : string -> attribute list t printer
val pp : graph printer

Printer to DOT with indentation, etc.

  • since 0.6.1
val print_to_file : string -> graph -> unit

print_to_file filename g prints g into a file whose name is filename.

  • since 0.6.1
val to_file : ?name:string -> string -> attribute list t list -> unit

to_file filename trees makes a graph out of the trees, opens the file filename and prints the graph into the file.

  • parameter name

    name of the graph.

  • since 0.6.1
diff --git a/dev/containers-data/CCKTree/class-type-pset/index.html b/dev/containers-data/CCKTree/class-type-pset/index.html index 9092bad0..4f0ca601 100644 --- a/dev/containers-data/CCKTree/class-type-pset/index.html +++ b/dev/containers-data/CCKTree/class-type-pset/index.html @@ -1,2 +1,2 @@ -pset (containers-data.CCKTree.pset)

Class type CCKTree.pset

Abstract Set structure

method add : 'a -> 'a pset
method mem : 'a -> bool
\ No newline at end of file +pset (containers-data.CCKTree.pset)

Class type CCKTree.pset

Abstract Set structure

method add : 'a -> 'a pset
method mem : 'a -> bool
diff --git a/dev/containers-data/CCKTree/index.html b/dev/containers-data/CCKTree/index.html index 6f759289..32a6b80d 100644 --- a/dev/containers-data/CCKTree/index.html +++ b/dev/containers-data/CCKTree/index.html @@ -1,5 +1,5 @@ -CCKTree (containers-data.CCKTree)

Module CCKTree

Lazy Tree Structure This structure can be used to represent trees and directed graphs (as infinite trees) in a lazy fashion. It is a structural type.

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

type +'a t = unit -> [ `Nil | `Node of 'a * 'a t list ]
val empty : 'a t
val is_empty : _ t -> bool
val singleton : 'a -> 'a t

Tree with only one label.

val node : 'a -> 'a t list -> 'a t

Build a node from a label and a list of children.

val node1 : 'a -> 'a t -> 'a t

Node with one child.

val node2 : 'a -> 'a t -> 'a t -> 'a t

Node with two children.

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

Fold on values in no specified order. May not terminate if the tree is infinite.

val iter : ('a -> unit) -> 'a t -> unit
val size : _ t -> int

Number of elements.

val height : _ t -> int

Length of the longest path to empty leaves.

val map : ('a -> 'b) -> 'a t -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val cut_depth : int -> 'a t -> 'a t

Cut the tree at the given depth, so it becomes finite.

Graph Traversals

class type 'a pset = object ... end

Abstract Set structure

val set_of_cmp : cmp:('a -> 'a -> int) -> unit -> 'a pset

Build a set structure given a total ordering.

val dfs : pset:'a pset -> 'a t -> [ `Enter of 'a | `Exit of 'a ] Stdlib.Seq.t

Depth-first traversal of the tree.

val bfs : pset:'a pset -> 'a t -> 'a Stdlib.Seq.t

Breadth-first traversal of the tree.

val force : 'a t -> [ `Nil | `Node of 'a * 'b list ] as 'b

force t evaluates t completely and returns a regular tree structure.

  • since 0.13
val find : pset:'a pset -> ('a -> 'b option) -> 'a t -> 'b option

Look for an element that maps to Some _.

Pretty-printing

Example (tree of calls for naive Fibonacci function):

let mk_fib n =
+CCKTree (containers-data.CCKTree)

Module CCKTree

Lazy Tree Structure This structure can be used to represent trees and directed graphs (as infinite trees) in a lazy fashion. It is a structural type.

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

type +'a t = unit -> [ `Nil | `Node of 'a * 'a t list ]
val empty : 'a t
val is_empty : _ t -> bool
val singleton : 'a -> 'a t

Tree with only one label.

val node : 'a -> 'a t list -> 'a t

Build a node from a label and a list of children.

val node1 : 'a -> 'a t -> 'a t

Node with one child.

val node2 : 'a -> 'a t -> 'a t -> 'a t

Node with two children.

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

Fold on values in no specified order. May not terminate if the tree is infinite.

val iter : ('a -> unit) -> 'a t -> unit
val size : _ t -> int

Number of elements.

val height : _ t -> int

Length of the longest path to empty leaves.

val map : ('a -> 'b) -> 'a t -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val cut_depth : int -> 'a t -> 'a t

Cut the tree at the given depth, so it becomes finite.

Graph Traversals

class type 'a pset = object ... end

Abstract Set structure

val set_of_cmp : cmp:('a -> 'a -> int) -> unit -> 'a pset

Build a set structure given a total ordering.

val dfs : pset:'a pset -> 'a t -> [ `Enter of 'a | `Exit of 'a ] Stdlib.Seq.t

Depth-first traversal of the tree.

val bfs : pset:'a pset -> 'a t -> 'a Stdlib.Seq.t

Breadth-first traversal of the tree.

val force : 'a t -> [ `Nil | `Node of 'a * 'b list ] as 'b

force t evaluates t completely and returns a regular tree structure.

  • since 0.13
val find : pset:'a pset -> ('a -> 'b option) -> 'a t -> 'b option

Look for an element that maps to Some _.

Pretty-printing

Example (tree of calls for naive Fibonacci function):

let mk_fib n =
   let rec fib' l r i =
     if i=n then r else fib' r (l+r) (i+1)
   in fib' 1 1 1;;
@@ -12,4 +12,4 @@ let pp_node fmt = function
   | `Cst n -> Format.fprintf fmt "%d" n
   | `Plus n -> Format.fprintf fmt "%d" n;;
 
-Format.printf "%a@." (CCKTree.pp pp_node) (fib 8);;
val pp : 'a printer -> 'a t printer

A pretty-printer using S-expressions and boxes to render the tree. Empty nodes are not rendered; sharing is ignored.

  • since 0.9

Pretty printing in the DOT (graphviz) format

module Dot : sig ... end
\ No newline at end of file +Format.printf "%a@." (CCKTree.pp pp_node) (fib 8);;
val pp : 'a printer -> 'a t printer

A pretty-printer using S-expressions and boxes to render the tree. Empty nodes are not rendered; sharing is ignored.

  • since 0.9

Pretty printing in the DOT (graphviz) format

module Dot : sig ... end
diff --git a/dev/containers-data/CCLazy_list/Infix/index.html b/dev/containers-data/CCLazy_list/Infix/index.html index d9b5aa25..a265721a 100644 --- a/dev/containers-data/CCLazy_list/Infix/index.html +++ b/dev/containers-data/CCLazy_list/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers-data.CCLazy_list.Infix)

Module CCLazy_list.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (<|>) : 'a t -> 'a t -> 'a t

Alias to default.

  • since 2.1
\ No newline at end of file +Infix (containers-data.CCLazy_list.Infix)

Module CCLazy_list.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (<|>) : 'a t -> 'a t -> 'a t

Alias to default.

  • since 2.1
diff --git a/dev/containers-data/CCLazy_list/index.html b/dev/containers-data/CCLazy_list/index.html index 84f743b5..bb355f4c 100644 --- a/dev/containers-data/CCLazy_list/index.html +++ b/dev/containers-data/CCLazy_list/index.html @@ -1,2 +1,2 @@ -CCLazy_list (containers-data.CCLazy_list)

Module CCLazy_list

Lazy List

type +'a t = 'a node lazy_t
and +'a node =
  1. | Nil
  2. | Cons of 'a * 'a t
val empty : 'a t

Empty list.

val return : 'a -> 'a t

Return a computed value.

val is_empty : _ t -> bool

Evaluate the head.

val length : _ t -> int

length l returns the number of elements in l, eagerly (linear time). Caution, will not terminate if l is infinite.

val cons : 'a -> 'a t -> 'a t
val head : 'a t -> ('a * 'a t) option

Evaluate head, return it, or None if the list is empty.

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

Lazy map.

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

Filter values.

  • since 0.18
val take : int -> 'a t -> 'a t

Take at most n values.

  • since 0.18
val append : 'a t -> 'a t -> 'a t

Lazy concatenation.

val flat_map : f:('a -> 'b t) -> 'a t -> 'b t

Monadic flatten + map.

val default : default:'a t -> 'a t -> 'a t

Choice operator.

  • since 2.1
module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (<|>) : 'a t -> 'a t -> 'a t

Alias to default.

  • since 2.1
type 'a gen = unit -> 'a option
val of_gen : 'a gen -> 'a t
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val to_list_rev : 'a t -> 'a list
val to_gen : 'a t -> 'a gen
\ No newline at end of file +CCLazy_list (containers-data.CCLazy_list)

Module CCLazy_list

Lazy List

type +'a t = 'a node lazy_t
and +'a node =
  1. | Nil
  2. | Cons of 'a * 'a t
val empty : 'a t

Empty list.

val return : 'a -> 'a t

Return a computed value.

val is_empty : _ t -> bool

Evaluate the head.

val length : _ t -> int

length l returns the number of elements in l, eagerly (linear time). Caution, will not terminate if l is infinite.

val cons : 'a -> 'a t -> 'a t
val head : 'a t -> ('a * 'a t) option

Evaluate head, return it, or None if the list is empty.

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

Lazy map.

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

Filter values.

  • since 0.18
val take : int -> 'a t -> 'a t

Take at most n values.

  • since 0.18
val append : 'a t -> 'a t -> 'a t

Lazy concatenation.

val flat_map : f:('a -> 'b t) -> 'a t -> 'b t

Monadic flatten + map.

val default : default:'a t -> 'a t -> 'a t

Choice operator.

  • since 2.1
module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (<|>) : 'a t -> 'a t -> 'a t

Alias to default.

  • since 2.1
type 'a gen = unit -> 'a option
val of_gen : 'a gen -> 'a t
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val to_list_rev : 'a t -> 'a list
val to_gen : 'a t -> 'a gen
diff --git a/dev/containers-data/CCMixmap/Make/argument-1-X/index.html b/dev/containers-data/CCMixmap/Make/argument-1-X/index.html index 6bba3d6b..6d4ad9f3 100644 --- a/dev/containers-data/CCMixmap/Make/argument-1-X/index.html +++ b/dev/containers-data/CCMixmap/Make/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers-data.CCMixmap.Make.X)

Parameter Make.X

type t
val compare : t -> t -> int
\ No newline at end of file +X (containers-data.CCMixmap.Make.X)

Parameter Make.X

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCMixmap/Make/index.html b/dev/containers-data/CCMixmap/Make/index.html index 5f339622..a5f538bd 100644 --- a/dev/containers-data/CCMixmap/Make/index.html +++ b/dev/containers-data/CCMixmap/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCMixmap.Make)

Module CCMixmap.Make

Parameters

module X : ORD

Signature

type key = X.t
type t

A map containing values of different types, indexed by key.

val empty : t

Empty map.

val get : inj:'a injection -> key -> t -> 'a option

Get the value corresponding to this key, if it exists and belongs to the same key.

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

Bind the key to the value, using inj.

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

Find the value for the given key, which must be of the right type.

  • raises Not_found

    if either the key is not found, or if its value doesn't belong to the right type.

val cardinal : t -> int

Number of bindings.

val remove : key -> t -> t

Remove the binding for this key.

val mem : inj:_ injection -> key -> t -> bool

Is the given key in the map, with the right type?

val iter_keys : f:(key -> unit) -> t -> unit

Iterate on the keys of this map.

val fold_keys : f:('a -> key -> 'a) -> x:'a -> t -> 'a

Fold over the keys.

Iterators

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

All the keys.

val bindings_of : inj:'a injection -> t -> (key * 'a) iter

All the bindings that come from the corresponding injection.

type value =
  1. | Value : ('a injection -> 'a option) -> value
val bindings : t -> (key * value) iter

Iterate on all bindings.

\ No newline at end of file +Make (containers-data.CCMixmap.Make)

Module CCMixmap.Make

Parameters

module X : ORD

Signature

type key = X.t
type t

A map containing values of different types, indexed by key.

val empty : t

Empty map.

val get : inj:'a injection -> key -> t -> 'a option

Get the value corresponding to this key, if it exists and belongs to the same key.

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

Bind the key to the value, using inj.

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

Find the value for the given key, which must be of the right type.

  • raises Not_found

    if either the key is not found, or if its value doesn't belong to the right type.

val cardinal : t -> int

Number of bindings.

val remove : key -> t -> t

Remove the binding for this key.

val mem : inj:_ injection -> key -> t -> bool

Is the given key in the map, with the right type?

val iter_keys : f:(key -> unit) -> t -> unit

Iterate on the keys of this map.

val fold_keys : f:('a -> key -> 'a) -> x:'a -> t -> 'a

Fold over the keys.

Iterators

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

All the keys.

val bindings_of : inj:'a injection -> t -> (key * 'a) iter

All the bindings that come from the corresponding injection.

type value =
  1. | Value : ('a injection -> 'a option) -> value
val bindings : t -> (key * value) iter

Iterate on all bindings.

diff --git a/dev/containers-data/CCMixmap/index.html b/dev/containers-data/CCMixmap/index.html index c7375f35..c4dab383 100644 --- a/dev/containers-data/CCMixmap/index.html +++ b/dev/containers-data/CCMixmap/index.html @@ -1,5 +1,5 @@ -CCMixmap (containers-data.CCMixmap)

Module CCMixmap

Maps with Heterogeneous Values

status: experimental

module M = CCMixmap.Make(CCInt)
+CCMixmap (containers-data.CCMixmap)

Module CCMixmap

Maps with Heterogeneous Values

status: experimental

module M = CCMixmap.Make(CCInt)
 
 let inj_int = CCMixmap.create_inj()
 let inj_str = CCMixmap.create_inj()
@@ -16,4 +16,4 @@ let m =
     assert (M.get ~inj:inj_str 2 m = Some "2")
     assert (M.get ~inj:inj_int 2 m = None)
     assert (M.get ~inj:inj_list_int 3 m = Some [3;3;3])
-    assert (M.get ~inj:inj_str 3 m = None)

change of API, the map is last argument to make piping with |> easier since 0.16.

  • since 0.9
type 'a injection

An accessor for values of type 'a in any map. Values put in the map using a key can only be retrieved using this very same key.

val create_inj : unit -> 'a injection

Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple maps (although not in a thread-safe way).

module type S = sig ... end
module type ORD = sig ... end
module Make (X : ORD) : S with type key = X.t
\ No newline at end of file + assert (M.get ~inj:inj_str 3 m = None)

change of API, the map is last argument to make piping with |> easier since 0.16.

type 'a injection

An accessor for values of type 'a in any map. Values put in the map using a key can only be retrieved using this very same key.

val create_inj : unit -> 'a injection

Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple maps (although not in a thread-safe way).

module type S = sig ... end
module type ORD = sig ... end
module Make (X : ORD) : S with type key = X.t
diff --git a/dev/containers-data/CCMixmap/module-type-ORD/index.html b/dev/containers-data/CCMixmap/module-type-ORD/index.html index c7e371db..46358f01 100644 --- a/dev/containers-data/CCMixmap/module-type-ORD/index.html +++ b/dev/containers-data/CCMixmap/module-type-ORD/index.html @@ -1,2 +1,2 @@ -ORD (containers-data.CCMixmap.ORD)

Module type CCMixmap.ORD

type t
val compare : t -> t -> int
\ No newline at end of file +ORD (containers-data.CCMixmap.ORD)

Module type CCMixmap.ORD

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCMixmap/module-type-S/index.html b/dev/containers-data/CCMixmap/module-type-S/index.html index 6cce40dc..a2ea36a2 100644 --- a/dev/containers-data/CCMixmap/module-type-S/index.html +++ b/dev/containers-data/CCMixmap/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCMixmap.S)

Module type CCMixmap.S

type key
type t

A map containing values of different types, indexed by key.

val empty : t

Empty map.

val get : inj:'a injection -> key -> t -> 'a option

Get the value corresponding to this key, if it exists and belongs to the same key.

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

Bind the key to the value, using inj.

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

Find the value for the given key, which must be of the right type.

  • raises Not_found

    if either the key is not found, or if its value doesn't belong to the right type.

val cardinal : t -> int

Number of bindings.

val remove : key -> t -> t

Remove the binding for this key.

val mem : inj:_ injection -> key -> t -> bool

Is the given key in the map, with the right type?

val iter_keys : f:(key -> unit) -> t -> unit

Iterate on the keys of this map.

val fold_keys : f:('a -> key -> 'a) -> x:'a -> t -> 'a

Fold over the keys.

Iterators

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

All the keys.

val bindings_of : inj:'a injection -> t -> (key * 'a) iter

All the bindings that come from the corresponding injection.

type value =
  1. | Value : ('a injection -> 'a option) -> value
val bindings : t -> (key * value) iter

Iterate on all bindings.

\ No newline at end of file +S (containers-data.CCMixmap.S)

Module type CCMixmap.S

type key
type t

A map containing values of different types, indexed by key.

val empty : t

Empty map.

val get : inj:'a injection -> key -> t -> 'a option

Get the value corresponding to this key, if it exists and belongs to the same key.

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

Bind the key to the value, using inj.

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

Find the value for the given key, which must be of the right type.

  • raises Not_found

    if either the key is not found, or if its value doesn't belong to the right type.

val cardinal : t -> int

Number of bindings.

val remove : key -> t -> t

Remove the binding for this key.

val mem : inj:_ injection -> key -> t -> bool

Is the given key in the map, with the right type?

val iter_keys : f:(key -> unit) -> t -> unit

Iterate on the keys of this map.

val fold_keys : f:('a -> key -> 'a) -> x:'a -> t -> 'a

Fold over the keys.

Iterators

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

All the keys.

val bindings_of : inj:'a injection -> t -> (key * 'a) iter

All the bindings that come from the corresponding injection.

type value =
  1. | Value : ('a injection -> 'a option) -> value
val bindings : t -> (key * value) iter

Iterate on all bindings.

diff --git a/dev/containers-data/CCMixset/index.html b/dev/containers-data/CCMixset/index.html index 952cde5e..e0b776c8 100644 --- a/dev/containers-data/CCMixset/index.html +++ b/dev/containers-data/CCMixset/index.html @@ -1,5 +1,5 @@ -CCMixset (containers-data.CCMixset)

Module CCMixset

Set of Heterogeneous Values

let k1 : int key = newkey () in
+CCMixset (containers-data.CCMixset)

Module CCMixset

Set of Heterogeneous Values

let k1 : int key = newkey () in
 let k2 : int key = newkey () in
 let k3 : string key = newkey () in
 let set =
@@ -11,4 +11,4 @@ in
 assert (get ~key:k1 set = Some 1);
 assert (get ~key:k2 set = Some 2);
 assert (get ~key:k3 set = Some "3");
-()
  • since 0.11
type t

A set of values of heterogeneous types

type 'a key

A unique "key" to access a value of type 'a in a set

val newkey : unit -> 'a key

newkey () creates a new unique key that can be used to access a 'a value in a set. Each key created with newkey is distinct from any other key, even if they have the same type.

Not thread-safe.

val empty : t

Empty set.

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

set ~key v set maps key to v in set. It means that for every set, get ~key (set ~key v set) = Some v.

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

get ~key set obtains the value for key in set, if any.

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

Same as get, but can fail.

  • raises Not_found

    if the key is not present.

val cardinal : t -> int

Number of mappings.

\ No newline at end of file +()
type t

A set of values of heterogeneous types

type 'a key

A unique "key" to access a value of type 'a in a set

val newkey : unit -> 'a key

newkey () creates a new unique key that can be used to access a 'a value in a set. Each key created with newkey is distinct from any other key, even if they have the same type.

Not thread-safe.

val empty : t

Empty set.

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

set ~key v set maps key to v in set. It means that for every set, get ~key (set ~key v set) = Some v.

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

get ~key set obtains the value for key in set, if any.

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

Same as get, but can fail.

  • raises Not_found

    if the key is not present.

val cardinal : t -> int

Number of mappings.

diff --git a/dev/containers-data/CCMixtbl/index.html b/dev/containers-data/CCMixtbl/index.html index dd052eb2..efe1eb8c 100644 --- a/dev/containers-data/CCMixtbl/index.html +++ b/dev/containers-data/CCMixtbl/index.html @@ -1,5 +1,5 @@ -CCMixtbl (containers-data.CCMixtbl)

Module CCMixtbl

Hash Table with Heterogeneous Keys

From https://github.com/mjambon/mixtbl (thanks to him). Example:

let inj_int = CCMixtbl.create_inj () ;;
+CCMixtbl (containers-data.CCMixtbl)

Module CCMixtbl

Hash Table with Heterogeneous Keys

From https://github.com/mjambon/mixtbl (thanks to him). Example:

let inj_int = CCMixtbl.create_inj () ;;
 
 let tbl = CCMixtbl.create 10 ;;
 
@@ -19,4 +19,4 @@ assert_equal (Some 1) (CCMixtbl.get inj_int tbl "a");;
 CCMixtbl.set inj_string tbl "a" "Bye";;
 
 assert_equal None (CCMixtbl.get inj_int tbl "a");;
-assert_equal (Some "Bye") (CCMixtbl.get inj_string tbl "a");;
  • since 0.6
type 'a t

A hash table containing values of different types. The type parameter 'a represents the type of the keys.

type 'b injection

An accessor for values of type 'b in any table. Values put in the table using a key can only be retrieved using this very same key.

val create : int -> 'a t

create n creates a hash table of initial size n.

val create_inj : unit -> 'b injection

Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple tables (although not in a thread-safe way).

val get : inj:'b injection -> 'a t -> 'a -> 'b option

Get the value corresponding to this key, if it exists and belongs to the same key.

val set : inj:'b injection -> 'a t -> 'a -> 'b -> unit

Bind the key to the value, using inj.

val find : inj:'b injection -> 'a t -> 'a -> 'b

Find the value for the given key, which must be of the right type.

  • raises Not_found

    if either the key is not found, or if its value doesn't belong to the right type.

val length : 'a t -> int

Number of bindings.

val clear : 'a t -> unit

Clear content of the hashtable.

val remove : 'a t -> 'a -> unit

Remove the binding for this key.

val copy : 'a t -> 'a t

Copy of the table.

val mem : inj:_ injection -> 'a t -> 'a -> bool

Is the given key in the table, with the right type?

val iter_keys : 'a t -> ('a -> unit) -> unit

Iterate on the keys of this table.

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

Fold over the keys.

Iterators

type 'a iter = ('a -> unit) -> unit
val keys_iter : 'a t -> 'a iter

All the keys.

val bindings_of : inj:'b injection -> 'a t -> ('a * 'b) iter

All the bindings that come from the corresponding injection.

type value =
  1. | Value : ('b injection -> 'b option) -> value
val bindings : 'a t -> ('a * value) iter

Iterate on all bindings.

\ No newline at end of file +assert_equal (Some "Bye") (CCMixtbl.get inj_string tbl "a");;
type 'a t

A hash table containing values of different types. The type parameter 'a represents the type of the keys.

type 'b injection

An accessor for values of type 'b in any table. Values put in the table using a key can only be retrieved using this very same key.

val create : int -> 'a t

create n creates a hash table of initial size n.

val create_inj : unit -> 'b injection

Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple tables (although not in a thread-safe way).

val get : inj:'b injection -> 'a t -> 'a -> 'b option

Get the value corresponding to this key, if it exists and belongs to the same key.

val set : inj:'b injection -> 'a t -> 'a -> 'b -> unit

Bind the key to the value, using inj.

val find : inj:'b injection -> 'a t -> 'a -> 'b

Find the value for the given key, which must be of the right type.

  • raises Not_found

    if either the key is not found, or if its value doesn't belong to the right type.

val length : 'a t -> int

Number of bindings.

val clear : 'a t -> unit

Clear content of the hashtable.

val remove : 'a t -> 'a -> unit

Remove the binding for this key.

val copy : 'a t -> 'a t

Copy of the table.

val mem : inj:_ injection -> 'a t -> 'a -> bool

Is the given key in the table, with the right type?

val iter_keys : 'a t -> ('a -> unit) -> unit

Iterate on the keys of this table.

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

Fold over the keys.

Iterators

type 'a iter = ('a -> unit) -> unit
val keys_iter : 'a t -> 'a iter

All the keys.

val bindings_of : inj:'b injection -> 'a t -> ('a * 'b) iter

All the bindings that come from the corresponding injection.

type value =
  1. | Value : ('b injection -> 'b option) -> value
val bindings : 'a t -> ('a * value) iter

Iterate on all bindings.

diff --git a/dev/containers-data/CCMultiMap/Make/argument-1-K/index.html b/dev/containers-data/CCMultiMap/Make/argument-1-K/index.html index cdc4c15c..72740390 100644 --- a/dev/containers-data/CCMultiMap/Make/argument-1-K/index.html +++ b/dev/containers-data/CCMultiMap/Make/argument-1-K/index.html @@ -1,2 +1,2 @@ -K (containers-data.CCMultiMap.Make.K)

Parameter Make.K

type t
val compare : t -> t -> int
\ No newline at end of file +K (containers-data.CCMultiMap.Make.K)

Parameter Make.K

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCMultiMap/Make/argument-2-V/index.html b/dev/containers-data/CCMultiMap/Make/argument-2-V/index.html index ccf2e097..efaaf7f5 100644 --- a/dev/containers-data/CCMultiMap/Make/argument-2-V/index.html +++ b/dev/containers-data/CCMultiMap/Make/argument-2-V/index.html @@ -1,2 +1,2 @@ -V (containers-data.CCMultiMap.Make.V)

Parameter Make.V

type t
val compare : t -> t -> int
\ No newline at end of file +V (containers-data.CCMultiMap.Make.V)

Parameter Make.V

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCMultiMap/Make/index.html b/dev/containers-data/CCMultiMap/Make/index.html index 08c3ad48..6d1077bb 100644 --- a/dev/containers-data/CCMultiMap/Make/index.html +++ b/dev/containers-data/CCMultiMap/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCMultiMap.Make)

Module CCMultiMap.Make

Parameters

module K : OrderedType
module V : OrderedType

Signature

type key = K.t
type value = V.t
type t
val empty : t

Empty multimap.

val is_empty : t -> bool

Empty multimap?

val add : t -> key -> value -> t

Add a key/value binding.

val remove : t -> key -> value -> t

Remove the binding.

val remove_all : t -> key -> t

Remove the key from the map.

val mem : t -> key -> bool

Is there a binding for this key?

val find : t -> key -> value list

List of values for this key.

val find_iter : t -> key -> value iter

Iterate on bindings for this key.

val count : t -> key -> int

Number of bindings for this key.

val iter : t -> (key -> value -> unit) -> unit

Iterate on all key/value.

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

Fold on all key/value.

val size : t -> int

Number of keys.

val union : t -> t -> t

Union of multimaps.

val inter : t -> t -> t

Intersection of multimaps.

val diff : t -> t -> t

Difference of maps, i.e. bindings of the first that are not in the second.

val equal : t -> t -> bool

Same multimap.

val compare : t -> t -> int

Total order on multimaps.

val submap : t -> t -> bool

submap m1 m2 is true iff all bindings of m1 are also in m2.

val to_iter : t -> (key * value) iter
val of_iter : ?init:t -> (key * value) iter -> t
val keys : t -> key iter
val values : t -> value iter

Some values may occur several times.

\ No newline at end of file +Make (containers-data.CCMultiMap.Make)

Module CCMultiMap.Make

Parameters

module K : OrderedType
module V : OrderedType

Signature

type key = K.t
type value = V.t
type t
val empty : t

Empty multimap.

val is_empty : t -> bool

Empty multimap?

val add : t -> key -> value -> t

Add a key/value binding.

val remove : t -> key -> value -> t

Remove the binding.

val remove_all : t -> key -> t

Remove the key from the map.

val mem : t -> key -> bool

Is there a binding for this key?

val find : t -> key -> value list

List of values for this key.

val find_iter : t -> key -> value iter

Iterate on bindings for this key.

val count : t -> key -> int

Number of bindings for this key.

val iter : t -> (key -> value -> unit) -> unit

Iterate on all key/value.

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

Fold on all key/value.

val size : t -> int

Number of keys.

val union : t -> t -> t

Union of multimaps.

val inter : t -> t -> t

Intersection of multimaps.

val diff : t -> t -> t

Difference of maps, i.e. bindings of the first that are not in the second.

val equal : t -> t -> bool

Same multimap.

val compare : t -> t -> int

Total order on multimaps.

val submap : t -> t -> bool

submap m1 m2 is true iff all bindings of m1 are also in m2.

val to_iter : t -> (key * value) iter
val of_iter : ?init:t -> (key * value) iter -> t
val keys : t -> key iter
val values : t -> value iter

Some values may occur several times.

diff --git a/dev/containers-data/CCMultiMap/MakeBidir/argument-1-L/index.html b/dev/containers-data/CCMultiMap/MakeBidir/argument-1-L/index.html index ecf4d1c5..48e6d84e 100644 --- a/dev/containers-data/CCMultiMap/MakeBidir/argument-1-L/index.html +++ b/dev/containers-data/CCMultiMap/MakeBidir/argument-1-L/index.html @@ -1,2 +1,2 @@ -L (containers-data.CCMultiMap.MakeBidir.L)

Parameter MakeBidir.L

type t
val compare : t -> t -> int
\ No newline at end of file +L (containers-data.CCMultiMap.MakeBidir.L)

Parameter MakeBidir.L

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCMultiMap/MakeBidir/argument-2-R/index.html b/dev/containers-data/CCMultiMap/MakeBidir/argument-2-R/index.html index 654802c2..47db2eee 100644 --- a/dev/containers-data/CCMultiMap/MakeBidir/argument-2-R/index.html +++ b/dev/containers-data/CCMultiMap/MakeBidir/argument-2-R/index.html @@ -1,2 +1,2 @@ -R (containers-data.CCMultiMap.MakeBidir.R)

Parameter MakeBidir.R

type t
val compare : t -> t -> int
\ No newline at end of file +R (containers-data.CCMultiMap.MakeBidir.R)

Parameter MakeBidir.R

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCMultiMap/MakeBidir/index.html b/dev/containers-data/CCMultiMap/MakeBidir/index.html index 191b49c1..b0ae1fe6 100644 --- a/dev/containers-data/CCMultiMap/MakeBidir/index.html +++ b/dev/containers-data/CCMultiMap/MakeBidir/index.html @@ -1,2 +1,2 @@ -MakeBidir (containers-data.CCMultiMap.MakeBidir)

Module CCMultiMap.MakeBidir

Parameters

module L : OrderedType
module R : OrderedType

Signature

type t
type left = L.t
type right = R.t
val empty : t
val is_empty : t -> bool
val add : t -> left -> right -> t

Add a binding (left,right).

val remove : t -> left -> right -> t

Remove a specific binding.

val cardinal_left : t -> int

Number of distinct left keys.

val cardinal_right : t -> int

Number of distinct right keys.

val remove_left : t -> left -> t

Remove all bindings for the left key.

val remove_right : t -> right -> t

Remove all bindings for the right key.

val mem_left : t -> left -> bool

Is the left key present in at least one pair?

val mem_right : t -> right -> bool

Is the right key present in at least one pair?

val find_left : t -> left -> right list

List of values for this given left-key.

val find_left_iter : t -> left -> right iter

Iterate on bindings for this given left-key.

  • since NEXT_RELEASE
val find_right : t -> right -> left list

List of values for this given right-key.

val find_right_iter : t -> right -> left iter

Iterate on bindings for this given left-key.

  • since NEXT_RELEASE
val find1_left : t -> left -> right option

Like find_left but returns at most one value.

val find1_right : t -> right -> left option

Like find_right but returns at most one value.

val fold : ('a -> left -> right -> 'a) -> 'a -> t -> 'a

Fold on pairs.

val pairs : t -> (left * right) iter

Iterate on pairs.

val add_pairs : t -> (left * right) iter -> t

Add pairs.

val iter_left : t -> left iter
val iter_right : t -> right iter
\ No newline at end of file +MakeBidir (containers-data.CCMultiMap.MakeBidir)

Module CCMultiMap.MakeBidir

Parameters

module L : OrderedType
module R : OrderedType

Signature

type t
type left = L.t
type right = R.t
val empty : t
val is_empty : t -> bool
val add : t -> left -> right -> t

Add a binding (left,right).

val remove : t -> left -> right -> t

Remove a specific binding.

val cardinal_left : t -> int

Number of distinct left keys.

val cardinal_right : t -> int

Number of distinct right keys.

val remove_left : t -> left -> t

Remove all bindings for the left key.

val remove_right : t -> right -> t

Remove all bindings for the right key.

val mem_left : t -> left -> bool

Is the left key present in at least one pair?

val mem_right : t -> right -> bool

Is the right key present in at least one pair?

val find_left : t -> left -> right list

List of values for this given left-key.

val find_left_iter : t -> left -> right iter

Iterate on bindings for this given left-key.

  • since NEXT_RELEASE
val find_right : t -> right -> left list

List of values for this given right-key.

val find_right_iter : t -> right -> left iter

Iterate on bindings for this given left-key.

  • since NEXT_RELEASE
val find1_left : t -> left -> right option

Like find_left but returns at most one value.

val find1_right : t -> right -> left option

Like find_right but returns at most one value.

val fold : ('a -> left -> right -> 'a) -> 'a -> t -> 'a

Fold on pairs.

val pairs : t -> (left * right) iter

Iterate on pairs.

val add_pairs : t -> (left * right) iter -> t

Add pairs.

val iter_left : t -> left iter
val iter_right : t -> right iter
diff --git a/dev/containers-data/CCMultiMap/index.html b/dev/containers-data/CCMultiMap/index.html index 42bf8165..6b1f5a07 100644 --- a/dev/containers-data/CCMultiMap/index.html +++ b/dev/containers-data/CCMultiMap/index.html @@ -1,8 +1,8 @@ -CCMultiMap (containers-data.CCMultiMap)

Module CCMultiMap

Map that can map key to several values

type 'a iter = ('a -> unit) -> unit
module type S = sig ... end
module type OrderedType = sig ... end
module Make +CCMultiMap (containers-data.CCMultiMap)

Module CCMultiMap

Map that can map key to several values

type 'a iter = ('a -> unit) -> unit
module type S = sig ... end
module type OrderedType = sig ... end
module Make (K : OrderedType) (V : OrderedType) : S with type key = K.t and type value = V.t

Two-Way Multimap

Represents n-to-n mappings between two types. Each element from the "left" is mapped to several right values, and conversely.

  • since 0.3.3
module type BIDIR = sig ... end
module MakeBidir (L : OrderedType) (R : OrderedType) : - BIDIR with type left = L.t and type right = R.t
\ No newline at end of file + BIDIR with type left = L.t and type right = R.t
diff --git a/dev/containers-data/CCMultiMap/module-type-BIDIR/index.html b/dev/containers-data/CCMultiMap/module-type-BIDIR/index.html index d140a920..b4afbaac 100644 --- a/dev/containers-data/CCMultiMap/module-type-BIDIR/index.html +++ b/dev/containers-data/CCMultiMap/module-type-BIDIR/index.html @@ -1,2 +1,2 @@ -BIDIR (containers-data.CCMultiMap.BIDIR)

Module type CCMultiMap.BIDIR

type t
type left
type right
val empty : t
val is_empty : t -> bool
val add : t -> left -> right -> t

Add a binding (left,right).

val remove : t -> left -> right -> t

Remove a specific binding.

val cardinal_left : t -> int

Number of distinct left keys.

val cardinal_right : t -> int

Number of distinct right keys.

val remove_left : t -> left -> t

Remove all bindings for the left key.

val remove_right : t -> right -> t

Remove all bindings for the right key.

val mem_left : t -> left -> bool

Is the left key present in at least one pair?

val mem_right : t -> right -> bool

Is the right key present in at least one pair?

val find_left : t -> left -> right list

List of values for this given left-key.

val find_left_iter : t -> left -> right iter

Iterate on bindings for this given left-key.

  • since NEXT_RELEASE
val find_right : t -> right -> left list

List of values for this given right-key.

val find_right_iter : t -> right -> left iter

Iterate on bindings for this given left-key.

  • since NEXT_RELEASE
val find1_left : t -> left -> right option

Like find_left but returns at most one value.

val find1_right : t -> right -> left option

Like find_right but returns at most one value.

val fold : ('a -> left -> right -> 'a) -> 'a -> t -> 'a

Fold on pairs.

val pairs : t -> (left * right) iter

Iterate on pairs.

val add_pairs : t -> (left * right) iter -> t

Add pairs.

val iter_left : t -> left iter
val iter_right : t -> right iter
\ No newline at end of file +BIDIR (containers-data.CCMultiMap.BIDIR)

Module type CCMultiMap.BIDIR

type t
type left
type right
val empty : t
val is_empty : t -> bool
val add : t -> left -> right -> t

Add a binding (left,right).

val remove : t -> left -> right -> t

Remove a specific binding.

val cardinal_left : t -> int

Number of distinct left keys.

val cardinal_right : t -> int

Number of distinct right keys.

val remove_left : t -> left -> t

Remove all bindings for the left key.

val remove_right : t -> right -> t

Remove all bindings for the right key.

val mem_left : t -> left -> bool

Is the left key present in at least one pair?

val mem_right : t -> right -> bool

Is the right key present in at least one pair?

val find_left : t -> left -> right list

List of values for this given left-key.

val find_left_iter : t -> left -> right iter

Iterate on bindings for this given left-key.

  • since NEXT_RELEASE
val find_right : t -> right -> left list

List of values for this given right-key.

val find_right_iter : t -> right -> left iter

Iterate on bindings for this given left-key.

  • since NEXT_RELEASE
val find1_left : t -> left -> right option

Like find_left but returns at most one value.

val find1_right : t -> right -> left option

Like find_right but returns at most one value.

val fold : ('a -> left -> right -> 'a) -> 'a -> t -> 'a

Fold on pairs.

val pairs : t -> (left * right) iter

Iterate on pairs.

val add_pairs : t -> (left * right) iter -> t

Add pairs.

val iter_left : t -> left iter
val iter_right : t -> right iter
diff --git a/dev/containers-data/CCMultiMap/module-type-OrderedType/index.html b/dev/containers-data/CCMultiMap/module-type-OrderedType/index.html index 73c64b58..71a07cae 100644 --- a/dev/containers-data/CCMultiMap/module-type-OrderedType/index.html +++ b/dev/containers-data/CCMultiMap/module-type-OrderedType/index.html @@ -1,2 +1,2 @@ -OrderedType (containers-data.CCMultiMap.OrderedType)

Module type CCMultiMap.OrderedType

type t
val compare : t -> t -> int
\ No newline at end of file +OrderedType (containers-data.CCMultiMap.OrderedType)

Module type CCMultiMap.OrderedType

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCMultiMap/module-type-S/index.html b/dev/containers-data/CCMultiMap/module-type-S/index.html index 394731a2..25d4f405 100644 --- a/dev/containers-data/CCMultiMap/module-type-S/index.html +++ b/dev/containers-data/CCMultiMap/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCMultiMap.S)

Module type CCMultiMap.S

type key
type value
type t
val empty : t

Empty multimap.

val is_empty : t -> bool

Empty multimap?

val add : t -> key -> value -> t

Add a key/value binding.

val remove : t -> key -> value -> t

Remove the binding.

val remove_all : t -> key -> t

Remove the key from the map.

val mem : t -> key -> bool

Is there a binding for this key?

val find : t -> key -> value list

List of values for this key.

val find_iter : t -> key -> value iter

Iterate on bindings for this key.

val count : t -> key -> int

Number of bindings for this key.

val iter : t -> (key -> value -> unit) -> unit

Iterate on all key/value.

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

Fold on all key/value.

val size : t -> int

Number of keys.

val union : t -> t -> t

Union of multimaps.

val inter : t -> t -> t

Intersection of multimaps.

val diff : t -> t -> t

Difference of maps, i.e. bindings of the first that are not in the second.

val equal : t -> t -> bool

Same multimap.

val compare : t -> t -> int

Total order on multimaps.

val submap : t -> t -> bool

submap m1 m2 is true iff all bindings of m1 are also in m2.

val to_iter : t -> (key * value) iter
val of_iter : ?init:t -> (key * value) iter -> t
val keys : t -> key iter
val values : t -> value iter

Some values may occur several times.

\ No newline at end of file +S (containers-data.CCMultiMap.S)

Module type CCMultiMap.S

type key
type value
type t
val empty : t

Empty multimap.

val is_empty : t -> bool

Empty multimap?

val add : t -> key -> value -> t

Add a key/value binding.

val remove : t -> key -> value -> t

Remove the binding.

val remove_all : t -> key -> t

Remove the key from the map.

val mem : t -> key -> bool

Is there a binding for this key?

val find : t -> key -> value list

List of values for this key.

val find_iter : t -> key -> value iter

Iterate on bindings for this key.

val count : t -> key -> int

Number of bindings for this key.

val iter : t -> (key -> value -> unit) -> unit

Iterate on all key/value.

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

Fold on all key/value.

val size : t -> int

Number of keys.

val union : t -> t -> t

Union of multimaps.

val inter : t -> t -> t

Intersection of multimaps.

val diff : t -> t -> t

Difference of maps, i.e. bindings of the first that are not in the second.

val equal : t -> t -> bool

Same multimap.

val compare : t -> t -> int

Total order on multimaps.

val submap : t -> t -> bool

submap m1 m2 is true iff all bindings of m1 are also in m2.

val to_iter : t -> (key * value) iter
val of_iter : ?init:t -> (key * value) iter -> t
val keys : t -> key iter
val values : t -> value iter

Some values may occur several times.

diff --git a/dev/containers-data/CCMultiSet/Make/argument-1-O/index.html b/dev/containers-data/CCMultiSet/Make/argument-1-O/index.html index 7fcc6901..4b8020d9 100644 --- a/dev/containers-data/CCMultiSet/Make/argument-1-O/index.html +++ b/dev/containers-data/CCMultiSet/Make/argument-1-O/index.html @@ -1,2 +1,2 @@ -O (containers-data.CCMultiSet.Make.O)

Parameter Make.O

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 +O (containers-data.CCMultiSet.Make.O)

Parameter Make.O

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/dev/containers-data/CCMultiSet/Make/index.html b/dev/containers-data/CCMultiSet/Make/index.html index d0c55637..f614cd3e 100644 --- a/dev/containers-data/CCMultiSet/Make/index.html +++ b/dev/containers-data/CCMultiSet/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCMultiSet.Make)

Module CCMultiSet.Make

Parameters

Signature

type elt = O.t
type t
val empty : t
val is_empty : t -> bool
val mem : t -> elt -> bool
val count : t -> elt -> int
val singleton : elt -> t
val add : t -> elt -> t
val remove : t -> elt -> t
val add_mult : t -> elt -> int -> t

add_mult set x n adds n occurrences of x to set.

  • raises Invalid_argument

    if n < 0.

  • since 0.6
val remove_mult : t -> elt -> int -> t

remove_mult set x n removes at most n occurrences of x from set.

  • raises Invalid_argument

    if n < 0.

  • since 0.6
val remove_all : t -> elt -> t

remove_all set x removes all occurrences of x from set.

  • since 0.22
val update : t -> elt -> (int -> int) -> t

update set x f calls f n where n is the current multiplicity of x in set (0 to indicate its absence); the result of f n is the new multiplicity of x.

  • raises Invalid_argument

    if f n < 0.

  • since 0.6
val min : t -> elt

Minimal element w.r.t the total ordering on elements.

val max : t -> elt

Maximal element w.r.t the total ordering on elements.

val union : t -> t -> t

union a b contains as many occurrences of an element x as count a x + count b x.

val meet : t -> t -> t

meet a b is a multiset such that count (meet a b) x = max (count a x) (count b x).

val intersection : t -> t -> t

intersection a b is a multiset such that count (intersection a b) x = min (count a x) (count b x).

val diff : t -> t -> t

MultiSet difference. count (diff a b) x = max (count a x - count b x) 0.

val contains : t -> t -> bool

contains a x = (count m x > 0).

val compare : t -> t -> int
val equal : t -> t -> bool
val cardinal : t -> int

Number of distinct elements.

val iter : t -> (int -> elt -> unit) -> unit
val fold : t -> 'b -> ('b -> int -> elt -> 'b) -> 'b
val of_list : elt list -> t
val to_list : t -> elt list
val to_iter : t -> elt iter
val of_iter : elt iter -> t
val of_list_mult : (elt * int) list -> t
  • since 0.19
val to_list_mult : t -> (elt * int) list
  • since 0.19
val to_iter_mult : t -> (elt * int) iter
  • since 0.19
val of_iter_mult : (elt * int) iter -> t
  • since 0.19
\ No newline at end of file +Make (containers-data.CCMultiSet.Make)

Module CCMultiSet.Make

Parameters

Signature

type elt = O.t
type t
val empty : t
val is_empty : t -> bool
val mem : t -> elt -> bool
val count : t -> elt -> int
val singleton : elt -> t
val add : t -> elt -> t
val remove : t -> elt -> t
val add_mult : t -> elt -> int -> t

add_mult set x n adds n occurrences of x to set.

  • raises Invalid_argument

    if n < 0.

  • since 0.6
val remove_mult : t -> elt -> int -> t

remove_mult set x n removes at most n occurrences of x from set.

  • raises Invalid_argument

    if n < 0.

  • since 0.6
val remove_all : t -> elt -> t

remove_all set x removes all occurrences of x from set.

  • since 0.22
val update : t -> elt -> (int -> int) -> t

update set x f calls f n where n is the current multiplicity of x in set (0 to indicate its absence); the result of f n is the new multiplicity of x.

  • raises Invalid_argument

    if f n < 0.

  • since 0.6
val min : t -> elt

Minimal element w.r.t the total ordering on elements.

val max : t -> elt

Maximal element w.r.t the total ordering on elements.

val union : t -> t -> t

union a b contains as many occurrences of an element x as count a x + count b x.

val meet : t -> t -> t

meet a b is a multiset such that count (meet a b) x = max (count a x) (count b x).

val intersection : t -> t -> t

intersection a b is a multiset such that count (intersection a b) x = min (count a x) (count b x).

val diff : t -> t -> t

MultiSet difference. count (diff a b) x = max (count a x - count b x) 0.

val contains : t -> t -> bool

contains a x = (count m x > 0).

val compare : t -> t -> int
val equal : t -> t -> bool
val cardinal : t -> int

Number of distinct elements.

val iter : t -> (int -> elt -> unit) -> unit
val fold : t -> 'b -> ('b -> int -> elt -> 'b) -> 'b
val of_list : elt list -> t
val to_list : t -> elt list
val to_iter : t -> elt iter
val of_iter : elt iter -> t
val of_list_mult : (elt * int) list -> t
  • since 0.19
val to_list_mult : t -> (elt * int) list
  • since 0.19
val to_iter_mult : t -> (elt * int) iter
  • since 0.19
val of_iter_mult : (elt * int) iter -> t
  • since 0.19
diff --git a/dev/containers-data/CCMultiSet/index.html b/dev/containers-data/CCMultiSet/index.html index 8236bc04..d50adb0f 100644 --- a/dev/containers-data/CCMultiSet/index.html +++ b/dev/containers-data/CCMultiSet/index.html @@ -1,2 +1,2 @@ -CCMultiSet (containers-data.CCMultiSet)

Module CCMultiSet

Multiset

type 'a iter = ('a -> unit) -> unit
module type S = sig ... end
module Make (O : Stdlib.Set.OrderedType) : S with type elt = O.t
\ No newline at end of file +CCMultiSet (containers-data.CCMultiSet)

Module CCMultiSet

Multiset

type 'a iter = ('a -> unit) -> unit
module type S = sig ... end
module Make (O : Stdlib.Set.OrderedType) : S with type elt = O.t
diff --git a/dev/containers-data/CCMultiSet/module-type-S/index.html b/dev/containers-data/CCMultiSet/module-type-S/index.html index 5ae8a874..6814b84e 100644 --- a/dev/containers-data/CCMultiSet/module-type-S/index.html +++ b/dev/containers-data/CCMultiSet/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCMultiSet.S)

Module type CCMultiSet.S

type elt
type t
val empty : t
val is_empty : t -> bool
val mem : t -> elt -> bool
val count : t -> elt -> int
val singleton : elt -> t
val add : t -> elt -> t
val remove : t -> elt -> t
val add_mult : t -> elt -> int -> t

add_mult set x n adds n occurrences of x to set.

  • raises Invalid_argument

    if n < 0.

  • since 0.6
val remove_mult : t -> elt -> int -> t

remove_mult set x n removes at most n occurrences of x from set.

  • raises Invalid_argument

    if n < 0.

  • since 0.6
val remove_all : t -> elt -> t

remove_all set x removes all occurrences of x from set.

  • since 0.22
val update : t -> elt -> (int -> int) -> t

update set x f calls f n where n is the current multiplicity of x in set (0 to indicate its absence); the result of f n is the new multiplicity of x.

  • raises Invalid_argument

    if f n < 0.

  • since 0.6
val min : t -> elt

Minimal element w.r.t the total ordering on elements.

val max : t -> elt

Maximal element w.r.t the total ordering on elements.

val union : t -> t -> t

union a b contains as many occurrences of an element x as count a x + count b x.

val meet : t -> t -> t

meet a b is a multiset such that count (meet a b) x = max (count a x) (count b x).

val intersection : t -> t -> t

intersection a b is a multiset such that count (intersection a b) x = min (count a x) (count b x).

val diff : t -> t -> t

MultiSet difference. count (diff a b) x = max (count a x - count b x) 0.

val contains : t -> t -> bool

contains a x = (count m x > 0).

val compare : t -> t -> int
val equal : t -> t -> bool
val cardinal : t -> int

Number of distinct elements.

val iter : t -> (int -> elt -> unit) -> unit
val fold : t -> 'b -> ('b -> int -> elt -> 'b) -> 'b
val of_list : elt list -> t
val to_list : t -> elt list
val to_iter : t -> elt iter
val of_iter : elt iter -> t
val of_list_mult : (elt * int) list -> t
  • since 0.19
val to_list_mult : t -> (elt * int) list
  • since 0.19
val to_iter_mult : t -> (elt * int) iter
  • since 0.19
val of_iter_mult : (elt * int) iter -> t
  • since 0.19
\ No newline at end of file +S (containers-data.CCMultiSet.S)

Module type CCMultiSet.S

type elt
type t
val empty : t
val is_empty : t -> bool
val mem : t -> elt -> bool
val count : t -> elt -> int
val singleton : elt -> t
val add : t -> elt -> t
val remove : t -> elt -> t
val add_mult : t -> elt -> int -> t

add_mult set x n adds n occurrences of x to set.

  • raises Invalid_argument

    if n < 0.

  • since 0.6
val remove_mult : t -> elt -> int -> t

remove_mult set x n removes at most n occurrences of x from set.

  • raises Invalid_argument

    if n < 0.

  • since 0.6
val remove_all : t -> elt -> t

remove_all set x removes all occurrences of x from set.

  • since 0.22
val update : t -> elt -> (int -> int) -> t

update set x f calls f n where n is the current multiplicity of x in set (0 to indicate its absence); the result of f n is the new multiplicity of x.

  • raises Invalid_argument

    if f n < 0.

  • since 0.6
val min : t -> elt

Minimal element w.r.t the total ordering on elements.

val max : t -> elt

Maximal element w.r.t the total ordering on elements.

val union : t -> t -> t

union a b contains as many occurrences of an element x as count a x + count b x.

val meet : t -> t -> t

meet a b is a multiset such that count (meet a b) x = max (count a x) (count b x).

val intersection : t -> t -> t

intersection a b is a multiset such that count (intersection a b) x = min (count a x) (count b x).

val diff : t -> t -> t

MultiSet difference. count (diff a b) x = max (count a x - count b x) 0.

val contains : t -> t -> bool

contains a x = (count m x > 0).

val compare : t -> t -> int
val equal : t -> t -> bool
val cardinal : t -> int

Number of distinct elements.

val iter : t -> (int -> elt -> unit) -> unit
val fold : t -> 'b -> ('b -> int -> elt -> 'b) -> 'b
val of_list : elt list -> t
val to_list : t -> elt list
val to_iter : t -> elt iter
val of_iter : elt iter -> t
val of_list_mult : (elt * int) list -> t
  • since 0.19
val to_list_mult : t -> (elt * int) list
  • since 0.19
val to_iter_mult : t -> (elt * int) iter
  • since 0.19
val of_iter_mult : (elt * int) iter -> t
  • since 0.19
diff --git a/dev/containers-data/CCMutHeap/Make/argument-1-X/index.html b/dev/containers-data/CCMutHeap/Make/argument-1-X/index.html index 04bfd82a..eff228f2 100644 --- a/dev/containers-data/CCMutHeap/Make/argument-1-X/index.html +++ b/dev/containers-data/CCMutHeap/Make/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers-data.CCMutHeap.Make.X)

Parameter Make.X

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val lt : t -> t -> bool

cmp a b is true iff a < b

\ No newline at end of file +X (containers-data.CCMutHeap.Make.X)

Parameter Make.X

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val lt : t -> t -> bool

cmp a b is true iff a < b

diff --git a/dev/containers-data/CCMutHeap/Make/index.html b/dev/containers-data/CCMutHeap/Make/index.html index be129ae5..b4c41512 100644 --- a/dev/containers-data/CCMutHeap/Make/index.html +++ b/dev/containers-data/CCMutHeap/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCMutHeap.Make)

Module CCMutHeap.Make

Parameters

module X : RANKED

Signature

type elt = X.t

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val increase : t -> elt -> unit

increase h x increases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

  • raises Not_found

    if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file +Make (containers-data.CCMutHeap.Make)

Module CCMutHeap.Make

Parameters

module X : RANKED

Signature

type elt = X.t

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val increase : t -> elt -> unit

increase h x increases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

  • raises Not_found

    if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

diff --git a/dev/containers-data/CCMutHeap/index.html b/dev/containers-data/CCMutHeap/index.html index dc296ec3..f69c6787 100644 --- a/dev/containers-data/CCMutHeap/index.html +++ b/dev/containers-data/CCMutHeap/index.html @@ -1,2 +1,2 @@ -CCMutHeap (containers-data.CCMutHeap)

Module CCMutHeap

Mutable Heaps

The classic binary heap in a vector.

STATUS: experimental, this might change in breaking ways.

module type RANKED = CCMutHeap_intf.RANKED
module type S = CCMutHeap_intf.S
module Make (X : RANKED) : S with type elt = X.t
\ No newline at end of file +CCMutHeap (containers-data.CCMutHeap)

Module CCMutHeap

Mutable Heaps

The classic binary heap in a vector.

STATUS: experimental, this might change in breaking ways.

module type RANKED = CCMutHeap_intf.RANKED
module type S = CCMutHeap_intf.S
module Make (X : RANKED) : S with type elt = X.t
diff --git a/dev/containers-data/CCMutHeap_intf/index.html b/dev/containers-data/CCMutHeap_intf/index.html index ecd0642f..4203a5e0 100644 --- a/dev/containers-data/CCMutHeap_intf/index.html +++ b/dev/containers-data/CCMutHeap_intf/index.html @@ -1,2 +1,2 @@ -CCMutHeap_intf (containers-data.CCMutHeap_intf)

Module CCMutHeap_intf

Imperative Heaps

module type RANKED = sig ... end
module type S = sig ... end
\ No newline at end of file +CCMutHeap_intf (containers-data.CCMutHeap_intf)

Module CCMutHeap_intf

Imperative Heaps

module type RANKED = sig ... end
module type S = sig ... end
diff --git a/dev/containers-data/CCMutHeap_intf/module-type-RANKED/index.html b/dev/containers-data/CCMutHeap_intf/module-type-RANKED/index.html index 900f8510..7c4a924a 100644 --- a/dev/containers-data/CCMutHeap_intf/module-type-RANKED/index.html +++ b/dev/containers-data/CCMutHeap_intf/module-type-RANKED/index.html @@ -1,2 +1,2 @@ -RANKED (containers-data.CCMutHeap_intf.RANKED)

Module type CCMutHeap_intf.RANKED

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val lt : t -> t -> bool

cmp a b is true iff a < b

\ No newline at end of file +RANKED (containers-data.CCMutHeap_intf.RANKED)

Module type CCMutHeap_intf.RANKED

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val lt : t -> t -> bool

cmp a b is true iff a < b

diff --git a/dev/containers-data/CCMutHeap_intf/module-type-S/index.html b/dev/containers-data/CCMutHeap_intf/module-type-S/index.html index 690c26fc..93882cc1 100644 --- a/dev/containers-data/CCMutHeap_intf/module-type-S/index.html +++ b/dev/containers-data/CCMutHeap_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCMutHeap_intf.S)

Module type CCMutHeap_intf.S

type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val increase : t -> elt -> unit

increase h x increases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

  • raises Not_found

    if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file +S (containers-data.CCMutHeap_intf.S)

Module type CCMutHeap_intf.S

type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val increase : t -> elt -> unit

increase h x increases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

  • raises Not_found

    if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

diff --git a/dev/containers-data/CCPersistentArray/index.html b/dev/containers-data/CCPersistentArray/index.html index 15839485..d1ac8114 100644 --- a/dev/containers-data/CCPersistentArray/index.html +++ b/dev/containers-data/CCPersistentArray/index.html @@ -1,2 +1,2 @@ -CCPersistentArray (containers-data.CCPersistentArray)

Module CCPersistentArray

Persistent Arrays

From the paper by Jean-Christophe Filliรขtre, "A persistent Union-Find data structure", see the ps version

type 'a t

The type of persistent arrays

val make : int -> 'a -> 'a t

make n x returns a persistent array of length n, 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 init : int -> (int -> 'a) -> 'a t

init n f returns a persistent array of length n, with element i initialized to the result of f i.

  • 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 get : 'a t -> int -> 'a

get a i returns the element with index i from the array a.

  • raises Invalid_argument

    "index out of bounds" if n is outside the range 0 to Array.length a - 1.

val set : 'a t -> int -> 'a -> 'a t

set a i v sets the element index i from the array a to v.

  • raises Invalid_argument

    "index out of bounds" if n is outside the range 0 to Array.length a - 1.

val length : 'a t -> int

Return the length of the persistent array.

val copy : 'a t -> 'a t

copy a returns a fresh copy of a. Both copies are independent.

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

Apply the given function to all elements of the array, and return a persistent array initialized by the results of f. In the case of mapi, the function is also given the index of the element. It is equivalent to fun f t -> init (fun i -> f (get t i)).

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

iter f t applies function f to all elements of the persistent array, in order from element 0 to element length t - 1.

val iteri : (int -> 'a -> unit) -> 'a t -> unit
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b

Fold on the elements of the array.

val append : 'a t -> 'a t -> 'a t

Append the two arrays.

  • since 0.13
val flatten : 'a t t -> 'a t

Concatenates all the sub-arrays.

  • since 0.13
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

Flat map (map + concatenation).

  • since 0.13
val to_array : 'a t -> 'a array

to_array t returns a mutable copy of t.

val of_array : 'a array -> 'a t

of_array a returns an immutable copy of a.

val to_list : 'a t -> 'a list

to_list t returns the list of elements in t.

val of_list : 'a list -> 'a t

of_list l returns a fresh persistent array containing the elements of l.

val of_rev_list : 'a list -> 'a t

of_rev_list l is the same as of_list (List.rev l) but more efficient.

  • since 0.13

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val to_iter : 'a t -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
  • since 0.13
val to_gen : 'a t -> 'a gen
  • since 0.13

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : 'a printer -> 'a t printer
  • since 0.13
\ No newline at end of file +CCPersistentArray (containers-data.CCPersistentArray)

Module CCPersistentArray

Persistent Arrays

From the paper by Jean-Christophe Filliรขtre, "A persistent Union-Find data structure", see the ps version

type 'a t

The type of persistent arrays

val make : int -> 'a -> 'a t

make n x returns a persistent array of length n, 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 init : int -> (int -> 'a) -> 'a t

init n f returns a persistent array of length n, with element i initialized to the result of f i.

  • 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 get : 'a t -> int -> 'a

get a i returns the element with index i from the array a.

  • raises Invalid_argument

    "index out of bounds" if n is outside the range 0 to Array.length a - 1.

val set : 'a t -> int -> 'a -> 'a t

set a i v sets the element index i from the array a to v.

  • raises Invalid_argument

    "index out of bounds" if n is outside the range 0 to Array.length a - 1.

val length : 'a t -> int

Return the length of the persistent array.

val copy : 'a t -> 'a t

copy a returns a fresh copy of a. Both copies are independent.

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

Apply the given function to all elements of the array, and return a persistent array initialized by the results of f. In the case of mapi, the function is also given the index of the element. It is equivalent to fun f t -> init (fun i -> f (get t i)).

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

iter f t applies function f to all elements of the persistent array, in order from element 0 to element length t - 1.

val iteri : (int -> 'a -> unit) -> 'a t -> unit
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b

Fold on the elements of the array.

val append : 'a t -> 'a t -> 'a t

Append the two arrays.

  • since 0.13
val flatten : 'a t t -> 'a t

Concatenates all the sub-arrays.

  • since 0.13
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

Flat map (map + concatenation).

  • since 0.13
val to_array : 'a t -> 'a array

to_array t returns a mutable copy of t.

val of_array : 'a array -> 'a t

of_array a returns an immutable copy of a.

val to_list : 'a t -> 'a list

to_list t returns the list of elements in t.

val of_list : 'a list -> 'a t

of_list l returns a fresh persistent array containing the elements of l.

val of_rev_list : 'a list -> 'a t

of_rev_list l is the same as of_list (List.rev l) but more efficient.

  • since 0.13

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val to_iter : 'a t -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
  • since 0.13
val to_gen : 'a t -> 'a gen
  • since 0.13

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : 'a printer -> 'a t printer
  • since 0.13
diff --git a/dev/containers-data/CCPersistentHashtbl/Make/argument-1-H/index.html b/dev/containers-data/CCPersistentHashtbl/Make/argument-1-H/index.html index b4db5093..69bc2d4d 100644 --- a/dev/containers-data/CCPersistentHashtbl/Make/argument-1-H/index.html +++ b/dev/containers-data/CCPersistentHashtbl/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (containers-data.CCPersistentHashtbl.Make.H)

Parameter Make.H

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +H (containers-data.CCPersistentHashtbl.Make.H)

Parameter Make.H

type t
val equal : t -> t -> bool
val hash : t -> int
diff --git a/dev/containers-data/CCPersistentHashtbl/Make/index.html b/dev/containers-data/CCPersistentHashtbl/Make/index.html index 8565768e..7ddc5a65 100644 --- a/dev/containers-data/CCPersistentHashtbl/Make/index.html +++ b/dev/containers-data/CCPersistentHashtbl/Make/index.html @@ -1,13 +1,13 @@ -Make (containers-data.CCPersistentHashtbl.Make)

Module CCPersistentHashtbl.Make

Parameters

module H : HashedType

Signature

type key = H.t
type 'a t
val empty : unit -> 'a t

Empty table. The table will be allocated at the first binding.

val create : int -> 'a t

Create a new hashtable, with the given initial capacity.

val is_empty : 'a t -> bool

Is the table empty?

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

Find the value for this key, or fails.

  • raises Not_found

    if the key is not present in the table.

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

Synonym to find with flipped arguments.

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

Safe version of get_exn.

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

Is the key bound?

val length : _ t -> int

Number of bindings.

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

Add the binding to the table, returning a new table. The old binding for this key, if it exists, is shadowed and will be restored upon remove tbl k.

  • since 0.14
val replace : 'a t -> key -> 'a -> 'a t

Add the binding to the table, returning a new table. This erases the current binding for key, if any.

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

update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.

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

Remove the key.

val copy : 'a t -> 'a t

Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.

val merge : - f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> +Make (containers-data.CCPersistentHashtbl.Make)

Module CCPersistentHashtbl.Make

Parameters

module H : HashedType

Signature

type key = H.t
type 'a t
val empty : unit -> 'a t

Empty table. The table will be allocated at the first binding.

val create : int -> 'a t

Create a new hashtable, with the given initial capacity.

val is_empty : 'a t -> bool

Is the table empty?

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

Find the value for this key, or fails.

  • raises Not_found

    if the key is not present in the table.

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

Synonym to find with flipped arguments.

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

Safe version of get_exn.

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

Is the key bound?

val length : _ t -> int

Number of bindings.

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

Add the binding to the table, returning a new table. The old binding for this key, if it exists, is shadowed and will be restored upon remove tbl k.

  • since 0.14
val replace : 'a t -> key -> 'a -> 'a t

Add the binding to the table, returning a new table. This erases the current binding for key, if any.

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

update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.

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

Remove the key.

val copy : 'a t -> 'a t

Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.

val merge : + f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> 'a t -> 'b t -> 'c t

Merge two tables together into a new table. The function's argument correspond to values associated with the key (if present); if the function returns None the key will not appear in the result.

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

Iterate over bindings.

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

Fold over bindings.

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

Map all values.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool

Conversions

val of_iter : (key * 'a) iter -> 'a t

Add (replace) bindings from the sequence to the table.

val of_list : (key * 'a) list -> 'a t
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val add_list : 'a t -> (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter

Iter of the bindings of the table.

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

Misc

val equal : 'a equal -> 'a t equal
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> - ?pp_arrow:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> + ?pp_arrow:unit printer -> key printer -> 'a printer -> - 'a t printer
val stats : _ t -> Stdlib.Hashtbl.statistics

Statistics on the internal table.

  • since 0.14
\ No newline at end of file + 'a t printer
val stats : _ t -> Stdlib.Hashtbl.statistics

Statistics on the internal table.

  • since 0.14
diff --git a/dev/containers-data/CCPersistentHashtbl/index.html b/dev/containers-data/CCPersistentHashtbl/index.html index 80374523..96101f2d 100644 --- a/dev/containers-data/CCPersistentHashtbl/index.html +++ b/dev/containers-data/CCPersistentHashtbl/index.html @@ -1,2 +1,2 @@ -CCPersistentHashtbl (containers-data.CCPersistentHashtbl)

Module CCPersistentHashtbl

Persistent hash-table on top of OCaml's hashtables

Almost as efficient as the regular Hashtbl type, but with a persistent interface (rewinding changes to get back in the past history). This is mostly useful for backtracking-like uses, or forward uses (never using old values).

This module is not thread-safe.

type 'a iter = ('a -> unit) -> unit
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a equal = 'a -> 'a -> bool
module type HashedType = sig ... end

Signature of such a hashtable

module type S = sig ... end

Implementation

module Make (H : HashedType) : S with type key = H.t
\ No newline at end of file +CCPersistentHashtbl (containers-data.CCPersistentHashtbl)

Module CCPersistentHashtbl

Persistent hash-table on top of OCaml's hashtables

Almost as efficient as the regular Hashtbl type, but with a persistent interface (rewinding changes to get back in the past history). This is mostly useful for backtracking-like uses, or forward uses (never using old values).

This module is not thread-safe.

type 'a iter = ('a -> unit) -> unit
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a equal = 'a -> 'a -> bool
module type HashedType = sig ... end

Signature of such a hashtable

module type S = sig ... end

Implementation

module Make (H : HashedType) : S with type key = H.t
diff --git a/dev/containers-data/CCPersistentHashtbl/module-type-HashedType/index.html b/dev/containers-data/CCPersistentHashtbl/module-type-HashedType/index.html index d617a7fe..b0a073c7 100644 --- a/dev/containers-data/CCPersistentHashtbl/module-type-HashedType/index.html +++ b/dev/containers-data/CCPersistentHashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (containers-data.CCPersistentHashtbl.HashedType)

Module type CCPersistentHashtbl.HashedType

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +HashedType (containers-data.CCPersistentHashtbl.HashedType)

Module type CCPersistentHashtbl.HashedType

type t
val equal : t -> t -> bool
val hash : t -> int
diff --git a/dev/containers-data/CCPersistentHashtbl/module-type-S/index.html b/dev/containers-data/CCPersistentHashtbl/module-type-S/index.html index d3e57658..bdbcf5f8 100644 --- a/dev/containers-data/CCPersistentHashtbl/module-type-S/index.html +++ b/dev/containers-data/CCPersistentHashtbl/module-type-S/index.html @@ -1,13 +1,13 @@ -S (containers-data.CCPersistentHashtbl.S)

Module type CCPersistentHashtbl.S

type key
type 'a t
val empty : unit -> 'a t

Empty table. The table will be allocated at the first binding.

val create : int -> 'a t

Create a new hashtable, with the given initial capacity.

val is_empty : 'a t -> bool

Is the table empty?

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

Find the value for this key, or fails.

  • raises Not_found

    if the key is not present in the table.

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

Synonym to find with flipped arguments.

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

Safe version of get_exn.

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

Is the key bound?

val length : _ t -> int

Number of bindings.

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

Add the binding to the table, returning a new table. The old binding for this key, if it exists, is shadowed and will be restored upon remove tbl k.

  • since 0.14
val replace : 'a t -> key -> 'a -> 'a t

Add the binding to the table, returning a new table. This erases the current binding for key, if any.

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

update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.

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

Remove the key.

val copy : 'a t -> 'a t

Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.

val merge : - f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> +S (containers-data.CCPersistentHashtbl.S)

Module type CCPersistentHashtbl.S

type key
type 'a t
val empty : unit -> 'a t

Empty table. The table will be allocated at the first binding.

val create : int -> 'a t

Create a new hashtable, with the given initial capacity.

val is_empty : 'a t -> bool

Is the table empty?

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

Find the value for this key, or fails.

  • raises Not_found

    if the key is not present in the table.

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

Synonym to find with flipped arguments.

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

Safe version of get_exn.

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

Is the key bound?

val length : _ t -> int

Number of bindings.

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

Add the binding to the table, returning a new table. The old binding for this key, if it exists, is shadowed and will be restored upon remove tbl k.

  • since 0.14
val replace : 'a t -> key -> 'a -> 'a t

Add the binding to the table, returning a new table. This erases the current binding for key, if any.

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

update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.

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

Remove the key.

val copy : 'a t -> 'a t

Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.

val merge : + f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> 'a t -> 'b t -> 'c t

Merge two tables together into a new table. The function's argument correspond to values associated with the key (if present); if the function returns None the key will not appear in the result.

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

Iterate over bindings.

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

Fold over bindings.

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

Map all values.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool

Conversions

val of_iter : (key * 'a) iter -> 'a t

Add (replace) bindings from the sequence to the table.

val of_list : (key * 'a) list -> 'a t
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val add_list : 'a t -> (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter

Iter of the bindings of the table.

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

Misc

val equal : 'a equal -> 'a t equal
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> - ?pp_arrow:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> + ?pp_arrow:unit printer -> key printer -> 'a printer -> - 'a t printer
val stats : _ t -> Stdlib.Hashtbl.statistics

Statistics on the internal table.

  • since 0.14
\ No newline at end of file + 'a t printer
val stats : _ t -> Stdlib.Hashtbl.statistics

Statistics on the internal table.

  • since 0.14
diff --git a/dev/containers-data/CCRAL/Infix/index.html b/dev/containers-data/CCRAL/Infix/index.html index 643aae25..24189b8a 100644 --- a/dev/containers-data/CCRAL/Infix/index.html +++ b/dev/containers-data/CCRAL/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers-data.CCRAL.Infix)

Module CCRAL.Infix

val (@+) : 'a -> 'a t -> 'a t

Cons (alias to cons).

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

Alias to flat_map.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Alias to app.

val (--) : int -> int -> int t

Alias to range.

val (--^) : int -> int -> int t

a --^ b is the integer range from a to b, where b is excluded.

  • since 0.17
\ No newline at end of file +Infix (containers-data.CCRAL.Infix)

Module CCRAL.Infix

val (@+) : 'a -> 'a t -> 'a t

Cons (alias to cons).

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

Alias to flat_map.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Alias to app.

val (--) : int -> int -> int t

Alias to range.

val (--^) : int -> int -> int t

a --^ b is the integer range from a to b, where b is excluded.

  • since 0.17
diff --git a/dev/containers-data/CCRAL/index.html b/dev/containers-data/CCRAL/index.html index 24806903..60aa4e67 100644 --- a/dev/containers-data/CCRAL/index.html +++ b/dev/containers-data/CCRAL/index.html @@ -1,2 +1,2 @@ -CCRAL (containers-data.CCRAL)

Module CCRAL

Random-Access Lists

This is an OCaml implementation of Okasaki's paper "Purely Functional Random Access Lists". It defines a list-like data structure with O(1) cons/tail operations, and O(log(n)) lookup/modification operations.

This module used to be part of containers.misc

status: stable

type +'a t

List containing elements of type 'a

val empty : 'a t

Empty list.

val is_empty : _ t -> bool

Check whether the list is empty.

val cons : 'a -> 'a t -> 'a t

Add an element at the front of the list.

val return : 'a -> 'a t

Singleton.

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

Map on elements.

val mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b t

Map with index.

val hd : 'a t -> 'a

First element of the list, or

  • raises Invalid_argument

    if the list is empty.

val tl : 'a t -> 'a t

Remove the first element from the list, or

  • raises Invalid_argument

    if the list is empty.

val front : 'a t -> ('a * 'a t) option

Remove and return the first element of the list.

val front_exn : 'a t -> 'a * 'a t

Unsafe version of front.

  • raises Invalid_argument

    if the list is empty.

val length : 'a t -> int

Number of elements. Complexity O(ln n) where n=number of elements.

val get : 'a t -> int -> 'a option

get l i accesses the i-th element of the list. O(log(n)).

val get_exn : 'a t -> int -> 'a

Unsafe version of get.

  • raises Invalid_argument

    if the list has less than i+1 elements.

val set : 'a t -> int -> 'a -> 'a t

set l i v sets the i-th element of the list to v. O(log(n)).

  • raises Invalid_argument

    if the list has less than i+1 elements.

val remove : 'a t -> int -> 'a t

remove l i removes the i-th element of l.

  • raises Invalid_argument

    if the list has less than i+1 elements.

val get_and_remove_exn : 'a t -> int -> 'a * 'a t

get_and_remove_exn l i accesses and removes the i-th element of l.

  • raises Invalid_argument

    if the list has less than i+1 elements.

val append : 'a t -> 'a t -> 'a t
val filter : f:('a -> bool) -> 'a t -> 'a t
val filter_map : f:('a -> 'b option) -> 'a t -> 'b t
val flat_map : ('a -> 'b t) -> 'a t -> 'b t
val flatten : 'a t t -> 'a t
val app : ('a -> 'b) t -> 'a t -> 'b t
val take : int -> 'a t -> 'a t
val take_while : f:('a -> bool) -> 'a t -> 'a t
val drop : int -> 'a t -> 'a t
val drop_while : f:('a -> bool) -> 'a t -> 'a t
val take_drop : int -> 'a t -> 'a t * 'a t

take_drop n l splits l into a, b such that length a = n if length l >= n, and such that append a b = l.

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

Iterate on the list's elements.

val iteri : f:(int -> 'a -> unit) -> 'a t -> unit
val fold : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'b

Fold on the list's elements.

val fold_rev : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'b

Fold on the list's elements, in reverse order (starting from the tail).

val rev_map : f:('a -> 'b) -> 'a t -> 'b t

rev_map f l is the same as map f (rev l).

val rev : 'a t -> 'a t

Reverse the list.

val equal : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

Lexicographic comparison.

Utils

val make : int -> 'a -> 'a t
val repeat : int -> 'a t -> 'a t

repeat n l is append l (append l ... l) n times.

val range : int -> int -> int t

range i j is i; i+1; ... ; j or j; j-1; ...; i.

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val add_list : 'a t -> 'a list -> 'a t
val of_list : 'a list -> 'a t

Convert a list to a RAL. Caution: non tail-rec.

val to_list : 'a t -> 'a list
val of_list_map : f:('a -> 'b) -> 'a list -> 'b t

Combination of of_list and map.

val of_array : 'a array -> 'a t
val add_array : 'a t -> 'a array -> 'a t
val to_array : 'a t -> 'a array

More efficient than on usual lists.

val add_iter : 'a t -> 'a iter -> 'a t
val of_iter : 'a iter -> 'a t
val to_iter : 'a t -> 'a iter
val add_gen : 'a t -> 'a gen -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

Infix

module Infix : sig ... end
include module type of Infix
val (@+) : 'a -> 'a t -> 'a t

Cons (alias to cons).

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

Alias to flat_map.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Alias to app.

val (--) : int -> int -> int t

Alias to range.

val (--^) : int -> int -> int t

a --^ b is the integer range from a to b, where b is excluded.

  • since 0.17

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : ?pp_sep:unit printer -> 'a printer -> 'a t printer
\ No newline at end of file +CCRAL (containers-data.CCRAL)

Module CCRAL

Random-Access Lists

This is an OCaml implementation of Okasaki's paper "Purely Functional Random Access Lists". It defines a list-like data structure with O(1) cons/tail operations, and O(log(n)) lookup/modification operations.

This module used to be part of containers.misc

status: stable

type +'a t

List containing elements of type 'a

val empty : 'a t

Empty list.

val is_empty : _ t -> bool

Check whether the list is empty.

val cons : 'a -> 'a t -> 'a t

Add an element at the front of the list.

val return : 'a -> 'a t

Singleton.

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

Map on elements.

val mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b t

Map with index.

val hd : 'a t -> 'a

First element of the list, or

  • raises Invalid_argument

    if the list is empty.

val tl : 'a t -> 'a t

Remove the first element from the list, or

  • raises Invalid_argument

    if the list is empty.

val front : 'a t -> ('a * 'a t) option

Remove and return the first element of the list.

val front_exn : 'a t -> 'a * 'a t

Unsafe version of front.

  • raises Invalid_argument

    if the list is empty.

val length : 'a t -> int

Number of elements. Complexity O(ln n) where n=number of elements.

val get : 'a t -> int -> 'a option

get l i accesses the i-th element of the list. O(log(n)).

val get_exn : 'a t -> int -> 'a

Unsafe version of get.

  • raises Invalid_argument

    if the list has less than i+1 elements.

val set : 'a t -> int -> 'a -> 'a t

set l i v sets the i-th element of the list to v. O(log(n)).

  • raises Invalid_argument

    if the list has less than i+1 elements.

val remove : 'a t -> int -> 'a t

remove l i removes the i-th element of l.

  • raises Invalid_argument

    if the list has less than i+1 elements.

val get_and_remove_exn : 'a t -> int -> 'a * 'a t

get_and_remove_exn l i accesses and removes the i-th element of l.

  • raises Invalid_argument

    if the list has less than i+1 elements.

val append : 'a t -> 'a t -> 'a t
val filter : f:('a -> bool) -> 'a t -> 'a t
val filter_map : f:('a -> 'b option) -> 'a t -> 'b t
val flat_map : ('a -> 'b t) -> 'a t -> 'b t
val flatten : 'a t t -> 'a t
val app : ('a -> 'b) t -> 'a t -> 'b t
val take : int -> 'a t -> 'a t
val take_while : f:('a -> bool) -> 'a t -> 'a t
val drop : int -> 'a t -> 'a t
val drop_while : f:('a -> bool) -> 'a t -> 'a t
val take_drop : int -> 'a t -> 'a t * 'a t

take_drop n l splits l into a, b such that length a = n if length l >= n, and such that append a b = l.

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

Iterate on the list's elements.

val iteri : f:(int -> 'a -> unit) -> 'a t -> unit
val fold : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'b

Fold on the list's elements.

val fold_rev : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'b

Fold on the list's elements, in reverse order (starting from the tail).

val rev_map : f:('a -> 'b) -> 'a t -> 'b t

rev_map f l is the same as map f (rev l).

val rev : 'a t -> 'a t

Reverse the list.

val equal : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

Lexicographic comparison.

Utils

val make : int -> 'a -> 'a t
val repeat : int -> 'a t -> 'a t

repeat n l is append l (append l ... l) n times.

val range : int -> int -> int t

range i j is i; i+1; ... ; j or j; j-1; ...; i.

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val add_list : 'a t -> 'a list -> 'a t
val of_list : 'a list -> 'a t

Convert a list to a RAL. Caution: non tail-rec.

val to_list : 'a t -> 'a list
val of_list_map : f:('a -> 'b) -> 'a list -> 'b t

Combination of of_list and map.

val of_array : 'a array -> 'a t
val add_array : 'a t -> 'a array -> 'a t
val to_array : 'a t -> 'a array

More efficient than on usual lists.

val add_iter : 'a t -> 'a iter -> 'a t
val of_iter : 'a iter -> 'a t
val to_iter : 'a t -> 'a iter
val add_gen : 'a t -> 'a gen -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

Infix

module Infix : sig ... end
include module type of Infix
val (@+) : 'a -> 'a t -> 'a t

Cons (alias to cons).

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

Alias to flat_map.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Alias to app.

val (--) : int -> int -> int t

Alias to range.

val (--^) : int -> int -> int t

a --^ b is the integer range from a to b, where b is excluded.

  • since 0.17

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : ?pp_sep:unit printer -> 'a printer -> 'a t printer
diff --git a/dev/containers-data/CCRingBuffer/Array/Byte/index.html b/dev/containers-data/CCRingBuffer/Array/Byte/index.html index cf04a734..8e39bbcf 100644 --- a/dev/containers-data/CCRingBuffer/Array/Byte/index.html +++ b/dev/containers-data/CCRingBuffer/Array/Byte/index.html @@ -1,2 +1,2 @@ -Byte (containers-data.CCRingBuffer.Array.Byte)

Module Array.Byte

Efficient array version for the char type

type elt = char

The element type

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

\ No newline at end of file +Byte (containers-data.CCRingBuffer.Array.Byte)

Module Array.Byte

Efficient array version for the char type

type elt = char

The element type

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

diff --git a/dev/containers-data/CCRingBuffer/Array/Make/argument-1-Elt/index.html b/dev/containers-data/CCRingBuffer/Array/Make/argument-1-Elt/index.html index 719eba6e..c536ae53 100644 --- a/dev/containers-data/CCRingBuffer/Array/Make/argument-1-Elt/index.html +++ b/dev/containers-data/CCRingBuffer/Array/Make/argument-1-Elt/index.html @@ -1,2 +1,2 @@ -Elt (containers-data.CCRingBuffer.Array.Make.Elt)

Parameter Make.Elt

type t
val dummy : t
\ No newline at end of file +Elt (containers-data.CCRingBuffer.Array.Make.Elt)

Parameter Make.Elt

type t
val dummy : t
diff --git a/dev/containers-data/CCRingBuffer/Array/Make/index.html b/dev/containers-data/CCRingBuffer/Array/Make/index.html index b2d77995..5d6537fa 100644 --- a/dev/containers-data/CCRingBuffer/Array/Make/index.html +++ b/dev/containers-data/CCRingBuffer/Array/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCRingBuffer.Array.Make)

Module Array.Make

Makes an array given an arbitrary element type

Parameters

module Elt : sig ... end

Signature

type elt = Elt.t

The element type

type t = Elt.t array

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

\ No newline at end of file +Make (containers-data.CCRingBuffer.Array.Make)

Module Array.Make

Makes an array given an arbitrary element type

Parameters

module Elt : sig ... end

Signature

type elt = Elt.t

The element type

type t = Elt.t array

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

diff --git a/dev/containers-data/CCRingBuffer/Array/index.html b/dev/containers-data/CCRingBuffer/Array/index.html index 1a78ead4..656da8dc 100644 --- a/dev/containers-data/CCRingBuffer/Array/index.html +++ b/dev/containers-data/CCRingBuffer/Array/index.html @@ -1,4 +1,4 @@ -Array (containers-data.CCRingBuffer.Array)

Module CCRingBuffer.Array

The abstract type for arrays

module type S = sig ... end
module Byte : S with type elt = char and type t = Stdlib.Bytes.t

Efficient array version for the char type

module Make +Array (containers-data.CCRingBuffer.Array)

Module CCRingBuffer.Array

The abstract type for arrays

module type S = sig ... end
module Byte : S with type elt = char and type t = Stdlib.Bytes.t

Efficient array version for the char type

module Make (Elt : sig ... end) : - S with type elt = Elt.t and type t = Elt.t array

Makes an array given an arbitrary element type

\ No newline at end of file + S with type elt = Elt.t and type t = Elt.t array

Makes an array given an arbitrary element type

diff --git a/dev/containers-data/CCRingBuffer/Array/module-type-S/index.html b/dev/containers-data/CCRingBuffer/Array/module-type-S/index.html index b1b900ca..4845aea7 100644 --- a/dev/containers-data/CCRingBuffer/Array/module-type-S/index.html +++ b/dev/containers-data/CCRingBuffer/Array/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCRingBuffer.Array.S)

Module type Array.S

type elt

The element type

type t

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

\ No newline at end of file +S (containers-data.CCRingBuffer.Array.S)

Module type Array.S

type elt

The element type

type t

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

diff --git a/dev/containers-data/CCRingBuffer/Byte/index.html b/dev/containers-data/CCRingBuffer/Byte/index.html index 86f4bac3..0964a48f 100644 --- a/dev/containers-data/CCRingBuffer/Byte/index.html +++ b/dev/containers-data/CCRingBuffer/Byte/index.html @@ -1,2 +1,2 @@ -Byte (containers-data.CCRingBuffer.Byte)

Module CCRingBuffer.Byte

An efficient byte based ring buffer

module Array = Array.Byte

The module type of Array for this ring buffer

type t

Defines the bounded ring buffer type

exception Empty

Raised in querying functions when the buffer is empty

val create : int -> t

create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.

  • raises Invalid_argument

    if the argument is < 1.

val copy : t -> t

Make a fresh copy of the buffer.

val capacity : t -> int

Length of the inner buffer.

val length : t -> int

Number of elements currently stored in the buffer.

val is_full : t -> bool

true if pushing an element would erase another element.

  • since 1.3
val blit_from : t -> Array.t -> int -> int -> unit

blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val blit_into : t -> Array.t -> int -> int -> int

blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.

  • returns

    the number of elements actually copied (min len (length buf)).

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val append : t -> into:t -> unit

append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.

val to_list : t -> Array.elt list

Extract the current content into a list.

val clear : t -> unit

Clear the content of the buffer

val is_empty : t -> bool

Is the buffer empty (i.e. contains no elements)?

val junk_front : t -> unit

Drop the front element from t.

  • raises Empty

    if the buffer is already empty.

val junk_back : t -> unit

Drop the back element from t.

  • raises Empty

    if the buffer is already empty.

val skip : t -> int -> unit

skip b len removes len elements from the front of b.

  • raises Invalid_argument

    if len > length b.

val iter : t -> f:(Array.elt -> unit) -> unit

iter b ~f calls f i t for each element t in buf.

val iteri : t -> f:(int -> Array.elt -> unit) -> unit

iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.

val get_front : t -> int -> Array.elt

get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val get_back : t -> int -> Array.elt

get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val push_back : t -> Array.elt -> unit

Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.

val peek_front : t -> Array.elt option

First value from front of t, without modification.

val peek_front_exn : t -> Array.elt

First value from front of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val peek_back : t -> Array.elt option

Get the last value from back of t, without modification.

val peek_back_exn : t -> Array.elt

Get the last value from back of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val take_back : t -> Array.elt option

Take and remove the last value from back of t, if any.

val take_back_exn : t -> Array.elt

Take and remove the last value from back of t.

  • raises Empty

    if buffer is already empty.

val take_front : t -> Array.elt option

Take and remove the first value from front of t, if any.

val take_front_exn : t -> Array.elt

Take and remove the first value from front of t.

  • raises Empty

    if buffer is already empty.

val of_array : Array.t -> t

Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).

  • since 0.11
val to_array : t -> Array.t

Create an array from the elements, in order.

  • since 0.11
\ No newline at end of file +Byte (containers-data.CCRingBuffer.Byte)

Module CCRingBuffer.Byte

An efficient byte based ring buffer

module Array = Array.Byte

The module type of Array for this ring buffer

type t

Defines the bounded ring buffer type

exception Empty

Raised in querying functions when the buffer is empty

val create : int -> t

create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.

  • raises Invalid_argument

    if the argument is < 1.

val copy : t -> t

Make a fresh copy of the buffer.

val capacity : t -> int

Length of the inner buffer.

val length : t -> int

Number of elements currently stored in the buffer.

val is_full : t -> bool

true if pushing an element would erase another element.

  • since 1.3
val blit_from : t -> Array.t -> int -> int -> unit

blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val blit_into : t -> Array.t -> int -> int -> int

blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.

  • returns

    the number of elements actually copied (min len (length buf)).

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val append : t -> into:t -> unit

append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.

val to_list : t -> Array.elt list

Extract the current content into a list.

val clear : t -> unit

Clear the content of the buffer

val is_empty : t -> bool

Is the buffer empty (i.e. contains no elements)?

val junk_front : t -> unit

Drop the front element from t.

  • raises Empty

    if the buffer is already empty.

val junk_back : t -> unit

Drop the back element from t.

  • raises Empty

    if the buffer is already empty.

val skip : t -> int -> unit

skip b len removes len elements from the front of b.

  • raises Invalid_argument

    if len > length b.

val iter : t -> f:(Array.elt -> unit) -> unit

iter b ~f calls f i t for each element t in buf.

val iteri : t -> f:(int -> Array.elt -> unit) -> unit

iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.

val get_front : t -> int -> Array.elt

get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val get_back : t -> int -> Array.elt

get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val push_back : t -> Array.elt -> unit

Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.

val peek_front : t -> Array.elt option

First value from front of t, without modification.

val peek_front_exn : t -> Array.elt

First value from front of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val peek_back : t -> Array.elt option

Get the last value from back of t, without modification.

val peek_back_exn : t -> Array.elt

Get the last value from back of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val take_back : t -> Array.elt option

Take and remove the last value from back of t, if any.

val take_back_exn : t -> Array.elt

Take and remove the last value from back of t.

  • raises Empty

    if buffer is already empty.

val take_front : t -> Array.elt option

Take and remove the first value from front of t, if any.

val take_front_exn : t -> Array.elt

Take and remove the first value from front of t.

  • raises Empty

    if buffer is already empty.

val of_array : Array.t -> t

Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).

  • since 0.11
val to_array : t -> Array.t

Create an array from the elements, in order.

  • since 0.11
diff --git a/dev/containers-data/CCRingBuffer/Make/Array/index.html b/dev/containers-data/CCRingBuffer/Make/Array/index.html index 07de704f..6fd2b642 100644 --- a/dev/containers-data/CCRingBuffer/Make/Array/index.html +++ b/dev/containers-data/CCRingBuffer/Make/Array/index.html @@ -1,2 +1,2 @@ -Array (containers-data.CCRingBuffer.Make.Array)

Module Make.Array

The module type of Array for this ring buffer

type elt = X.t

The element type

type t = X.t array

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

\ No newline at end of file +Array (containers-data.CCRingBuffer.Make.Array)

Module Make.Array

The module type of Array for this ring buffer

type elt = X.t

The element type

type t = X.t array

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

diff --git a/dev/containers-data/CCRingBuffer/Make/argument-1-X/index.html b/dev/containers-data/CCRingBuffer/Make/argument-1-X/index.html index 6a86dddf..31c7d513 100644 --- a/dev/containers-data/CCRingBuffer/Make/argument-1-X/index.html +++ b/dev/containers-data/CCRingBuffer/Make/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers-data.CCRingBuffer.Make.X)

Parameter Make.X

type t
val dummy : t
\ No newline at end of file +X (containers-data.CCRingBuffer.Make.X)

Parameter Make.X

type t
val dummy : t
diff --git a/dev/containers-data/CCRingBuffer/Make/index.html b/dev/containers-data/CCRingBuffer/Make/index.html index 9fdb658f..de74b11d 100644 --- a/dev/containers-data/CCRingBuffer/Make/index.html +++ b/dev/containers-data/CCRingBuffer/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCRingBuffer.Make)

Module CCRingBuffer.Make

Buffer using regular arrays

Parameters

module X : sig ... end

Signature

module Array : Array.S with type elt = X.t with type t = X.t array

The module type of Array for this ring buffer

type t

Defines the bounded ring buffer type

exception Empty

Raised in querying functions when the buffer is empty

val create : int -> t

create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.

  • raises Invalid_argument

    if the argument is < 1.

val copy : t -> t

Make a fresh copy of the buffer.

val capacity : t -> int

Length of the inner buffer.

val length : t -> int

Number of elements currently stored in the buffer.

val is_full : t -> bool

true if pushing an element would erase another element.

  • since 1.3
val blit_from : t -> Array.t -> int -> int -> unit

blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val blit_into : t -> Array.t -> int -> int -> int

blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.

  • returns

    the number of elements actually copied (min len (length buf)).

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val append : t -> into:t -> unit

append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.

val to_list : t -> Array.elt list

Extract the current content into a list.

val clear : t -> unit

Clear the content of the buffer

val is_empty : t -> bool

Is the buffer empty (i.e. contains no elements)?

val junk_front : t -> unit

Drop the front element from t.

  • raises Empty

    if the buffer is already empty.

val junk_back : t -> unit

Drop the back element from t.

  • raises Empty

    if the buffer is already empty.

val skip : t -> int -> unit

skip b len removes len elements from the front of b.

  • raises Invalid_argument

    if len > length b.

val iter : t -> f:(Array.elt -> unit) -> unit

iter b ~f calls f i t for each element t in buf.

val iteri : t -> f:(int -> Array.elt -> unit) -> unit

iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.

val get_front : t -> int -> Array.elt

get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val get_back : t -> int -> Array.elt

get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val push_back : t -> Array.elt -> unit

Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.

val peek_front : t -> Array.elt option

First value from front of t, without modification.

val peek_front_exn : t -> Array.elt

First value from front of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val peek_back : t -> Array.elt option

Get the last value from back of t, without modification.

val peek_back_exn : t -> Array.elt

Get the last value from back of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val take_back : t -> Array.elt option

Take and remove the last value from back of t, if any.

val take_back_exn : t -> Array.elt

Take and remove the last value from back of t.

  • raises Empty

    if buffer is already empty.

val take_front : t -> Array.elt option

Take and remove the first value from front of t, if any.

val take_front_exn : t -> Array.elt

Take and remove the first value from front of t.

  • raises Empty

    if buffer is already empty.

val of_array : Array.t -> t

Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).

  • since 0.11
val to_array : t -> Array.t

Create an array from the elements, in order.

  • since 0.11
\ No newline at end of file +Make (containers-data.CCRingBuffer.Make)

Module CCRingBuffer.Make

Buffer using regular arrays

Parameters

module X : sig ... end

Signature

module Array : Array.S with type elt = X.t with type t = X.t array

The module type of Array for this ring buffer

type t

Defines the bounded ring buffer type

exception Empty

Raised in querying functions when the buffer is empty

val create : int -> t

create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.

  • raises Invalid_argument

    if the argument is < 1.

val copy : t -> t

Make a fresh copy of the buffer.

val capacity : t -> int

Length of the inner buffer.

val length : t -> int

Number of elements currently stored in the buffer.

val is_full : t -> bool

true if pushing an element would erase another element.

  • since 1.3
val blit_from : t -> Array.t -> int -> int -> unit

blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val blit_into : t -> Array.t -> int -> int -> int

blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.

  • returns

    the number of elements actually copied (min len (length buf)).

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val append : t -> into:t -> unit

append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.

val to_list : t -> Array.elt list

Extract the current content into a list.

val clear : t -> unit

Clear the content of the buffer

val is_empty : t -> bool

Is the buffer empty (i.e. contains no elements)?

val junk_front : t -> unit

Drop the front element from t.

  • raises Empty

    if the buffer is already empty.

val junk_back : t -> unit

Drop the back element from t.

  • raises Empty

    if the buffer is already empty.

val skip : t -> int -> unit

skip b len removes len elements from the front of b.

  • raises Invalid_argument

    if len > length b.

val iter : t -> f:(Array.elt -> unit) -> unit

iter b ~f calls f i t for each element t in buf.

val iteri : t -> f:(int -> Array.elt -> unit) -> unit

iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.

val get_front : t -> int -> Array.elt

get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val get_back : t -> int -> Array.elt

get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val push_back : t -> Array.elt -> unit

Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.

val peek_front : t -> Array.elt option

First value from front of t, without modification.

val peek_front_exn : t -> Array.elt

First value from front of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val peek_back : t -> Array.elt option

Get the last value from back of t, without modification.

val peek_back_exn : t -> Array.elt

Get the last value from back of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val take_back : t -> Array.elt option

Take and remove the last value from back of t, if any.

val take_back_exn : t -> Array.elt

Take and remove the last value from back of t.

  • raises Empty

    if buffer is already empty.

val take_front : t -> Array.elt option

Take and remove the first value from front of t, if any.

val take_front_exn : t -> Array.elt

Take and remove the first value from front of t.

  • raises Empty

    if buffer is already empty.

val of_array : Array.t -> t

Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).

  • since 0.11
val to_array : t -> Array.t

Create an array from the elements, in order.

  • since 0.11
diff --git a/dev/containers-data/CCRingBuffer/MakeFromArray/argument-1-A/index.html b/dev/containers-data/CCRingBuffer/MakeFromArray/argument-1-A/index.html index 0860bf75..cb80704f 100644 --- a/dev/containers-data/CCRingBuffer/MakeFromArray/argument-1-A/index.html +++ b/dev/containers-data/CCRingBuffer/MakeFromArray/argument-1-A/index.html @@ -1,2 +1,2 @@ -A (containers-data.CCRingBuffer.MakeFromArray.A)

Parameter MakeFromArray.A

type elt

The element type

type t

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

\ No newline at end of file +A (containers-data.CCRingBuffer.MakeFromArray.A)

Parameter MakeFromArray.A

type elt

The element type

type t

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

diff --git a/dev/containers-data/CCRingBuffer/MakeFromArray/index.html b/dev/containers-data/CCRingBuffer/MakeFromArray/index.html index 6ec7b998..6a0b0af2 100644 --- a/dev/containers-data/CCRingBuffer/MakeFromArray/index.html +++ b/dev/containers-data/CCRingBuffer/MakeFromArray/index.html @@ -1,2 +1,2 @@ -MakeFromArray (containers-data.CCRingBuffer.MakeFromArray)

Module CCRingBuffer.MakeFromArray

Makes a ring buffer module with the given array type

Parameters

module A : Array.S

Signature

module Array = A

The module type of Array for this ring buffer

type t

Defines the bounded ring buffer type

exception Empty

Raised in querying functions when the buffer is empty

val create : int -> t

create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.

  • raises Invalid_argument

    if the argument is < 1.

val copy : t -> t

Make a fresh copy of the buffer.

val capacity : t -> int

Length of the inner buffer.

val length : t -> int

Number of elements currently stored in the buffer.

val is_full : t -> bool

true if pushing an element would erase another element.

  • since 1.3
val blit_from : t -> Array.t -> int -> int -> unit

blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val blit_into : t -> Array.t -> int -> int -> int

blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.

  • returns

    the number of elements actually copied (min len (length buf)).

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val append : t -> into:t -> unit

append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.

val to_list : t -> Array.elt list

Extract the current content into a list.

val clear : t -> unit

Clear the content of the buffer

val is_empty : t -> bool

Is the buffer empty (i.e. contains no elements)?

val junk_front : t -> unit

Drop the front element from t.

  • raises Empty

    if the buffer is already empty.

val junk_back : t -> unit

Drop the back element from t.

  • raises Empty

    if the buffer is already empty.

val skip : t -> int -> unit

skip b len removes len elements from the front of b.

  • raises Invalid_argument

    if len > length b.

val iter : t -> f:(Array.elt -> unit) -> unit

iter b ~f calls f i t for each element t in buf.

val iteri : t -> f:(int -> Array.elt -> unit) -> unit

iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.

val get_front : t -> int -> Array.elt

get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val get_back : t -> int -> Array.elt

get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val push_back : t -> Array.elt -> unit

Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.

val peek_front : t -> Array.elt option

First value from front of t, without modification.

val peek_front_exn : t -> Array.elt

First value from front of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val peek_back : t -> Array.elt option

Get the last value from back of t, without modification.

val peek_back_exn : t -> Array.elt

Get the last value from back of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val take_back : t -> Array.elt option

Take and remove the last value from back of t, if any.

val take_back_exn : t -> Array.elt

Take and remove the last value from back of t.

  • raises Empty

    if buffer is already empty.

val take_front : t -> Array.elt option

Take and remove the first value from front of t, if any.

val take_front_exn : t -> Array.elt

Take and remove the first value from front of t.

  • raises Empty

    if buffer is already empty.

val of_array : Array.t -> t

Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).

  • since 0.11
val to_array : t -> Array.t

Create an array from the elements, in order.

  • since 0.11
\ No newline at end of file +MakeFromArray (containers-data.CCRingBuffer.MakeFromArray)

Module CCRingBuffer.MakeFromArray

Makes a ring buffer module with the given array type

Parameters

module A : Array.S

Signature

module Array = A

The module type of Array for this ring buffer

type t

Defines the bounded ring buffer type

exception Empty

Raised in querying functions when the buffer is empty

val create : int -> t

create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.

  • raises Invalid_argument

    if the argument is < 1.

val copy : t -> t

Make a fresh copy of the buffer.

val capacity : t -> int

Length of the inner buffer.

val length : t -> int

Number of elements currently stored in the buffer.

val is_full : t -> bool

true if pushing an element would erase another element.

  • since 1.3
val blit_from : t -> Array.t -> int -> int -> unit

blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val blit_into : t -> Array.t -> int -> int -> int

blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.

  • returns

    the number of elements actually copied (min len (length buf)).

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val append : t -> into:t -> unit

append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.

val to_list : t -> Array.elt list

Extract the current content into a list.

val clear : t -> unit

Clear the content of the buffer

val is_empty : t -> bool

Is the buffer empty (i.e. contains no elements)?

val junk_front : t -> unit

Drop the front element from t.

  • raises Empty

    if the buffer is already empty.

val junk_back : t -> unit

Drop the back element from t.

  • raises Empty

    if the buffer is already empty.

val skip : t -> int -> unit

skip b len removes len elements from the front of b.

  • raises Invalid_argument

    if len > length b.

val iter : t -> f:(Array.elt -> unit) -> unit

iter b ~f calls f i t for each element t in buf.

val iteri : t -> f:(int -> Array.elt -> unit) -> unit

iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.

val get_front : t -> int -> Array.elt

get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val get_back : t -> int -> Array.elt

get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val push_back : t -> Array.elt -> unit

Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.

val peek_front : t -> Array.elt option

First value from front of t, without modification.

val peek_front_exn : t -> Array.elt

First value from front of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val peek_back : t -> Array.elt option

Get the last value from back of t, without modification.

val peek_back_exn : t -> Array.elt

Get the last value from back of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val take_back : t -> Array.elt option

Take and remove the last value from back of t, if any.

val take_back_exn : t -> Array.elt

Take and remove the last value from back of t.

  • raises Empty

    if buffer is already empty.

val take_front : t -> Array.elt option

Take and remove the first value from front of t, if any.

val take_front_exn : t -> Array.elt

Take and remove the first value from front of t.

  • raises Empty

    if buffer is already empty.

val of_array : Array.t -> t

Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).

  • since 0.11
val to_array : t -> Array.t

Create an array from the elements, in order.

  • since 0.11
diff --git a/dev/containers-data/CCRingBuffer/index.html b/dev/containers-data/CCRingBuffer/index.html index f96435bb..a62f82e0 100644 --- a/dev/containers-data/CCRingBuffer/index.html +++ b/dev/containers-data/CCRingBuffer/index.html @@ -1,4 +1,4 @@ -CCRingBuffer (containers-data.CCRingBuffer)

Module CCRingBuffer

Circular Buffer (Deque)

Useful for IO, or as a bounded-size alternative to Queue when batch operations are needed.

status: experimental

Change in the API to provide only a bounded buffer since 1.3

Underlying Array

module Array : sig ... end

The abstract type for arrays

module type S = sig ... end
module Byte : S with module Array = Array.Byte

An efficient byte based ring buffer

module MakeFromArray (A : Array.S) : S with module Array = A

Makes a ring buffer module with the given array type

module Make +CCRingBuffer (containers-data.CCRingBuffer)

Module CCRingBuffer

Circular Buffer (Deque)

Useful for IO, or as a bounded-size alternative to Queue when batch operations are needed.

status: experimental

Change in the API to provide only a bounded buffer since 1.3

  • since 0.9

Underlying Array

module Array : sig ... end

The abstract type for arrays

module type S = sig ... end
module Byte : S with module Array = Array.Byte

An efficient byte based ring buffer

module MakeFromArray (A : Array.S) : S with module Array = A

Makes a ring buffer module with the given array type

module Make (X : sig ... end) : - S with type Array.elt = X.t and type Array.t = X.t array

Buffer using regular arrays

\ No newline at end of file + S with type Array.elt = X.t and type Array.t = X.t array

Buffer using regular arrays

diff --git a/dev/containers-data/CCRingBuffer/module-type-S/Array/index.html b/dev/containers-data/CCRingBuffer/module-type-S/Array/index.html index 5fbaae20..ab20ec79 100644 --- a/dev/containers-data/CCRingBuffer/module-type-S/Array/index.html +++ b/dev/containers-data/CCRingBuffer/module-type-S/Array/index.html @@ -1,2 +1,2 @@ -Array (containers-data.CCRingBuffer.S.Array)

Module S.Array

The module type of Array for this ring buffer

type elt

The element type

type t

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

\ No newline at end of file +Array (containers-data.CCRingBuffer.S.Array)

Module S.Array

The module type of Array for this ring buffer

type elt

The element type

type t

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

diff --git a/dev/containers-data/CCRingBuffer/module-type-S/index.html b/dev/containers-data/CCRingBuffer/module-type-S/index.html index 8c7d6088..855bf595 100644 --- a/dev/containers-data/CCRingBuffer/module-type-S/index.html +++ b/dev/containers-data/CCRingBuffer/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCRingBuffer.S)

Module type CCRingBuffer.S

Ring Buffer

The abstract ring buffer type, made concrete by choice of ARRAY module implementation

module Array : Array.S

The module type of Array for this ring buffer

type t

Defines the bounded ring buffer type

exception Empty

Raised in querying functions when the buffer is empty

val create : int -> t

create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.

  • raises Invalid_argument

    if the argument is < 1.

val copy : t -> t

Make a fresh copy of the buffer.

val capacity : t -> int

Length of the inner buffer.

val length : t -> int

Number of elements currently stored in the buffer.

val is_full : t -> bool

true if pushing an element would erase another element.

  • since 1.3
val blit_from : t -> Array.t -> int -> int -> unit

blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val blit_into : t -> Array.t -> int -> int -> int

blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.

  • returns

    the number of elements actually copied (min len (length buf)).

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val append : t -> into:t -> unit

append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.

val to_list : t -> Array.elt list

Extract the current content into a list.

val clear : t -> unit

Clear the content of the buffer

val is_empty : t -> bool

Is the buffer empty (i.e. contains no elements)?

val junk_front : t -> unit

Drop the front element from t.

  • raises Empty

    if the buffer is already empty.

val junk_back : t -> unit

Drop the back element from t.

  • raises Empty

    if the buffer is already empty.

val skip : t -> int -> unit

skip b len removes len elements from the front of b.

  • raises Invalid_argument

    if len > length b.

val iter : t -> f:(Array.elt -> unit) -> unit

iter b ~f calls f i t for each element t in buf.

val iteri : t -> f:(int -> Array.elt -> unit) -> unit

iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.

val get_front : t -> int -> Array.elt

get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val get_back : t -> int -> Array.elt

get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val push_back : t -> Array.elt -> unit

Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.

val peek_front : t -> Array.elt option

First value from front of t, without modification.

val peek_front_exn : t -> Array.elt

First value from front of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val peek_back : t -> Array.elt option

Get the last value from back of t, without modification.

val peek_back_exn : t -> Array.elt

Get the last value from back of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val take_back : t -> Array.elt option

Take and remove the last value from back of t, if any.

val take_back_exn : t -> Array.elt

Take and remove the last value from back of t.

  • raises Empty

    if buffer is already empty.

val take_front : t -> Array.elt option

Take and remove the first value from front of t, if any.

val take_front_exn : t -> Array.elt

Take and remove the first value from front of t.

  • raises Empty

    if buffer is already empty.

val of_array : Array.t -> t

Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).

  • since 0.11
val to_array : t -> Array.t

Create an array from the elements, in order.

  • since 0.11
\ No newline at end of file +S (containers-data.CCRingBuffer.S)

Module type CCRingBuffer.S

Ring Buffer

The abstract ring buffer type, made concrete by choice of ARRAY module implementation

module Array : Array.S

The module type of Array for this ring buffer

type t

Defines the bounded ring buffer type

exception Empty

Raised in querying functions when the buffer is empty

val create : int -> t

create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.

  • raises Invalid_argument

    if the argument is < 1.

val copy : t -> t

Make a fresh copy of the buffer.

val capacity : t -> int

Length of the inner buffer.

val length : t -> int

Number of elements currently stored in the buffer.

val is_full : t -> bool

true if pushing an element would erase another element.

  • since 1.3
val blit_from : t -> Array.t -> int -> int -> unit

blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val blit_into : t -> Array.t -> int -> int -> int

blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.

  • returns

    the number of elements actually copied (min len (length buf)).

  • raises Invalid_argument

    if o,len is not a valid slice of s.

val append : t -> into:t -> unit

append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.

val to_list : t -> Array.elt list

Extract the current content into a list.

val clear : t -> unit

Clear the content of the buffer

val is_empty : t -> bool

Is the buffer empty (i.e. contains no elements)?

val junk_front : t -> unit

Drop the front element from t.

  • raises Empty

    if the buffer is already empty.

val junk_back : t -> unit

Drop the back element from t.

  • raises Empty

    if the buffer is already empty.

val skip : t -> int -> unit

skip b len removes len elements from the front of b.

  • raises Invalid_argument

    if len > length b.

val iter : t -> f:(Array.elt -> unit) -> unit

iter b ~f calls f i t for each element t in buf.

val iteri : t -> f:(int -> Array.elt -> unit) -> unit

iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.

val get_front : t -> int -> Array.elt

get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val get_back : t -> int -> Array.elt

get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.

  • raises Invalid_argument

    if the index is invalid (> length buf).

val push_back : t -> Array.elt -> unit

Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.

val peek_front : t -> Array.elt option

First value from front of t, without modification.

val peek_front_exn : t -> Array.elt

First value from front of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val peek_back : t -> Array.elt option

Get the last value from back of t, without modification.

val peek_back_exn : t -> Array.elt

Get the last value from back of t, without modification.

  • raises Empty

    if buffer is empty.

  • since 1.3
val take_back : t -> Array.elt option

Take and remove the last value from back of t, if any.

val take_back_exn : t -> Array.elt

Take and remove the last value from back of t.

  • raises Empty

    if buffer is already empty.

val take_front : t -> Array.elt option

Take and remove the first value from front of t, if any.

val take_front_exn : t -> Array.elt

Take and remove the first value from front of t.

  • raises Empty

    if buffer is already empty.

val of_array : Array.t -> t

Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).

  • since 0.11
val to_array : t -> Array.t

Create an array from the elements, in order.

  • since 0.11
diff --git a/dev/containers-data/CCSimple_queue/Infix/index.html b/dev/containers-data/CCSimple_queue/Infix/index.html index e19f5d80..54617c16 100644 --- a/dev/containers-data/CCSimple_queue/Infix/index.html +++ b/dev/containers-data/CCSimple_queue/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers-data.CCSimple_queue.Infix)

Module CCSimple_queue.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map.

val (@) : 'a t -> 'a t -> 'a t

Alias to append.

val (<::) : 'a t -> 'a -> 'a t

Alias to snoc.

\ No newline at end of file +Infix (containers-data.CCSimple_queue.Infix)

Module CCSimple_queue.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map.

val (@) : 'a t -> 'a t -> 'a t

Alias to append.

val (<::) : 'a t -> 'a -> 'a t

Alias to snoc.

diff --git a/dev/containers-data/CCSimple_queue/index.html b/dev/containers-data/CCSimple_queue/index.html index 0af37978..5764560a 100644 --- a/dev/containers-data/CCSimple_queue/index.html +++ b/dev/containers-data/CCSimple_queue/index.html @@ -1,2 +1,2 @@ -CCSimple_queue (containers-data.CCSimple_queue)

Module CCSimple_queue

Functional queues (fifo)

Simple implementation of functional queues

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a gen = unit -> 'a option
type +'a t

Queue containing elements of type 'a

val empty : 'a t
val is_empty : 'a t -> bool
val push : 'a -> 'a t -> 'a t

Push element at the end of the queue.

val snoc : 'a t -> 'a -> 'a t

Flip version of push.

val peek : 'a t -> 'a option

First element of the queue.

val peek_exn : 'a t -> 'a

Same as peek but

  • raises Invalid_argument

    if the queue is empty.

val pop : 'a t -> ('a * 'a t) option

Get and remove the first element.

val pop_exn : 'a t -> 'a * 'a t

Same as pop, but fails on empty queues.

  • raises Invalid_argument

    if the queue is empty.

val junk : 'a t -> 'a t

Remove first element. If the queue is empty, do nothing.

val append : 'a t -> 'a t -> 'a t

Append two queues. Elements from the second one come after elements of the first one. Linear in the size of the second queue.

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

Map values.

val rev : 'a t -> 'a t

Reverse the queue. Constant time.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map.

val (@) : 'a t -> 'a t -> 'a t

Alias to append.

val (<::) : 'a t -> 'a -> 'a t

Alias to snoc.

val length : 'a t -> int

Number of elements in the queue (linear in time).

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val iter : ('a -> unit) -> 'a t -> unit
val to_list : 'a t -> 'a list
val add_list : 'a t -> 'a list -> 'a t
val of_list : 'a list -> 'a t
val to_iter : 'a t -> 'a iter
val add_iter : 'a t -> 'a iter -> 'a t
val of_iter : 'a iter -> 'a t
val to_seq : 'a t -> 'a Stdlib.Seq.t

Renamed from to_std_seq since 3.0.

  • since 3.0
val add_seq : 'a t -> 'a Stdlib.Seq.t -> 'a t

Renamed from add_std_seq since 3.0.

  • since 3.0
val of_seq : 'a Stdlib.Seq.t -> 'a t

Renamed from of_std_seq since 3.0.

  • since 3.0
val of_gen : 'a gen -> 'a t
val add_gen : 'a t -> 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

val pp : ?sep:unit printer -> 'a printer -> 'a t printer
\ No newline at end of file +CCSimple_queue (containers-data.CCSimple_queue)

Module CCSimple_queue

Functional queues (fifo)

Simple implementation of functional queues

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a gen = unit -> 'a option
type +'a t

Queue containing elements of type 'a

val empty : 'a t
val is_empty : 'a t -> bool
val push : 'a -> 'a t -> 'a t

Push element at the end of the queue.

val snoc : 'a t -> 'a -> 'a t

Flip version of push.

val peek : 'a t -> 'a option

First element of the queue.

val peek_exn : 'a t -> 'a

Same as peek but

  • raises Invalid_argument

    if the queue is empty.

val pop : 'a t -> ('a * 'a t) option

Get and remove the first element.

val pop_exn : 'a t -> 'a * 'a t

Same as pop, but fails on empty queues.

  • raises Invalid_argument

    if the queue is empty.

val junk : 'a t -> 'a t

Remove first element. If the queue is empty, do nothing.

val append : 'a t -> 'a t -> 'a t

Append two queues. Elements from the second one come after elements of the first one. Linear in the size of the second queue.

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

Map values.

val rev : 'a t -> 'a t

Reverse the queue. Constant time.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map.

val (@) : 'a t -> 'a t -> 'a t

Alias to append.

val (<::) : 'a t -> 'a -> 'a t

Alias to snoc.

val length : 'a t -> int

Number of elements in the queue (linear in time).

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b
val iter : ('a -> unit) -> 'a t -> unit
val to_list : 'a t -> 'a list
val add_list : 'a t -> 'a list -> 'a t
val of_list : 'a list -> 'a t
val to_iter : 'a t -> 'a iter
val add_iter : 'a t -> 'a iter -> 'a t
val of_iter : 'a iter -> 'a t
val to_seq : 'a t -> 'a Stdlib.Seq.t

Renamed from to_std_seq since 3.0.

  • since 3.0
val add_seq : 'a t -> 'a Stdlib.Seq.t -> 'a t

Renamed from add_std_seq since 3.0.

  • since 3.0
val of_seq : 'a Stdlib.Seq.t -> 'a t

Renamed from of_std_seq since 3.0.

  • since 3.0
val of_gen : 'a gen -> 'a t
val add_gen : 'a t -> 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

val pp : ?sep:unit printer -> 'a printer -> 'a t printer
diff --git a/dev/containers-data/CCTrie/Make/argument-1-W/index.html b/dev/containers-data/CCTrie/Make/argument-1-W/index.html index 44a45f01..44e535f4 100644 --- a/dev/containers-data/CCTrie/Make/argument-1-W/index.html +++ b/dev/containers-data/CCTrie/Make/argument-1-W/index.html @@ -1,2 +1,2 @@ -W (containers-data.CCTrie.Make.W)

Parameter Make.W

type t
type char_
val compare : char_ -> char_ -> int
val to_iter : t -> char_ iter
val of_list : char_ list -> t
\ No newline at end of file +W (containers-data.CCTrie.Make.W)

Parameter Make.W

type t
type char_
val compare : char_ -> char_ -> int
val to_iter : t -> char_ iter
val of_list : char_ list -> t
diff --git a/dev/containers-data/CCTrie/Make/index.html b/dev/containers-data/CCTrie/Make/index.html index 1a0ae22c..40d56d26 100644 --- a/dev/containers-data/CCTrie/Make/index.html +++ b/dev/containers-data/CCTrie/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-data.CCTrie.Make)

Module CCTrie.Make

Parameters

module W : WORD

Signature

type char_ = W.char_
type key = W.t
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

\ No newline at end of file +Make (containers-data.CCTrie.Make)

Module CCTrie.Make

Parameters

module W : WORD

Signature

type char_ = W.char_
type key = W.t
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

diff --git a/dev/containers-data/CCTrie/MakeArray/argument-1-X/index.html b/dev/containers-data/CCTrie/MakeArray/argument-1-X/index.html index 2d042817..4bba96bc 100644 --- a/dev/containers-data/CCTrie/MakeArray/argument-1-X/index.html +++ b/dev/containers-data/CCTrie/MakeArray/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers-data.CCTrie.MakeArray.X)

Parameter MakeArray.X

type t
val compare : t -> t -> int
\ No newline at end of file +X (containers-data.CCTrie.MakeArray.X)

Parameter MakeArray.X

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCTrie/MakeArray/index.html b/dev/containers-data/CCTrie/MakeArray/index.html index 72f8e5ed..8cca730a 100644 --- a/dev/containers-data/CCTrie/MakeArray/index.html +++ b/dev/containers-data/CCTrie/MakeArray/index.html @@ -1,2 +1,2 @@ -MakeArray (containers-data.CCTrie.MakeArray)

Module CCTrie.MakeArray

Parameters

module X : ORDERED

Signature

type char_ = X.t
type key = X.t array
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

\ No newline at end of file +MakeArray (containers-data.CCTrie.MakeArray)

Module CCTrie.MakeArray

Parameters

module X : ORDERED

Signature

type char_ = X.t
type key = X.t array
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

diff --git a/dev/containers-data/CCTrie/MakeList/argument-1-X/index.html b/dev/containers-data/CCTrie/MakeList/argument-1-X/index.html index 44dac0f5..ebec4ed8 100644 --- a/dev/containers-data/CCTrie/MakeList/argument-1-X/index.html +++ b/dev/containers-data/CCTrie/MakeList/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers-data.CCTrie.MakeList.X)

Parameter MakeList.X

type t
val compare : t -> t -> int
\ No newline at end of file +X (containers-data.CCTrie.MakeList.X)

Parameter MakeList.X

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCTrie/MakeList/index.html b/dev/containers-data/CCTrie/MakeList/index.html index 8843c5a4..8f72f45d 100644 --- a/dev/containers-data/CCTrie/MakeList/index.html +++ b/dev/containers-data/CCTrie/MakeList/index.html @@ -1,2 +1,2 @@ -MakeList (containers-data.CCTrie.MakeList)

Module CCTrie.MakeList

Parameters

module X : ORDERED

Signature

type char_ = X.t
type key = X.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

\ No newline at end of file +MakeList (containers-data.CCTrie.MakeList)

Module CCTrie.MakeList

Parameters

module X : ORDERED

Signature

type char_ = X.t
type key = X.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

diff --git a/dev/containers-data/CCTrie/String/index.html b/dev/containers-data/CCTrie/String/index.html index 4ad97b83..058f1bda 100644 --- a/dev/containers-data/CCTrie/String/index.html +++ b/dev/containers-data/CCTrie/String/index.html @@ -1,2 +1,2 @@ -String (containers-data.CCTrie.String)

Module CCTrie.String

type char_ = char
type key = string
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

\ No newline at end of file +String (containers-data.CCTrie.String)

Module CCTrie.String

type char_ = char
type key = string
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

diff --git a/dev/containers-data/CCTrie/index.html b/dev/containers-data/CCTrie/index.html index c6ae03f4..653af21a 100644 --- a/dev/containers-data/CCTrie/index.html +++ b/dev/containers-data/CCTrie/index.html @@ -1,4 +1,4 @@ -CCTrie (containers-data.CCTrie)

Module CCTrie

Prefix Tree

type 'a iter = ('a -> unit) -> unit
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ]

Signatures

A Composite Word

Words are made of characters, who belong to a total order

module type WORD = sig ... end
module type S = sig ... end

Implementation

module Make (W : WORD) : S with type key = W.t and type char_ = W.char_
module type ORDERED = sig ... end
module MakeArray +CCTrie (containers-data.CCTrie)

Module CCTrie

Prefix Tree

type 'a iter = ('a -> unit) -> unit
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ]

Signatures

A Composite Word

Words are made of characters, who belong to a total order

module type WORD = sig ... end
module type S = sig ... end

Implementation

module Make (W : WORD) : S with type key = W.t and type char_ = W.char_
module type ORDERED = sig ... end
module MakeArray (X : ORDERED) : - S with type key = X.t array and type char_ = X.t
module MakeList (X : ORDERED) : S with type key = X.t list and type char_ = X.t
module String : S with type key = string and type char_ = char
\ No newline at end of file + S with type key = X.t array and type char_ = X.t
module MakeList (X : ORDERED) : S with type key = X.t list and type char_ = X.t
module String : S with type key = string and type char_ = char
diff --git a/dev/containers-data/CCTrie/module-type-ORDERED/index.html b/dev/containers-data/CCTrie/module-type-ORDERED/index.html index 1b9c7d7a..cf864223 100644 --- a/dev/containers-data/CCTrie/module-type-ORDERED/index.html +++ b/dev/containers-data/CCTrie/module-type-ORDERED/index.html @@ -1,2 +1,2 @@ -ORDERED (containers-data.CCTrie.ORDERED)

Module type CCTrie.ORDERED

type t
val compare : t -> t -> int
\ No newline at end of file +ORDERED (containers-data.CCTrie.ORDERED)

Module type CCTrie.ORDERED

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCTrie/module-type-S/index.html b/dev/containers-data/CCTrie/module-type-S/index.html index 2ebe8f0a..d794e357 100644 --- a/dev/containers-data/CCTrie/module-type-S/index.html +++ b/dev/containers-data/CCTrie/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers-data.CCTrie.S)

Module type CCTrie.S

type char_
type key
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

\ No newline at end of file +S (containers-data.CCTrie.S)

Module type CCTrie.S

type char_
type key
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val add : key -> 'a -> 'a t -> 'a t

Add a binding to the trie (possibly erasing the previous one).

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

Remove the key, if present.

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

Find the value associated with the key, if any.

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

Same as find but can fail.

  • raises Not_found

    if the key is not present.

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

longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.

Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".

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

Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.

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

Fold on key/value bindings. Will use WORD.of_list to rebuild keys.

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

Map values, giving both key and value. Will use WORD.of_list to rebuild keys.

  • since 0.17
val map : ('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

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

Same as fold, but for effectful functions.

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

More efficient version of fold, that doesn't keep keys.

val iter_values : ('a -> unit) -> 'a t -> unit
val merge : ('a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.

val size : _ t -> int

Number of bindings.

Conversions
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val of_iter : (key * 'a) iter -> 'a t
val to_iter_values : 'a t -> 'a iter
val to_tree : 'a t -> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key -> 'a t -> (key * 'a) iter

All bindings whose key is bigger or equal to the given key, in ascending order.

val below : key -> 'a t -> (key * 'a) iter

All bindings whose key is smaller or equal to the given key, in decreasing order.

diff --git a/dev/containers-data/CCTrie/module-type-WORD/index.html b/dev/containers-data/CCTrie/module-type-WORD/index.html index 3e84daf6..d09b1fc0 100644 --- a/dev/containers-data/CCTrie/module-type-WORD/index.html +++ b/dev/containers-data/CCTrie/module-type-WORD/index.html @@ -1,2 +1,2 @@ -WORD (containers-data.CCTrie.WORD)

Module type CCTrie.WORD

type t
type char_
val compare : char_ -> char_ -> int
val to_iter : t -> char_ iter
val of_list : char_ list -> t
\ No newline at end of file +WORD (containers-data.CCTrie.WORD)

Module type CCTrie.WORD

type t
type char_
val compare : char_ -> char_ -> int
val to_iter : t -> char_ iter
val of_list : char_ list -> t
diff --git a/dev/containers-data/CCWBTree/Make/argument-1-X/index.html b/dev/containers-data/CCWBTree/Make/argument-1-X/index.html index 70ff8c54..bc049ed4 100644 --- a/dev/containers-data/CCWBTree/Make/argument-1-X/index.html +++ b/dev/containers-data/CCWBTree/Make/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers-data.CCWBTree.Make.X)

Parameter Make.X

type t
val compare : t -> t -> int
\ No newline at end of file +X (containers-data.CCWBTree.Make.X)

Parameter Make.X

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCWBTree/Make/index.html b/dev/containers-data/CCWBTree/Make/index.html index 19580588..2a398a0a 100644 --- a/dev/containers-data/CCWBTree/Make/index.html +++ b/dev/containers-data/CCWBTree/Make/index.html @@ -1,13 +1,13 @@ -Make (containers-data.CCWBTree.Make)

Module CCWBTree.Make

Parameters

module X : ORD

Signature

type key = X.t
type +'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if the key is not present.

val nth : int -> 'a t -> (key * 'a) option

nth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).

val nth_exn : int -> 'a t -> key * 'a
  • raises Not_found

    if the index is invalid.

val get_rank : key -> 'a t -> [ `At of int | `After of int | `First ]

get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.

  • since 1.4
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val cardinal : _ t -> int
val weight : _ t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Map values, giving both key and value.

  • since 0.17
val map : f:('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

  • since 0.17
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t

split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.

val merge : - f:(key -> 'a option -> 'b option -> 'c option) -> +Make (containers-data.CCWBTree.Make)

Module CCWBTree.Make

Parameters

module X : ORD

Signature

type key = X.t
type +'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if the key is not present.

val nth : int -> 'a t -> (key * 'a) option

nth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).

val nth_exn : int -> 'a t -> key * 'a
  • raises Not_found

    if the index is invalid.

val get_rank : key -> 'a t -> [ `At of int | `After of int | `First ]

get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.

  • since 1.4
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val cardinal : _ t -> int
val weight : _ t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Map values, giving both key and value.

  • since 0.17
val map : f:('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

  • since 0.17
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t

split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.

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

Like Map.S.merge.

val extract_min : 'a t -> key * 'a * 'a t

extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val extract_max : 'a t -> key * 'a * 'a t

extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if the tree is empty.

val random_choose : Stdlib.Random.State.t -> 'a t -> key * 'a

Randomly choose a (key,value) pair within the tree, using weights as probability weights.

  • raises Not_found

    if the tree is empty.

val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_arrow:unit printer -> - ?pp_sep:unit printer -> + 'c t

Like Map.S.merge.

val extract_min : 'a t -> key * 'a * 'a t

extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val extract_max : 'a t -> key * 'a * 'a t

extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if the tree is empty.

val random_choose : Stdlib.Random.State.t -> 'a t -> key * 'a

Randomly choose a (key,value) pair within the tree, using weights as probability weights.

  • raises Not_found

    if the tree is empty.

val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_arrow:unit printer -> + ?pp_sep:unit printer -> key printer -> 'a printer -> - 'a t printer

Renamed from val print.

  • since 2.0
\ No newline at end of file + 'a t printer

Renamed from val print.

  • since 2.0
diff --git a/dev/containers-data/CCWBTree/MakeFull/argument-1-X/index.html b/dev/containers-data/CCWBTree/MakeFull/argument-1-X/index.html index 69799d1a..c717fa23 100644 --- a/dev/containers-data/CCWBTree/MakeFull/argument-1-X/index.html +++ b/dev/containers-data/CCWBTree/MakeFull/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers-data.CCWBTree.MakeFull.X)

Parameter MakeFull.X

include ORD
type t
val compare : t -> t -> int
val weight : t -> int
\ No newline at end of file +X (containers-data.CCWBTree.MakeFull.X)

Parameter MakeFull.X

include ORD
type t
val compare : t -> t -> int
val weight : t -> int
diff --git a/dev/containers-data/CCWBTree/MakeFull/index.html b/dev/containers-data/CCWBTree/MakeFull/index.html index 935372d8..dda72d00 100644 --- a/dev/containers-data/CCWBTree/MakeFull/index.html +++ b/dev/containers-data/CCWBTree/MakeFull/index.html @@ -1,13 +1,13 @@ -MakeFull (containers-data.CCWBTree.MakeFull)

Module CCWBTree.MakeFull

Use the custom X.weight function

Parameters

module X : KEY

Signature

type key = X.t
type +'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if the key is not present.

val nth : int -> 'a t -> (key * 'a) option

nth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).

val nth_exn : int -> 'a t -> key * 'a
  • raises Not_found

    if the index is invalid.

val get_rank : key -> 'a t -> [ `At of int | `After of int | `First ]

get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.

  • since 1.4
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val cardinal : _ t -> int
val weight : _ t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Map values, giving both key and value.

  • since 0.17
val map : f:('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

  • since 0.17
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t

split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.

val merge : - f:(key -> 'a option -> 'b option -> 'c option) -> +MakeFull (containers-data.CCWBTree.MakeFull)

Module CCWBTree.MakeFull

Use the custom X.weight function

Parameters

module X : KEY

Signature

type key = X.t
type +'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if the key is not present.

val nth : int -> 'a t -> (key * 'a) option

nth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).

val nth_exn : int -> 'a t -> key * 'a
  • raises Not_found

    if the index is invalid.

val get_rank : key -> 'a t -> [ `At of int | `After of int | `First ]

get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.

  • since 1.4
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val cardinal : _ t -> int
val weight : _ t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Map values, giving both key and value.

  • since 0.17
val map : f:('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

  • since 0.17
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t

split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.

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

Like Map.S.merge.

val extract_min : 'a t -> key * 'a * 'a t

extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val extract_max : 'a t -> key * 'a * 'a t

extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if the tree is empty.

val random_choose : Stdlib.Random.State.t -> 'a t -> key * 'a

Randomly choose a (key,value) pair within the tree, using weights as probability weights.

  • raises Not_found

    if the tree is empty.

val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_arrow:unit printer -> - ?pp_sep:unit printer -> + 'c t

Like Map.S.merge.

val extract_min : 'a t -> key * 'a * 'a t

extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val extract_max : 'a t -> key * 'a * 'a t

extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if the tree is empty.

val random_choose : Stdlib.Random.State.t -> 'a t -> key * 'a

Randomly choose a (key,value) pair within the tree, using weights as probability weights.

  • raises Not_found

    if the tree is empty.

val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_arrow:unit printer -> + ?pp_sep:unit printer -> key printer -> 'a printer -> - 'a t printer

Renamed from val print.

  • since 2.0
\ No newline at end of file + 'a t printer

Renamed from val print.

  • since 2.0
diff --git a/dev/containers-data/CCWBTree/index.html b/dev/containers-data/CCWBTree/index.html index 4d1ef00c..3532c7f6 100644 --- a/dev/containers-data/CCWBTree/index.html +++ b/dev/containers-data/CCWBTree/index.html @@ -1,2 +1,2 @@ -CCWBTree (containers-data.CCWBTree)

Module CCWBTree

Weight-Balanced Tree

status: experimental

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type ORD = sig ... end
module type KEY = sig ... end

Signature

module type S = sig ... end

Functor

module Make (X : ORD) : S with type key = X.t
module MakeFull (X : KEY) : S with type key = X.t

Use the custom X.weight function

\ No newline at end of file +CCWBTree (containers-data.CCWBTree)

Module CCWBTree

Weight-Balanced Tree

status: experimental

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type ORD = sig ... end
module type KEY = sig ... end

Signature

module type S = sig ... end

Functor

module Make (X : ORD) : S with type key = X.t
module MakeFull (X : KEY) : S with type key = X.t

Use the custom X.weight function

diff --git a/dev/containers-data/CCWBTree/module-type-KEY/index.html b/dev/containers-data/CCWBTree/module-type-KEY/index.html index d7307935..e4b62ef9 100644 --- a/dev/containers-data/CCWBTree/module-type-KEY/index.html +++ b/dev/containers-data/CCWBTree/module-type-KEY/index.html @@ -1,2 +1,2 @@ -KEY (containers-data.CCWBTree.KEY)

Module type CCWBTree.KEY

include ORD
type t
val compare : t -> t -> int
val weight : t -> int
\ No newline at end of file +KEY (containers-data.CCWBTree.KEY)

Module type CCWBTree.KEY

include ORD
type t
val compare : t -> t -> int
val weight : t -> int
diff --git a/dev/containers-data/CCWBTree/module-type-ORD/index.html b/dev/containers-data/CCWBTree/module-type-ORD/index.html index d37127e8..361b5847 100644 --- a/dev/containers-data/CCWBTree/module-type-ORD/index.html +++ b/dev/containers-data/CCWBTree/module-type-ORD/index.html @@ -1,2 +1,2 @@ -ORD (containers-data.CCWBTree.ORD)

Module type CCWBTree.ORD

type t
val compare : t -> t -> int
\ No newline at end of file +ORD (containers-data.CCWBTree.ORD)

Module type CCWBTree.ORD

type t
val compare : t -> t -> int
diff --git a/dev/containers-data/CCWBTree/module-type-S/index.html b/dev/containers-data/CCWBTree/module-type-S/index.html index 41416c41..1614ac0f 100644 --- a/dev/containers-data/CCWBTree/module-type-S/index.html +++ b/dev/containers-data/CCWBTree/module-type-S/index.html @@ -1,13 +1,13 @@ -S (containers-data.CCWBTree.S)

Module type CCWBTree.S

type key
type +'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if the key is not present.

val nth : int -> 'a t -> (key * 'a) option

nth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).

val nth_exn : int -> 'a t -> key * 'a
  • raises Not_found

    if the index is invalid.

val get_rank : key -> 'a t -> [ `At of int | `After of int | `First ]

get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.

  • since 1.4
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val cardinal : _ t -> int
val weight : _ t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Map values, giving both key and value.

  • since 0.17
val map : f:('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

  • since 0.17
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t

split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.

val merge : - f:(key -> 'a option -> 'b option -> 'c option) -> +S (containers-data.CCWBTree.S)

Module type CCWBTree.S

type key
type +'a t
val empty : 'a t
val is_empty : _ t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> _ t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
  • raises Not_found

    if the key is not present.

val nth : int -> 'a t -> (key * 'a) option

nth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).

val nth_exn : int -> 'a t -> key * 'a
  • raises Not_found

    if the index is invalid.

val get_rank : key -> 'a t -> [ `At of int | `After of int | `First ]

get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.

  • since 1.4
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.

val cardinal : _ t -> int
val weight : _ t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Map values, giving both key and value.

  • since 0.17
val map : f:('a -> 'b) -> 'a t -> 'b t

Map values, giving only the value.

  • since 0.17
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t

split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.

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

Like Map.S.merge.

val extract_min : 'a t -> key * 'a * 'a t

extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val extract_max : 'a t -> key * 'a * 'a t

extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if the tree is empty.

val random_choose : Stdlib.Random.State.t -> 'a t -> key * 'a

Randomly choose a (key,value) pair within the tree, using weights as probability weights.

  • raises Not_found

    if the tree is empty.

val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_arrow:unit printer -> - ?pp_sep:unit printer -> + 'c t

Like Map.S.merge.

val extract_min : 'a t -> key * 'a * 'a t

extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val extract_max : 'a t -> key * 'a * 'a t

extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.

  • raises Not_found

    if the map is empty.

val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
  • raises Not_found

    if the tree is empty.

val random_choose : Stdlib.Random.State.t -> 'a t -> key * 'a

Randomly choose a (key,value) pair within the tree, using weights as probability weights.

  • raises Not_found

    if the tree is empty.

val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_iter : 'a t -> (key * 'a) iter -> 'a t
val of_iter : (key * 'a) iter -> 'a t
val to_iter : 'a t -> (key * 'a) iter
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_arrow:unit printer -> + ?pp_sep:unit printer -> key printer -> 'a printer -> - 'a t printer

Renamed from val print.

  • since 2.0
\ No newline at end of file + 'a t printer

Renamed from val print.

  • since 2.0
diff --git a/dev/containers-data/CCZipper/index.html b/dev/containers-data/CCZipper/index.html index d9355830..277aee51 100644 --- a/dev/containers-data/CCZipper/index.html +++ b/dev/containers-data/CCZipper/index.html @@ -1,2 +1,2 @@ -CCZipper (containers-data.CCZipper)

Module CCZipper

List Zipper

type 'a t = 'a list * 'a list

The pair l, r represents the list List.rev_append l r, but with the focus on r

val empty : 'a t

Empty zipper.

val is_empty : _ t -> bool

Empty zipper? Returns true iff the two lists are empty.

val to_list : 'a t -> 'a list

Convert the zipper back to a list. to_list (l,r) is List.rev_append l r.

val to_rev_list : 'a t -> 'a list

Convert the zipper back to a reversed list. In other words, to_list (l,r) is List.rev_append r l.

val make : 'a list -> 'a t

Create a zipper pointing at the first element of the list.

val left : 'a t -> 'a t

Go to the left, or do nothing if the zipper is already at leftmost pos.

val left_exn : 'a t -> 'a t

Go to the left, or

  • raises Invalid_argument

    if the zipper is already at leftmost pos.

val right : 'a t -> 'a t

Go to the right, or do nothing if the zipper is already at rightmost pos.

val right_exn : 'a t -> 'a t

Go to the right, or

  • raises Invalid_argument

    if the zipper is already at rightmost pos.

val modify : ('a option -> 'a option) -> 'a t -> 'a t

Modify the current element, if any, by returning a new element, or returning None if the element is to be deleted.

val insert : 'a -> 'a t -> 'a t

Insert an element at the current position. If an element was focused, insert x l adds x just before it, and focuses on x.

val remove : 'a t -> 'a t

remove l removes the current element, if any.

val is_focused : _ t -> bool

Is the zipper focused on some element? That is, will focused return a Some v?

val focused : 'a t -> 'a option

Return the focused element, if any. focused zip = Some _ iff empty zip = false.

val focused_exn : 'a t -> 'a

Return the focused element, or

  • raises Not_found

    if the zipper is at an end.

val drop_before : 'a t -> 'a t

Drop every element on the "left" (calling left then will do nothing).

val drop_after : 'a t -> 'a t

Drop every element on the "right" (calling right then will do nothing), keeping the focused element, if any.

val drop_after_and_focused : 'a t -> 'a t

Drop every element on the "right" (calling right then will do nothing), including the focused element if it is present.

\ No newline at end of file +CCZipper (containers-data.CCZipper)

Module CCZipper

List Zipper

type 'a t = 'a list * 'a list

The pair l, r represents the list List.rev_append l r, but with the focus on r

val empty : 'a t

Empty zipper.

val is_empty : _ t -> bool

Empty zipper? Returns true iff the two lists are empty.

val to_list : 'a t -> 'a list

Convert the zipper back to a list. to_list (l,r) is List.rev_append l r.

val to_rev_list : 'a t -> 'a list

Convert the zipper back to a reversed list. In other words, to_list (l,r) is List.rev_append r l.

val make : 'a list -> 'a t

Create a zipper pointing at the first element of the list.

val left : 'a t -> 'a t

Go to the left, or do nothing if the zipper is already at leftmost pos.

val left_exn : 'a t -> 'a t

Go to the left, or

  • raises Invalid_argument

    if the zipper is already at leftmost pos.

val right : 'a t -> 'a t

Go to the right, or do nothing if the zipper is already at rightmost pos.

val right_exn : 'a t -> 'a t

Go to the right, or

  • raises Invalid_argument

    if the zipper is already at rightmost pos.

val modify : ('a option -> 'a option) -> 'a t -> 'a t

Modify the current element, if any, by returning a new element, or returning None if the element is to be deleted.

val insert : 'a -> 'a t -> 'a t

Insert an element at the current position. If an element was focused, insert x l adds x just before it, and focuses on x.

val remove : 'a t -> 'a t

remove l removes the current element, if any.

val is_focused : _ t -> bool

Is the zipper focused on some element? That is, will focused return a Some v?

val focused : 'a t -> 'a option

Return the focused element, if any. focused zip = Some _ iff empty zip = false.

val focused_exn : 'a t -> 'a

Return the focused element, or

  • raises Not_found

    if the zipper is at an end.

val drop_before : 'a t -> 'a t

Drop every element on the "left" (calling left then will do nothing).

val drop_after : 'a t -> 'a t

Drop every element on the "right" (calling right then will do nothing), keeping the focused element, if any.

val drop_after_and_focused : 'a t -> 'a t

Drop every element on the "right" (calling right then will do nothing), including the focused element if it is present.

diff --git a/dev/containers-data/Containers_data_top/index.html b/dev/containers-data/Containers_data_top/index.html index 8505a92f..2ce2f49b 100644 --- a/dev/containers-data/Containers_data_top/index.html +++ b/dev/containers-data/Containers_data_top/index.html @@ -1,2 +1,2 @@ -Containers_data_top (containers-data.Containers_data_top)

Module Containers_data_top

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val eval_exn : string -> bool
val install_printer : string -> unit
val install_printers : string list -> unit
\ No newline at end of file +Containers_data_top (containers-data.Containers_data_top)

Module Containers_data_top

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val eval_exn : string -> bool
val install_printer : string -> unit
val install_printers : string list -> unit
diff --git a/dev/containers-data/index.html b/dev/containers-data/index.html index f550d434..048004af 100644 --- a/dev/containers-data/index.html +++ b/dev/containers-data/index.html @@ -1,2 +1,2 @@ -index (containers-data.index)

Package containers-data

Package info

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

Package containers-data

Package info

changes-files
license-files
readme-files
diff --git a/dev/containers-thread/CCBlockingQueue/index.html b/dev/containers-thread/CCBlockingQueue/index.html index 559f95f1..c8b96e52 100644 --- a/dev/containers-thread/CCBlockingQueue/index.html +++ b/dev/containers-thread/CCBlockingQueue/index.html @@ -1,2 +1,2 @@ -CCBlockingQueue (containers-thread.CCBlockingQueue)

Module CCBlockingQueue

Blocking Queue

This queue has a limited size. Pushing a value on the queue when it is full will block.

type 'a t

Safe-thread queue for values of type 'a

val create : int -> 'a t

Create a new queue of size n. Using n=max_int amounts to using an infinite queue (2^61 items is a lot to fit in memory); using n=1 amounts to using a box with 0 or 1 elements inside.

  • raises Invalid_argument

    if n < 1.

val push : 'a t -> 'a -> unit

push q x pushes x into q, blocking if the queue is full.

val take : 'a t -> 'a

Take the first element, blocking if needed.

val push_list : 'a t -> 'a list -> unit

Push items of the list, one by one.

val take_list : 'a t -> int -> 'a list

take_list n q takes n elements out of q.

val try_take : 'a t -> 'a option

Take the first element if the queue is not empty, return None otherwise.

val try_push : 'a t -> 'a -> bool

try_push q x pushes x into q if q is not full, in which case it returns true. If it fails because q is full, it returns false.

val peek : 'a t -> 'a option

peek q returns Some x if x is the first element of q, otherwise it returns None.

val size : _ t -> int

Number of elements currently in the queue.

val capacity : _ t -> int

Number of values the queue can hold.

\ No newline at end of file +CCBlockingQueue (containers-thread.CCBlockingQueue)

Module CCBlockingQueue

Blocking Queue

This queue has a limited size. Pushing a value on the queue when it is full will block.

type 'a t

Safe-thread queue for values of type 'a

val create : int -> 'a t

Create a new queue of size n. Using n=max_int amounts to using an infinite queue (2^61 items is a lot to fit in memory); using n=1 amounts to using a box with 0 or 1 elements inside.

  • raises Invalid_argument

    if n < 1.

val push : 'a t -> 'a -> unit

push q x pushes x into q, blocking if the queue is full.

val take : 'a t -> 'a

Take the first element, blocking if needed.

val push_list : 'a t -> 'a list -> unit

Push items of the list, one by one.

val take_list : 'a t -> int -> 'a list

take_list n q takes n elements out of q.

val try_take : 'a t -> 'a option

Take the first element if the queue is not empty, return None otherwise.

val try_push : 'a t -> 'a -> bool

try_push q x pushes x into q if q is not full, in which case it returns true. If it fails because q is full, it returns false.

val peek : 'a t -> 'a option

peek q returns Some x if x is the first element of q, otherwise it returns None.

val size : _ t -> int

Number of elements currently in the queue.

val capacity : _ t -> int

Number of values the queue can hold.

diff --git a/dev/containers-thread/CCLock/LockRef/index.html b/dev/containers-thread/CCLock/LockRef/index.html index e1566cee..97d1a3fb 100644 --- a/dev/containers-thread/CCLock/LockRef/index.html +++ b/dev/containers-thread/CCLock/LockRef/index.html @@ -1,2 +1,2 @@ -LockRef (containers-thread.CCLock.LockRef)

Module CCLock.LockRef

Type allowing to manipulate the lock as a reference.

type 'a t
val get : 'a t -> 'a
val set : 'a t -> 'a -> unit
val update : 'a t -> ('a -> 'a) -> unit
\ No newline at end of file +LockRef (containers-thread.CCLock.LockRef)

Module CCLock.LockRef

Type allowing to manipulate the lock as a reference.

type 'a t
val get : 'a t -> 'a
val set : 'a t -> 'a -> unit
val update : 'a t -> ('a -> 'a) -> unit
diff --git a/dev/containers-thread/CCLock/index.html b/dev/containers-thread/CCLock/index.html index 6a445d4b..21db2ffa 100644 --- a/dev/containers-thread/CCLock/index.html +++ b/dev/containers-thread/CCLock/index.html @@ -1,2 +1,2 @@ -CCLock (containers-thread.CCLock)

Module CCLock

Utils around Mutex

A value wrapped into a Mutex, for more safety.

type 'a t

A value surrounded with a lock

val create : 'a -> 'a t

Create a new protected value.

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

with_lock l f runs f x where x is the value protected with the lock l, in a critical section. If f x fails, with_lock l f fails too but the lock is released.

val try_with_lock : 'a t -> ('a -> 'b) -> 'b option

try_with_lock l f runs f x in a critical section if l is not locked. x is the value protected by the lock l. If f x fails, try_with_lock l f fails too but the lock is released.

  • since 0.22
module LockRef : sig ... end

Type allowing to manipulate the lock as a reference.

val with_lock_as_ref : 'a t -> f:('a LockRef.t -> 'b) -> 'b

with_lock_as_ref l f calls f with a reference-like object that allows to manipulate the value of l safely. The object passed to f must not escape the function call.

  • since 0.13
val update : 'a t -> ('a -> 'a) -> unit

update l f replaces the content x of l with f x, atomically.

val update_map : 'a t -> ('a -> 'a * 'b) -> 'b

update_map l f computes x', y = f (get l), then puts x' in l and returns y.

  • since 0.16
val mutex : _ t -> Mutex.t

Underlying mutex.

val get : 'a t -> 'a

Atomically get the value in the lock. The value that is returned isn't protected!

val set : 'a t -> 'a -> unit

Atomically set the value.

  • since 0.13
val incr : int t -> unit

Atomically increment the value.

  • since 0.13
val decr : int t -> unit

Atomically decrement the value.

  • since 0.13
val incr_then_get : int t -> int

incr_then_get x increments x, and returns its new value.

  • since 0.16
val get_then_incr : int t -> int

get_then_incr x increments x, and returns its previous value.

  • since 0.16
val decr_then_get : int t -> int

decr_then_get x decrements x, and returns its new value.

  • since 0.16
val get_then_decr : int t -> int

get_then_decr x decrements x, and returns its previous value.

  • since 0.16
val get_then_set : bool t -> bool

get_then_set b sets b to true, and returns the old value.

  • since 0.16
val get_then_clear : bool t -> bool

get_then_clear b sets b to false, and returns the old value.

  • since 0.16
\ No newline at end of file +CCLock (containers-thread.CCLock)

Module CCLock

Utils around Mutex

A value wrapped into a Mutex, for more safety.

type 'a t

A value surrounded with a lock

val create : 'a -> 'a t

Create a new protected value.

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

with_lock l f runs f x where x is the value protected with the lock l, in a critical section. If f x fails, with_lock l f fails too but the lock is released.

val try_with_lock : 'a t -> ('a -> 'b) -> 'b option

try_with_lock l f runs f x in a critical section if l is not locked. x is the value protected by the lock l. If f x fails, try_with_lock l f fails too but the lock is released.

  • since 0.22
module LockRef : sig ... end

Type allowing to manipulate the lock as a reference.

val with_lock_as_ref : 'a t -> f:('a LockRef.t -> 'b) -> 'b

with_lock_as_ref l f calls f with a reference-like object that allows to manipulate the value of l safely. The object passed to f must not escape the function call.

  • since 0.13
val update : 'a t -> ('a -> 'a) -> unit

update l f replaces the content x of l with f x, atomically.

val update_map : 'a t -> ('a -> 'a * 'b) -> 'b

update_map l f computes x', y = f (get l), then puts x' in l and returns y.

  • since 0.16
val mutex : _ t -> Mutex.t

Underlying mutex.

val get : 'a t -> 'a

Atomically get the value in the lock. The value that is returned isn't protected!

val set : 'a t -> 'a -> unit

Atomically set the value.

  • since 0.13
val incr : int t -> unit

Atomically increment the value.

  • since 0.13
val decr : int t -> unit

Atomically decrement the value.

  • since 0.13
val incr_then_get : int t -> int

incr_then_get x increments x, and returns its new value.

  • since 0.16
val get_then_incr : int t -> int

get_then_incr x increments x, and returns its previous value.

  • since 0.16
val decr_then_get : int t -> int

decr_then_get x decrements x, and returns its new value.

  • since 0.16
val get_then_decr : int t -> int

get_then_decr x decrements x, and returns its previous value.

  • since 0.16
val get_then_set : bool t -> bool

get_then_set b sets b to true, and returns the old value.

  • since 0.16
val get_then_clear : bool t -> bool

get_then_clear b sets b to false, and returns the old value.

  • since 0.16
diff --git a/dev/containers-thread/CCPool/Make/Fut/Infix/index.html b/dev/containers-thread/CCPool/Make/Fut/Infix/index.html index e3477c67..c4d8b66d 100644 --- a/dev/containers-thread/CCPool/Make/Fut/Infix/index.html +++ b/dev/containers-thread/CCPool/Make/Fut/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers-thread.CCPool.Make.Fut.Infix)

Module Fut.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>) : 'a t -> (unit -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file +Infix (containers-thread.CCPool.Make.Fut.Infix)

Module Fut.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>) : 'a t -> (unit -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers-thread/CCPool/Make/Fut/index.html b/dev/containers-thread/CCPool/Make/Fut/index.html index 9d05f8e4..771c7dcc 100644 --- a/dev/containers-thread/CCPool/Make/Fut/index.html +++ b/dev/containers-thread/CCPool/Make/Fut/index.html @@ -1,2 +1,2 @@ -Fut (containers-thread.CCPool.Make.Fut)

Module Make.Fut

Futures

The futures are registration points for callbacks, storing a state, that are executed in the pool using run.

type 'a t

A future value of type 'a

type 'a future = 'a t

Constructors

val return : 'a -> 'a t

Future that is already computed.

val fail : exn -> 'a t

Future that fails immediately.

val make : (unit -> 'a) -> 'a t

Create a future, representing a value that will be computed by the function. If the function raises, the future will fail.

val make1 : ('a -> 'b) -> 'a -> 'b t
val make2 : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c t

Basics

val get : 'a t -> 'a

Blocking get: wait for the future to be evaluated, and get the value, or the exception that failed the future is returned. Raise e if the future failed with e.

val state : 'a t -> 'a state

State of the future.

val is_done : 'a t -> bool

Is the future evaluated (success/failure)?

Combinators

val on_success : 'a t -> ('a -> unit) -> unit

Attach a handler to be called upon success. The handler should not call functions on the future. Might be evaluated now if the future is already done.

val on_failure : _ t -> (exn -> unit) -> unit

Attach a handler to be called upon failure. The handler should not call any function on the future. Might be evaluated now if the future is already done.

val on_finish : 'a t -> ('a state -> unit) -> unit

Attach a handler to be called when the future is evaluated. The handler should not call functions on the future. Might be evaluated now if the future is already done.

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

Monadic combination of futures.

val and_then : 'a t -> (unit -> 'b t) -> 'b t

Wait for the first future to succeed, then launch the second.

val sequence_a : 'a t array -> 'a array t

Future that waits for all previous futures to terminate. If any future in the array fails, sequence_a l fails too.

val map_a : ('a -> 'b t) -> 'a array -> 'b array t

map_a f a maps f on every element of a, and will return the array of every result if all calls succeed, or an error otherwise.

val sequence_l : 'a t list -> 'a list t

Future that waits for all previous futures to terminate. If any future in the list fails, sequence_l l fails too.

val map_l : ('a -> 'b t) -> 'a list -> 'b list t

map_l f l maps f on every element of l, and will return the list of every result if all calls succeed, or an error otherwise.

val choose_a : 'a t array -> 'a t

Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.

val choose_l : 'a t list -> 'a t

Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.

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

Map the value inside the future. The function doesn't run in its own task; if it can take time, use flat_map or map_async.

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

Map the value inside the future, to be computed in a separated job.

val monoid_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

Cartesian product of the content of these futures.

  • since 2.8
val app : ('a -> 'b) t -> 'a t -> 'b t

app f x applies the result of f to the result of x.

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

app_async f x applies the result of f to the result of x, in a separated job scheduled in the pool.

val sleep : float -> unit t

Future that returns with success in the given amount of seconds. Blocks the thread! If you need to wait on many events, consider using CCTimer.

module Infix : sig ... end
include module type of Infix
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>) : 'a t -> (unit -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file +Fut (containers-thread.CCPool.Make.Fut)

Module Make.Fut

Futures

The futures are registration points for callbacks, storing a state, that are executed in the pool using run.

type 'a t

A future value of type 'a

type 'a future = 'a t

Constructors

val return : 'a -> 'a t

Future that is already computed.

val fail : exn -> 'a t

Future that fails immediately.

val make : (unit -> 'a) -> 'a t

Create a future, representing a value that will be computed by the function. If the function raises, the future will fail.

val make1 : ('a -> 'b) -> 'a -> 'b t
val make2 : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c t

Basics

val get : 'a t -> 'a

Blocking get: wait for the future to be evaluated, and get the value, or the exception that failed the future is returned. Raise e if the future failed with e.

val state : 'a t -> 'a state

State of the future.

val is_done : 'a t -> bool

Is the future evaluated (success/failure)?

Combinators

val on_success : 'a t -> ('a -> unit) -> unit

Attach a handler to be called upon success. The handler should not call functions on the future. Might be evaluated now if the future is already done.

val on_failure : _ t -> (exn -> unit) -> unit

Attach a handler to be called upon failure. The handler should not call any function on the future. Might be evaluated now if the future is already done.

val on_finish : 'a t -> ('a state -> unit) -> unit

Attach a handler to be called when the future is evaluated. The handler should not call functions on the future. Might be evaluated now if the future is already done.

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

Monadic combination of futures.

val and_then : 'a t -> (unit -> 'b t) -> 'b t

Wait for the first future to succeed, then launch the second.

val sequence_a : 'a t array -> 'a array t

Future that waits for all previous futures to terminate. If any future in the array fails, sequence_a l fails too.

val map_a : ('a -> 'b t) -> 'a array -> 'b array t

map_a f a maps f on every element of a, and will return the array of every result if all calls succeed, or an error otherwise.

val sequence_l : 'a t list -> 'a list t

Future that waits for all previous futures to terminate. If any future in the list fails, sequence_l l fails too.

val map_l : ('a -> 'b t) -> 'a list -> 'b list t

map_l f l maps f on every element of l, and will return the list of every result if all calls succeed, or an error otherwise.

val choose_a : 'a t array -> 'a t

Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.

val choose_l : 'a t list -> 'a t

Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.

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

Map the value inside the future. The function doesn't run in its own task; if it can take time, use flat_map or map_async.

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

Map the value inside the future, to be computed in a separated job.

val monoid_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

Cartesian product of the content of these futures.

  • since 2.8
val app : ('a -> 'b) t -> 'a t -> 'b t

app f x applies the result of f to the result of x.

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

app_async f x applies the result of f to the result of x, in a separated job scheduled in the pool.

val sleep : float -> unit t

Future that returns with success in the given amount of seconds. Blocks the thread! If you need to wait on many events, consider using CCTimer.

module Infix : sig ... end
include module type of Infix
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>) : 'a t -> (unit -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers-thread/CCPool/Make/argument-1-P/index.html b/dev/containers-thread/CCPool/Make/argument-1-P/index.html index 2816d290..bc390a38 100644 --- a/dev/containers-thread/CCPool/Make/argument-1-P/index.html +++ b/dev/containers-thread/CCPool/Make/argument-1-P/index.html @@ -1,2 +1,2 @@ -P (containers-thread.CCPool.Make.P)

Parameter Make.P

val max_size : int

Maximum number of threads in the pool.

\ No newline at end of file +P (containers-thread.CCPool.Make.P)

Parameter Make.P

val max_size : int

Maximum number of threads in the pool.

diff --git a/dev/containers-thread/CCPool/Make/index.html b/dev/containers-thread/CCPool/Make/index.html index 0f72b622..33ce2df6 100644 --- a/dev/containers-thread/CCPool/Make/index.html +++ b/dev/containers-thread/CCPool/Make/index.html @@ -1,2 +1,2 @@ -Make (containers-thread.CCPool.Make)

Module CCPool.Make

Create a new Pool

Parameters

module P : PARAM

Signature

val run : (unit -> _) -> unit

run f schedules f for being executed in the thread pool.

val run1 : ('a -> _) -> 'a -> unit

run1 f x is similar to run (fun () -> f x).

val run2 : ('a -> 'b -> _) -> 'a -> 'b -> unit
val run3 : ('a -> 'b -> 'c -> _) -> 'a -> 'b -> 'c -> unit
val set_exn_handler : (exn -> unit) -> unit
val active : unit -> bool

active () is true as long as stop() has not been called yet.

val stop : unit -> unit

After calling stop (), most functions will raise Stopped. This has the effect of preventing new tasks from being executed.

module Fut : sig ... end
\ No newline at end of file +Make (containers-thread.CCPool.Make)

Module CCPool.Make

Create a new Pool

Parameters

module P : PARAM

Signature

val run : (unit -> _) -> unit

run f schedules f for being executed in the thread pool.

val run1 : ('a -> _) -> 'a -> unit

run1 f x is similar to run (fun () -> f x).

val run2 : ('a -> 'b -> _) -> 'a -> 'b -> unit
val run3 : ('a -> 'b -> 'c -> _) -> 'a -> 'b -> 'c -> unit
val set_exn_handler : (exn -> unit) -> unit
val active : unit -> bool

active () is true as long as stop() has not been called yet.

val stop : unit -> unit

After calling stop (), most functions will raise Stopped. This has the effect of preventing new tasks from being executed.

module Fut : sig ... end
diff --git a/dev/containers-thread/CCPool/index.html b/dev/containers-thread/CCPool/index.html index cdbd5b3a..c25a84f6 100644 --- a/dev/containers-thread/CCPool/index.html +++ b/dev/containers-thread/CCPool/index.html @@ -1,2 +1,2 @@ -CCPool (containers-thread.CCPool)

Module CCPool

Thread Pool, and Futures

Renamed and heavily updated from CCFuture.

type +'a state =
  1. | Done of 'a
  2. | Waiting
  3. | Failed of exn
module type PARAM = sig ... end
exception Stopped
module Make (P : PARAM) : sig ... end
\ No newline at end of file +CCPool (containers-thread.CCPool)

Module CCPool

Thread Pool, and Futures

Renamed and heavily updated from CCFuture.

type +'a state =
  1. | Done of 'a
  2. | Waiting
  3. | Failed of exn
module type PARAM = sig ... end
exception Stopped
module Make (P : PARAM) : sig ... end
diff --git a/dev/containers-thread/CCPool/module-type-PARAM/index.html b/dev/containers-thread/CCPool/module-type-PARAM/index.html index bff118b6..e962a962 100644 --- a/dev/containers-thread/CCPool/module-type-PARAM/index.html +++ b/dev/containers-thread/CCPool/module-type-PARAM/index.html @@ -1,2 +1,2 @@ -PARAM (containers-thread.CCPool.PARAM)

Module type CCPool.PARAM

val max_size : int

Maximum number of threads in the pool.

\ No newline at end of file +PARAM (containers-thread.CCPool.PARAM)

Module type CCPool.PARAM

val max_size : int

Maximum number of threads in the pool.

diff --git a/dev/containers-thread/CCSemaphore/index.html b/dev/containers-thread/CCSemaphore/index.html index b135078d..df6cefbe 100644 --- a/dev/containers-thread/CCSemaphore/index.html +++ b/dev/containers-thread/CCSemaphore/index.html @@ -1,2 +1,2 @@ -CCSemaphore (containers-thread.CCSemaphore)

Module CCSemaphore

Semaphores

type t

A semaphore

val create : int -> t

create n creates a semaphore with initial value n.

  • raises Invalid_argument

    if n <= 0.

val get : t -> int

Current value.

val acquire : int -> t -> unit

acquire n s blocks until get s >= n, then atomically sets s := !s - n.

val release : int -> t -> unit

release n s atomically sets s := !s + n.

val with_acquire : n:int -> t -> f:(unit -> 'a) -> 'a

with_acquire ~n s ~f first acquires s with n units, calls f (), and then releases s with n units. Safely release the semaphore even if f () fails.

val wait_until_at_least : n:int -> t -> f:(unit -> 'a) -> 'a

wait_until_at_least ~n s ~f waits until get s >= n, then calls f () and returns its result. Doesn't modify the semaphore.

\ No newline at end of file +CCSemaphore (containers-thread.CCSemaphore)

Module CCSemaphore

Semaphores

type t

A semaphore

val create : int -> t

create n creates a semaphore with initial value n.

  • raises Invalid_argument

    if n <= 0.

val get : t -> int

Current value.

val acquire : int -> t -> unit

acquire n s blocks until get s >= n, then atomically sets s := !s - n.

val release : int -> t -> unit

release n s atomically sets s := !s + n.

val with_acquire : n:int -> t -> f:(unit -> 'a) -> 'a

with_acquire ~n s ~f first acquires s with n units, calls f (), and then releases s with n units. Safely release the semaphore even if f () fails.

val wait_until_at_least : n:int -> t -> f:(unit -> 'a) -> 'a

wait_until_at_least ~n s ~f waits until get s >= n, then calls f () and returns its result. Doesn't modify the semaphore.

diff --git a/dev/containers-thread/CCThread/Arr/index.html b/dev/containers-thread/CCThread/Arr/index.html index 2028e624..5d278212 100644 --- a/dev/containers-thread/CCThread/Arr/index.html +++ b/dev/containers-thread/CCThread/Arr/index.html @@ -1,2 +1,2 @@ -Arr (containers-thread.CCThread.Arr)

Module CCThread.Arr

Array of threads

val spawn : int -> (int -> 'a) -> t array

Arr.spawn n f creates an array res of length n, such that res.(i) = spawn (fun () -> f i).

val join : t array -> unit

Arr.join a joins every thread in a.

\ No newline at end of file +Arr (containers-thread.CCThread.Arr)

Module CCThread.Arr

Array of threads

val spawn : int -> (int -> 'a) -> t array

Arr.spawn n f creates an array res of length n, such that res.(i) = spawn (fun () -> f i).

val join : t array -> unit

Arr.join a joins every thread in a.

diff --git a/dev/containers-thread/CCThread/Barrier/index.html b/dev/containers-thread/CCThread/Barrier/index.html index 40362d73..631a4345 100644 --- a/dev/containers-thread/CCThread/Barrier/index.html +++ b/dev/containers-thread/CCThread/Barrier/index.html @@ -1,2 +1,2 @@ -Barrier (containers-thread.CCThread.Barrier)

Module CCThread.Barrier

type t

Barrier, used to synchronize threads

val create : unit -> t

Create a barrier.

val reset : t -> unit

Reset to initial (non-triggered) state.

val wait : t -> unit

wait b waits for barrier b to be activated by activate b. All threads calling this wait until activate b is called. If b is already activated, wait b does nothing.

val activate : t -> unit

activate b unblocks all threads that were waiting on b.

val activated : t -> bool

activated b returns true iff activate b was called, and reset b was not called since. In other words, activated b = true means wait b will not block.

\ No newline at end of file +Barrier (containers-thread.CCThread.Barrier)

Module CCThread.Barrier

type t

Barrier, used to synchronize threads

val create : unit -> t

Create a barrier.

val reset : t -> unit

Reset to initial (non-triggered) state.

val wait : t -> unit

wait b waits for barrier b to be activated by activate b. All threads calling this wait until activate b is called. If b is already activated, wait b does nothing.

val activate : t -> unit

activate b unblocks all threads that were waiting on b.

val activated : t -> bool

activated b returns true iff activate b was called, and reset b was not called since. In other words, activated b = true means wait b will not block.

diff --git a/dev/containers-thread/CCThread/index.html b/dev/containers-thread/CCThread/index.html index 22bef324..716deec7 100644 --- a/dev/containers-thread/CCThread/index.html +++ b/dev/containers-thread/CCThread/index.html @@ -1,2 +1,2 @@ -CCThread (containers-thread.CCThread)

Module CCThread

Threads

status: unstable

type t = Thread.t
val spawn : (unit -> _) -> t

spawn f creates a new thread that runs f ().

val spawn1 : ('a -> _) -> 'a -> t

spawn1 f x is like spawn (fun () -> f x).

  • since 0.16
val spawn2 : ('a -> 'b -> _) -> 'a -> 'b -> t

spawn2 f x y is like spawn (fun () -> f x y).

  • since 0.16
val detach : (unit -> 'a) -> unit

detach f is the same as ignore (spawn f).

module Arr : sig ... end

Single-Use Barrier

module Barrier : sig ... end
\ No newline at end of file +CCThread (containers-thread.CCThread)

Module CCThread

Threads

status: unstable

type t = Thread.t
val spawn : (unit -> _) -> t

spawn f creates a new thread that runs f ().

val spawn1 : ('a -> _) -> 'a -> t

spawn1 f x is like spawn (fun () -> f x).

  • since 0.16
val spawn2 : ('a -> 'b -> _) -> 'a -> 'b -> t

spawn2 f x y is like spawn (fun () -> f x y).

  • since 0.16
val detach : (unit -> 'a) -> unit

detach f is the same as ignore (spawn f).

module Arr : sig ... end

Single-Use Barrier

module Barrier : sig ... end
diff --git a/dev/containers-thread/CCTimer/index.html b/dev/containers-thread/CCTimer/index.html index 17df7c20..916285da 100644 --- a/dev/containers-thread/CCTimer/index.html +++ b/dev/containers-thread/CCTimer/index.html @@ -1,2 +1,2 @@ -CCTimer (containers-thread.CCTimer)

Module CCTimer

Event timer

Used to be part of CCFuture.

type t

A scheduler for events. It runs in its own thread.

val create : unit -> t

A new timer.

val set_exn_handler : t -> (exn -> unit) -> unit

set_exn_handler timer f registers f so that any exception raised by a task scheduled in timer is given to f.

exception Stopped
val after : t -> float -> f:(unit -> _) -> unit

Call the callback f after the given number of seconds.

  • raises Stopped

    if the timer was stopped.

val at : t -> float -> f:(unit -> _) -> unit

Create a future that evaluates to () at the given Unix timestamp.

  • raises Stopped

    if the timer was stopped.

exception ExitEvery
val every : ?delay:float -> t -> float -> f:(unit -> _) -> unit

every timer n ~f calls f () every n seconds. f() can raise ExitEvery to stop the cycle.

  • parameter delay

    if provided, the first call to f () is delayed by that many seconds.

  • raises Stopped

    if the timer was stopped.

val stop : t -> unit

Stop the given timer, cancelling pending tasks. Idempotent. From now on, calling most other operations on the timer will raise Stopped.

val active : t -> bool

Return true until stop t has been called.

\ No newline at end of file +CCTimer (containers-thread.CCTimer)

Module CCTimer

Event timer

Used to be part of CCFuture.

type t

A scheduler for events. It runs in its own thread.

val create : unit -> t

A new timer.

val set_exn_handler : t -> (exn -> unit) -> unit

set_exn_handler timer f registers f so that any exception raised by a task scheduled in timer is given to f.

exception Stopped
val after : t -> float -> f:(unit -> _) -> unit

Call the callback f after the given number of seconds.

  • raises Stopped

    if the timer was stopped.

val at : t -> float -> f:(unit -> _) -> unit

Create a future that evaluates to () at the given Unix timestamp.

  • raises Stopped

    if the timer was stopped.

exception ExitEvery
val every : ?delay:float -> t -> float -> f:(unit -> _) -> unit

every timer n ~f calls f () every n seconds. f() can raise ExitEvery to stop the cycle.

  • parameter delay

    if provided, the first call to f () is delayed by that many seconds.

  • raises Stopped

    if the timer was stopped.

val stop : t -> unit

Stop the given timer, cancelling pending tasks. Idempotent. From now on, calling most other operations on the timer will raise Stopped.

val active : t -> bool

Return true until stop t has been called.

diff --git a/dev/containers-thread/index.html b/dev/containers-thread/index.html index d07e9612..0d3771a7 100644 --- a/dev/containers-thread/index.html +++ b/dev/containers-thread/index.html @@ -1,2 +1,2 @@ -index (containers-thread.index)

Package containers-thread

Package info

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

Package containers-thread

Package info

changes-files
license-files
readme-files
diff --git a/dev/containers/CCArray/Infix/index.html b/dev/containers/CCArray/Infix/index.html index 1bf9cd91..6ea6a350 100644 --- a/dev/containers/CCArray/Infix/index.html +++ b/dev/containers/CCArray/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCArray.Infix)

Module CCArray.Infix

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

a >>= f is the infix version of flat_map.

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

a >>| f is the infix version of map.

  • since 0.8
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

a >|= f is the infix version of map.

  • since 0.8
val (--) : int -> int -> int t

x -- y creates an array containing integers in the range x .. y. Bounds included.

val (--^) : int -> int -> int t

x --^ y creates an array containing integers in the range x .. y. Right bound excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file +Infix (containers.CCArray.Infix)

Module CCArray.Infix

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

a >>= f is the infix version of flat_map.

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

a >>| f is the infix version of map.

  • since 0.8
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

a >|= f is the infix version of map.

  • since 0.8
val (--) : int -> int -> int t

x -- y creates an array containing integers in the range x .. y. Bounds included.

val (--^) : int -> int -> int t

x --^ y creates an array containing integers in the range x .. y. Right bound excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers/CCArray/index.html b/dev/containers/CCArray/index.html index f9842730..355b187c 100644 --- a/dev/containers/CCArray/index.html +++ b/dev/containers/CCArray/index.html @@ -1,20 +1,20 @@ -CCArray (containers.CCArray)

Module CCArray

Array utils

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Arrays

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 : int -> 'a -> 'a array
  • deprecated

    create is an alias for make.

val create_float : int -> float array

create_float n returns a fresh float array of length n, with uninitialized data.

  • since 4.03
val make_float : int -> float array
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 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 create_matrix : int -> int -> 'a -> 'a array array
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 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 fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a

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 : ('a -> 'b -> 'a * 'c) -> 'a -> 'b array -> 'a * 'c array

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.13.0
val fold_right : ('b -> 'a -> 'a) -> 'b array -> 'a -> 'a

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.0 (4.05.0 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.0 (4.05.0 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.0
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.0
val memq : 'a -> 'a array -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

  • since 4.03.0
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.0

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.0
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.0

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_seqi : 'a array -> (int * 'a) Stdlib.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 Stdlib.Seq.t -> 'a array

Create an array from the generator

  • since 4.07
val empty : 'a t

empty is the empty array, physically equal to [||].

val equal : 'a equal -> 'a t equal

equal eq a1 a2 is true if the lengths of a1 and a2 are the same and if their corresponding elements test equal, using eq.

val compare : 'a ord -> 'a t ord

compare cmp a1 a2 compares arrays a1 and a2 using the function comparison cmp.

val swap : 'a t -> int -> int -> unit

swap a i j swaps elements at indices i and j.

  • since 1.4
val get_safe : 'a t -> int -> 'a option

get_safe a i returns Some a.(i) if i is a valid index.

  • since 0.18
val map_inplace : ('a -> 'a) -> 'a t -> unit

map_inplace f a replace all elements of a by its image by f.

  • since 3.8
val mapi_inplace : (int -> 'a -> 'a) -> 'a t -> unit

mapi_inplace f a replace all elements of a by its image by f.

  • since 3.10
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a

fold f init a computes f (โ€ฆ (f (f init a.(0)) a.(1)) โ€ฆ) a.(n-1), where n is the length of the array a. Same as Array.fold_left

val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a

foldi f init a is just like fold, but it also passes in the index of each element as the second argument to the folded function f.

val fold_while : ('a -> 'b -> 'a * [ `Stop | `Continue ]) -> 'a -> 'b t -> 'a

fold_while f init a folds left on array a until a stop condition via ('a, `Stop) is indicated by the accumulator.

  • since 0.8
val fold_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a t -> 'acc * 'b t

fold_map f init a is a fold_left-like function, but it also maps the array to another array.

  • since 1.2, but only
  • since 2.1 with labels
val scan_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc t

scan_left f init a returns the array [|init; f init x0; f (f init a.(0)) a.(1); โ€ฆ|] .

  • since 1.2, but only
  • since 2.1 with labels
val reverse_in_place : 'a t -> unit

reverse_in_place a reverses the array a in place.

val sorted : ('a -> 'a -> int) -> 'a t -> 'a array

sorted f a makes a copy of a and sorts it with f.

  • since 1.0
val sort_indices : ('a -> 'a -> int) -> 'a t -> int array

sort_indices f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of sorted f a appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices f a) = sorted f a. sort_indices yields the inverse permutation of sort_ranking.

  • since 1.0
val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array

sort_ranking f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of a appears in sorted f a. a is not modified.

In other words, map (fun i -> (sorted f a).(i)) (sort_ranking f a) = a. sort_ranking yields the inverse permutation of sort_indices.

In the absence of duplicate elements in a, we also have lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i).

  • since 1.0
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool

mem ~eq x a return true if x is present in a. Linear time.

  • since 3.0
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find_map f a returns Some y if there is an element x such that f x = Some y. Otherwise returns None.

  • since 1.3, but only
  • since 2.1 with labels
val find_map_i : (int -> 'a -> 'b option) -> 'a t -> 'b option

find_map_i f a is like find_map, but the index of the element is also passed to the predicate function f.

  • since 1.3, but only
  • since 2.1 with labels
val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option

find_idx f a returns Some (i,x) where x is the i-th element of a, and f x holds. Otherwise returns None.

  • since 0.3.4
val max : ('a -> 'a -> int) -> 'a t -> 'a option

max cmp a returns None if a is empty, otherwise, returns Some e where e is a maximum element in a with respect to cmp.

  • since 3.12
val max_exn : ('a -> 'a -> int) -> 'a t -> 'a

max_exn cmp a is like max, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val argmax : ('a -> 'a -> int) -> 'a t -> int option

argmax cmp a returns None if a is empty, otherwise, returns Some i where i is the index of a maximum element in a with respect to cmp.

  • since 3.12
val argmax_exn : ('a -> 'a -> int) -> 'a t -> int

argmax_exn cmp a is like argmax, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val min : ('a -> 'a -> int) -> 'a t -> 'a option

min cmp a returns None if a is empty, otherwise, returns Some e where e is a minimum element in a with respect to cmp.

  • since 3.12
val min_exn : ('a -> 'a -> int) -> 'a t -> 'a

min_exn cmp a is like min, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val argmin : ('a -> 'a -> int) -> 'a t -> int option

argmin cmp a returns None if a is empty, otherwise, returns Some i where i is the index of a minimum element in a with respect to cmp.

  • since 3.12
val argmin_exn : ('a -> 'a -> int) -> 'a t -> int

argmin_exn cmp a is like argmin, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val lookup : cmp:'a ord -> 'a -> 'a t -> int option

lookup ~cmp key a lookups the index of some key key in a sorted array a. Undefined behavior if the array a is not sorted wrt ~cmp. Complexity: O(log (n)) (dichotomic search).

  • returns

    None if the key key is not present, or Some i (i the index of the key) otherwise.

val lookup_exn : cmp:'a ord -> 'a -> 'a t -> int

lookup_exn ~cmp key a is like lookup, but

  • raises Not_found

    if the key key is not present.

val bsearch : - cmp:('a -> 'a -> int) -> +CCArray (containers.CCArray)

Module CCArray

Array utils

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Arrays

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 : int -> 'a -> 'a array
  • deprecated

    create is an alias for make.

val create_float : int -> float array

create_float n returns a fresh float array of length n, with uninitialized data.

  • since 4.03
val make_float : int -> float array
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 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 create_matrix : int -> int -> 'a -> 'a array array
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 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 fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a

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 : ('a -> 'b -> 'a * 'c) -> 'a -> 'b array -> 'a * 'c array

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.13.0
val fold_right : ('b -> 'a -> 'a) -> 'b array -> 'a -> 'a

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.0 (4.05.0 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.0 (4.05.0 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.0
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.0
val memq : 'a -> 'a array -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

  • since 4.03.0
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.0

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.0
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.0

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_seqi : 'a array -> (int * 'a) Stdlib.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 Stdlib.Seq.t -> 'a array

Create an array from the generator

  • since 4.07
val empty : 'a t

empty is the empty array, physically equal to [||].

val equal : 'a equal -> 'a t equal

equal eq a1 a2 is true if the lengths of a1 and a2 are the same and if their corresponding elements test equal, using eq.

val compare : 'a ord -> 'a t ord

compare cmp a1 a2 compares arrays a1 and a2 using the function comparison cmp.

val swap : 'a t -> int -> int -> unit

swap a i j swaps elements at indices i and j.

  • since 1.4
val get_safe : 'a t -> int -> 'a option

get_safe a i returns Some a.(i) if i is a valid index.

  • since 0.18
val map_inplace : ('a -> 'a) -> 'a t -> unit

map_inplace f a replace all elements of a by its image by f.

  • since 3.8
val mapi_inplace : (int -> 'a -> 'a) -> 'a t -> unit

mapi_inplace f a replace all elements of a by its image by f.

  • since 3.10
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a

fold f init a computes f (โ€ฆ (f (f init a.(0)) a.(1)) โ€ฆ) a.(n-1), where n is the length of the array a. Same as Array.fold_left

val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a

foldi f init a is just like fold, but it also passes in the index of each element as the second argument to the folded function f.

val fold_while : ('a -> 'b -> 'a * [ `Stop | `Continue ]) -> 'a -> 'b t -> 'a

fold_while f init a folds left on array a until a stop condition via ('a, `Stop) is indicated by the accumulator.

  • since 0.8
val fold_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a t -> 'acc * 'b t

fold_map f init a is a fold_left-like function, but it also maps the array to another array.

  • since 1.2, but only
  • since 2.1 with labels
val scan_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc t

scan_left f init a returns the array [|init; f init x0; f (f init a.(0)) a.(1); โ€ฆ|] .

  • since 1.2, but only
  • since 2.1 with labels
val reverse_in_place : 'a t -> unit

reverse_in_place a reverses the array a in place.

val sorted : ('a -> 'a -> int) -> 'a t -> 'a array

sorted f a makes a copy of a and sorts it with f.

  • since 1.0
val sort_indices : ('a -> 'a -> int) -> 'a t -> int array

sort_indices f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of sorted f a appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices f a) = sorted f a. sort_indices yields the inverse permutation of sort_ranking.

  • since 1.0
val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array

sort_ranking f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of a appears in sorted f a. a is not modified.

In other words, map (fun i -> (sorted f a).(i)) (sort_ranking f a) = a. sort_ranking yields the inverse permutation of sort_indices.

In the absence of duplicate elements in a, we also have lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i).

  • since 1.0
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool

mem ~eq x a return true if x is present in a. Linear time.

  • since 3.0
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find_map f a returns Some y if there is an element x such that f x = Some y. Otherwise returns None.

  • since 1.3, but only
  • since 2.1 with labels
val find_map_i : (int -> 'a -> 'b option) -> 'a t -> 'b option

find_map_i f a is like find_map, but the index of the element is also passed to the predicate function f.

  • since 1.3, but only
  • since 2.1 with labels
val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option

find_idx f a returns Some (i,x) where x is the i-th element of a, and f x holds. Otherwise returns None.

  • since 0.3.4
val max : ('a -> 'a -> int) -> 'a t -> 'a option

max cmp a returns None if a is empty, otherwise, returns Some e where e is a maximum element in a with respect to cmp.

  • since 3.12
val max_exn : ('a -> 'a -> int) -> 'a t -> 'a

max_exn cmp a is like max, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val argmax : ('a -> 'a -> int) -> 'a t -> int option

argmax cmp a returns None if a is empty, otherwise, returns Some i where i is the index of a maximum element in a with respect to cmp.

  • since 3.12
val argmax_exn : ('a -> 'a -> int) -> 'a t -> int

argmax_exn cmp a is like argmax, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val min : ('a -> 'a -> int) -> 'a t -> 'a option

min cmp a returns None if a is empty, otherwise, returns Some e where e is a minimum element in a with respect to cmp.

  • since 3.12
val min_exn : ('a -> 'a -> int) -> 'a t -> 'a

min_exn cmp a is like min, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val argmin : ('a -> 'a -> int) -> 'a t -> int option

argmin cmp a returns None if a is empty, otherwise, returns Some i where i is the index of a minimum element in a with respect to cmp.

  • since 3.12
val argmin_exn : ('a -> 'a -> int) -> 'a t -> int

argmin_exn cmp a is like argmin, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val lookup : cmp:'a ord -> 'a -> 'a t -> int option

lookup ~cmp key a lookups the index of some key key in a sorted array a. Undefined behavior if the array a is not sorted wrt ~cmp. Complexity: O(log (n)) (dichotomic search).

  • returns

    None if the key key is not present, or Some i (i the index of the key) otherwise.

val lookup_exn : cmp:'a ord -> 'a -> 'a t -> int

lookup_exn ~cmp key a is like lookup, but

  • raises Not_found

    if the key key is not present.

val bsearch : + cmp:('a -> 'a -> int) -> 'a -> 'a t -> - [ `All_lower | `All_bigger | `Just_after of int | `Empty | `At of int ]

bsearch ~cmp key a finds the index of the object key in the array a, provided a is sorted using cmp. If the array is not sorted, the result is not specified (may raise Invalid_argument).

Complexity: O(log n) where n is the length of the array a (dichotomic search).

  • returns
    • `At i if cmp a.(i) key = 0 (for some i).
    • `All_lower if all elements of a are lower than key.
    • `All_bigger if all elements of a are bigger than key.
    • `Just_after i if a.(i) < key < a.(i+1).
    • `Empty if the array a is empty.
  • raises Invalid_argument

    if the array is found to be unsorted w.r.t cmp.

  • since 0.13
val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

for_all2 f [|a1; โ€ฆ; an|] [|b1; โ€ฆ; bn|] is true if each pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) && (f a2 b2) && โ€ฆ && (f an bn).

  • raises Invalid_argument

    if arrays have distinct lengths. Allow different types.

  • since 0.20
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

exists2 f [|a1; โ€ฆ; an|] [|b1; โ€ฆ; bn|] is true if any pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) || (f a2 b2) || โ€ฆ || (f an bn).

  • raises Invalid_argument

    if arrays have distinct lengths. Allow different types.

  • since 0.20
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

fold2 f init a b fold on two arrays a and b stepwise. It computes f (โ€ฆ (f init a1 b1) โ€ฆ) an bn.

  • raises Invalid_argument

    if a and b have distinct lengths.

  • since 0.20
val shuffle : 'a t -> unit

shuffle a randomly shuffles the array a, in place.

val shuffle_with : Stdlib.Random.State.t -> 'a t -> unit

shuffle_with rs a randomly shuffles the array a (like shuffle) but a specialized random state rs is used to control the random numbers being produced during shuffling (for reproducibility).

val random_choose : 'a t -> 'a random_gen

random_choose a rs randomly chooses an element of a.

  • raises Not_found

    if the array/slice is empty.

val to_string : ?sep:string -> ('a -> string) -> 'a array -> string

to_string ~sep item_to_string a print a to a string using sep as a separator between elements of a.

  • since 2.7
val to_iter : 'a t -> 'a iter

to_iter a returns an iter of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the iterator.

  • since 2.8
val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq a returns a Seq.t of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the sequence. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen a returns a gen of the elements of an array a.

IO

val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + [ `All_lower | `All_bigger | `Just_after of int | `Empty | `At of int ]

bsearch ~cmp key a finds the index of the object key in the array a, provided a is sorted using cmp. If the array is not sorted, the result is not specified (may raise Invalid_argument).

Complexity: O(log n) where n is the length of the array a (dichotomic search).

  • returns
    • `At i if cmp a.(i) key = 0 (for some i).
    • `All_lower if all elements of a are lower than key.
    • `All_bigger if all elements of a are bigger than key.
    • `Just_after i if a.(i) < key < a.(i+1).
    • `Empty if the array a is empty.
  • raises Invalid_argument

    if the array is found to be unsorted w.r.t cmp.

  • since 0.13
val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

for_all2 f [|a1; โ€ฆ; an|] [|b1; โ€ฆ; bn|] is true if each pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) && (f a2 b2) && โ€ฆ && (f an bn).

  • raises Invalid_argument

    if arrays have distinct lengths. Allow different types.

  • since 0.20
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

exists2 f [|a1; โ€ฆ; an|] [|b1; โ€ฆ; bn|] is true if any pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) || (f a2 b2) || โ€ฆ || (f an bn).

  • raises Invalid_argument

    if arrays have distinct lengths. Allow different types.

  • since 0.20
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

fold2 f init a b fold on two arrays a and b stepwise. It computes f (โ€ฆ (f init a1 b1) โ€ฆ) an bn.

  • raises Invalid_argument

    if a and b have distinct lengths.

  • since 0.20
val shuffle : 'a t -> unit

shuffle a randomly shuffles the array a, in place.

val shuffle_with : Stdlib.Random.State.t -> 'a t -> unit

shuffle_with rs a randomly shuffles the array a (like shuffle) but a specialized random state rs is used to control the random numbers being produced during shuffling (for reproducibility).

val random_choose : 'a t -> 'a random_gen

random_choose a rs randomly chooses an element of a.

  • raises Not_found

    if the array/slice is empty.

val to_string : ?sep:string -> ('a -> string) -> 'a array -> string

to_string ~sep item_to_string a print a to a string using sep as a separator between elements of a.

  • since 2.7
val to_iter : 'a t -> 'a iter

to_iter a returns an iter of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the iterator.

  • since 2.8
val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq a returns a Seq.t of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the sequence. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen a returns a gen of the elements of an array a.

IO

val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> 'a printer -> 'a t printer

pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

val pp_i : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> (int -> 'a printer) -> 'a t printer

pp_i ~pp_start ~pp_stop ~pp_sep pp_item ppf a prints the array a on ppf. The printing function pp_item is giving both index and element. pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

val rev : 'a t -> 'a t

rev a copies the array a and reverses it in place.

  • since 0.20
val filter : ('a -> bool) -> 'a t -> 'a t

filter f a filters elements out of the array a. Only the elements satisfying the given predicate f will be kept.

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

filter_map f [|a1; โ€ฆ; an|] calls (f a1) โ€ฆ (f an) and returns an array b consisting of all elements bi such as f ai = Some bi. When f returns None, the corresponding element of a is discarded.

val monoid_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

monoid_product f a b passes all combinaisons of tuples from the two arrays a and b to the function f.

  • since 2.8
val flat_map : ('a -> 'b t) -> 'a t -> 'b array

flat_map f a transforms each element of a into an array, then flattens.

val except_idx : 'a t -> int -> 'a list

except_idx a i removes the element of a at given index i, and returns the list of the other elements.

val random : 'a random_gen -> 'a t random_gen
val random_non_empty : 'a random_gen -> 'a t random_gen
val random_len : int -> 'a random_gen -> 'a t random_gen

Generic Functions

module type MONO_ARRAY = sig ... end
val sort_generic : (module MONO_ARRAY with type elt = 'elt and type t = 'arr) -> - cmp:('elt -> 'elt -> int) -> + cmp:('elt -> 'elt -> int) -> 'arr -> - unit

sort_generic (module M) ~cmp a sorts the array a, without allocating (eats stack space though). Performance might be lower than Array.sort.

  • since 0.14

Infix Operators

It is convenient to open CCArray.Infix to access the infix operators without cluttering the scope too much.

  • since 2.7
module Infix : sig ... end
include module type of Infix
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

a >>= f is the infix version of flat_map.

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

a >>| f is the infix version of map.

  • since 0.8
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

a >|= f is the infix version of map.

  • since 0.8
val (--) : int -> int -> int t

x -- y creates an array containing integers in the range x .. y. Bounds included.

val (--^) : int -> int -> int t

x --^ y creates an array containing integers in the range x .. y. Right bound excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file + unit

sort_generic (module M) ~cmp a sorts the array a, without allocating (eats stack space though). Performance might be lower than Array.sort.

  • since 0.14

Infix Operators

It is convenient to open CCArray.Infix to access the infix operators without cluttering the scope too much.

module Infix : sig ... end
include module type of Infix
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

a >>= f is the infix version of flat_map.

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

a >>| f is the infix version of map.

  • since 0.8
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

a >|= f is the infix version of map.

  • since 0.8
val (--) : int -> int -> int t

x -- y creates an array containing integers in the range x .. y. Bounds included.

val (--^) : int -> int -> int t

x --^ y creates an array containing integers in the range x .. y. Right bound excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers/CCArray/module-type-MONO_ARRAY/index.html b/dev/containers/CCArray/module-type-MONO_ARRAY/index.html index 7554f901..070b4af4 100644 --- a/dev/containers/CCArray/module-type-MONO_ARRAY/index.html +++ b/dev/containers/CCArray/module-type-MONO_ARRAY/index.html @@ -1,2 +1,2 @@ -MONO_ARRAY (containers.CCArray.MONO_ARRAY)

Module type CCArray.MONO_ARRAY

type elt
type t
val length : t -> int
val get : t -> int -> elt
val set : t -> int -> elt -> unit
\ No newline at end of file +MONO_ARRAY (containers.CCArray.MONO_ARRAY)

Module type CCArray.MONO_ARRAY

type elt
type t
val length : t -> int
val get : t -> int -> elt
val set : t -> int -> elt -> unit
diff --git a/dev/containers/CCArrayLabels/Infix/index.html b/dev/containers/CCArrayLabels/Infix/index.html index 8733b5ab..bfec59c8 100644 --- a/dev/containers/CCArrayLabels/Infix/index.html +++ b/dev/containers/CCArrayLabels/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCArrayLabels.Infix)

Module CCArrayLabels.Infix

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

a >>= f is the infix version of flat_map.

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

a >>| f is the infix version of map.

  • since 0.8
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

a >|= f is the infix version of map.

  • since 0.8
val (--) : int -> int -> int t

x -- y creates an array containing integers in the range x .. y. Bounds included.

val (--^) : int -> int -> int t

x --^ y creates an array containing integers in the range x .. y. Right bound excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file +Infix (containers.CCArrayLabels.Infix)

Module CCArrayLabels.Infix

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

a >>= f is the infix version of flat_map.

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

a >>| f is the infix version of map.

  • since 0.8
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

a >|= f is the infix version of map.

  • since 0.8
val (--) : int -> int -> int t

x -- y creates an array containing integers in the range x .. y. Bounds included.

val (--^) : int -> int -> int t

x --^ y creates an array containing integers in the range x .. y. Right bound excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers/CCArrayLabels/index.html b/dev/containers/CCArrayLabels/index.html index 177d4fad..9e7902dc 100644 --- a/dev/containers/CCArrayLabels/index.html +++ b/dev/containers/CCArrayLabels/index.html @@ -1,34 +1,34 @@ -CCArrayLabels (containers.CCArrayLabels)

Module CCArrayLabels

Array utils (Labeled version of CCArray)

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Arrays

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 : int -> 'a -> 'a array
  • deprecated

    create is an alias for make.

val create_float : int -> float array

create_float n returns a fresh float array of length n, with uninitialized data.

  • since 4.03
val make_float : int -> float array
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 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 create_matrix : dimx:int -> dimy:int -> 'a -> 'a array array
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 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 fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b array -> 'a

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:('a -> 'b -> 'a * 'c) -> - init:'a -> +CCArrayLabels (containers.CCArrayLabels)

Module CCArrayLabels

Array utils (Labeled version of CCArray)

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Arrays

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 : int -> 'a -> 'a array
  • deprecated

    create is an alias for make.

val create_float : int -> float array

create_float n returns a fresh float array of length n, with uninitialized data.

  • since 4.03
val make_float : int -> float array
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 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 create_matrix : dimx:int -> dimy:int -> 'a -> 'a array array
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 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 fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b array -> 'a

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:('a -> 'b -> 'a * 'c) -> + init:'a -> 'b array -> - 'a * 'c array

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.13.0
val fold_right : f:('b -> 'a -> 'a) -> 'b array -> init:'a -> 'a

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

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.0
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.0
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.0
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.0

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.0
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.0

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_seqi : 'a array -> (int * 'a) Stdlib.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 Stdlib.Seq.t -> 'a array

Create an array from the generator

  • since 4.07
val empty : 'a t

empty is the empty array, physically equal to [||].

val equal : 'a equal -> 'a t equal

equal eq a1 a2 is true if the lengths of a1 and a2 are the same and if their corresponding elements test equal, using eq.

val compare : 'a ord -> 'a t ord

compare cmp a1 a2 compares arrays a1 and a2 using the function comparison cmp.

val swap : 'a t -> int -> int -> unit

swap a i j swaps elements at indices i and j.

  • since 1.4
val get_safe : 'a t -> int -> 'a option

get_safe a i returns Some a.(i) if i is a valid index.

  • since 0.18
val map_inplace : f:('a -> 'a) -> 'a t -> unit

map_inplace ~f a replace all elements of a by its image by f.

  • since 3.8
val mapi_inplace : f:(int -> 'a -> 'a) -> 'a t -> unit

mapi_inplace ~f a replace all elements of a by its image by f.

  • since 3.10
val fold : f:('a -> 'b -> 'a) -> init:'a -> 'b t -> 'a

fold ~f ~init a computes f (โ€ฆ (f (f init a.(0)) a.(1)) โ€ฆ) a.(n-1), where n is the length of the array a. Same as ArrayLabels.fold_left

val foldi : f:('a -> int -> 'b -> 'a) -> init:'a -> 'b t -> 'a

foldi ~f ~init a is just like fold, but it also passes in the index of each element as the second argument to the folded function f.

val fold_while : - f:('a -> 'b -> 'a * [ `Stop | `Continue ]) -> - init:'a -> + 'a * 'c array

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.13.0
val fold_right : f:('b -> 'a -> 'a) -> 'b array -> init:'a -> 'a

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

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.0
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.0
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.0
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.0

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.0
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.0

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_seqi : 'a array -> (int * 'a) Stdlib.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 Stdlib.Seq.t -> 'a array

Create an array from the generator

  • since 4.07
val empty : 'a t

empty is the empty array, physically equal to [||].

val equal : 'a equal -> 'a t equal

equal eq a1 a2 is true if the lengths of a1 and a2 are the same and if their corresponding elements test equal, using eq.

val compare : 'a ord -> 'a t ord

compare cmp a1 a2 compares arrays a1 and a2 using the function comparison cmp.

val swap : 'a t -> int -> int -> unit

swap a i j swaps elements at indices i and j.

  • since 1.4
val get_safe : 'a t -> int -> 'a option

get_safe a i returns Some a.(i) if i is a valid index.

  • since 0.18
val map_inplace : f:('a -> 'a) -> 'a t -> unit

map_inplace ~f a replace all elements of a by its image by f.

  • since 3.8
val mapi_inplace : f:(int -> 'a -> 'a) -> 'a t -> unit

mapi_inplace ~f a replace all elements of a by its image by f.

  • since 3.10
val fold : f:('a -> 'b -> 'a) -> init:'a -> 'b t -> 'a

fold ~f ~init a computes f (โ€ฆ (f (f init a.(0)) a.(1)) โ€ฆ) a.(n-1), where n is the length of the array a. Same as ArrayLabels.fold_left

val foldi : f:('a -> int -> 'b -> 'a) -> init:'a -> 'b t -> 'a

foldi ~f ~init a is just like fold, but it also passes in the index of each element as the second argument to the folded function f.

val fold_while : + f:('a -> 'b -> 'a * [ `Stop | `Continue ]) -> + init:'a -> 'b t -> - 'a

fold_while ~f ~init a folds left on array a until a stop condition via ('a, `Stop) is indicated by the accumulator.

  • since 0.8
val fold_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a t -> 'acc * 'b t

fold_map ~f ~init a is a fold_left-like function, but it also maps the array to another array.

  • since 1.2, but only
  • since 2.1 with labels
val scan_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a t -> 'acc t

scan_left ~f ~init a returns the array [|init; f init x0; f (f init a.(0)) a.(1); โ€ฆ|] .

  • since 1.2, but only
  • since 2.1 with labels
val reverse_in_place : 'a t -> unit

reverse_in_place a reverses the array a in place.

val sorted : f:('a -> 'a -> int) -> 'a t -> 'a array

sorted ~f a makes a copy of a and sorts it with f.

  • since 1.0
val sort_indices : f:('a -> 'a -> int) -> 'a t -> int array

sort_indices ~f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of sorted f a appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices f a) = sorted f a. sort_indices yields the inverse permutation of sort_ranking.

  • since 1.0
val sort_ranking : f:('a -> 'a -> int) -> 'a t -> int array

sort_ranking ~f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of a appears in sorted f a. a is not modified.

In other words, map (fun i -> (sorted f a).(i)) (sort_ranking f a) = a. sort_ranking yields the inverse permutation of sort_indices.

In the absence of duplicate elements in a, we also have lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i).

  • since 1.0
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool

mem ~eq x a return true if x is present in a. Linear time.

  • since 3.0
val find_map : f:('a -> 'b option) -> 'a t -> 'b option

find_map ~f a returns Some y if there is an element x such that f x = Some y. Otherwise returns None.

  • since 1.3, but only
  • since 2.1 with labels
val find_map_i : f:(int -> 'a -> 'b option) -> 'a t -> 'b option

find_map_i ~f a is like find_map, but the index of the element is also passed to the predicate function f.

  • since 1.3, but only
  • since 2.1 with labels
val find_idx : f:('a -> bool) -> 'a t -> (int * 'a) option

find_idx ~f a returns Some (i,x) where x is the i-th element of a, and f x holds. Otherwise returns None.

  • since 0.3.4
val max : cmp:('a -> 'a -> int) -> 'a t -> 'a option

max ~cmp a returns None if a is empty, otherwise, returns Some e where e is a maximum element in a with respect to cmp.

  • since 3.12
val max_exn : cmp:('a -> 'a -> int) -> 'a t -> 'a

max_exn ~cmp a is like max, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val argmax : cmp:('a -> 'a -> int) -> 'a t -> int option

argmax ~cmp a returns None if a is empty, otherwise, returns Some i where i is the index of a maximum element in a with respect to cmp.

  • since 3.12
val argmax_exn : cmp:('a -> 'a -> int) -> 'a t -> int

argmax_exn ~cmp a is like argmax, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val min : cmp:('a -> 'a -> int) -> 'a t -> 'a option

min ~cmp a returns None if a is empty, otherwise, returns Some e where e is a minimum element in a with respect to cmp.

  • since 3.12
val min_exn : cmp:('a -> 'a -> int) -> 'a t -> 'a

min_exn ~cmp a is like min, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val argmin : cmp:('a -> 'a -> int) -> 'a t -> int option

argmin ~cmp a returns None if a is empty, otherwise, returns Some i where i is the index of a minimum element in a with respect to cmp.

  • since 3.12
val argmin_exn : cmp:('a -> 'a -> int) -> 'a t -> int

argmin_exn ~cmp a is like argmin, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val lookup : cmp:'a ord -> key:'a -> 'a t -> int option

lookup ~cmp ~key a lookups the index of some key key in a sorted array a. Undefined behavior if the array a is not sorted wrt cmp. Complexity: O(log (n)) (dichotomic search).

  • returns

    None if the key key is not present, or Some i (i the index of the key) otherwise.

val lookup_exn : cmp:'a ord -> key:'a -> 'a t -> int

lookup_exn ~cmp ~key a is like lookup, but

  • raises Not_found

    if the key key is not present.

val bsearch : - cmp:('a -> 'a -> int) -> - key:'a -> + 'a

fold_while ~f ~init a folds left on array a until a stop condition via ('a, `Stop) is indicated by the accumulator.

  • since 0.8
val fold_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a t -> 'acc * 'b t

fold_map ~f ~init a is a fold_left-like function, but it also maps the array to another array.

  • since 1.2, but only
  • since 2.1 with labels
val scan_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a t -> 'acc t

scan_left ~f ~init a returns the array [|init; f init x0; f (f init a.(0)) a.(1); โ€ฆ|] .

  • since 1.2, but only
  • since 2.1 with labels
val reverse_in_place : 'a t -> unit

reverse_in_place a reverses the array a in place.

val sorted : f:('a -> 'a -> int) -> 'a t -> 'a array

sorted ~f a makes a copy of a and sorts it with f.

  • since 1.0
val sort_indices : f:('a -> 'a -> int) -> 'a t -> int array

sort_indices ~f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of sorted f a appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices f a) = sorted f a. sort_indices yields the inverse permutation of sort_ranking.

  • since 1.0
val sort_ranking : f:('a -> 'a -> int) -> 'a t -> int array

sort_ranking ~f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of a appears in sorted f a. a is not modified.

In other words, map (fun i -> (sorted f a).(i)) (sort_ranking f a) = a. sort_ranking yields the inverse permutation of sort_indices.

In the absence of duplicate elements in a, we also have lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i).

  • since 1.0
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool

mem ~eq x a return true if x is present in a. Linear time.

  • since 3.0
val find_map : f:('a -> 'b option) -> 'a t -> 'b option

find_map ~f a returns Some y if there is an element x such that f x = Some y. Otherwise returns None.

  • since 1.3, but only
  • since 2.1 with labels
val find_map_i : f:(int -> 'a -> 'b option) -> 'a t -> 'b option

find_map_i ~f a is like find_map, but the index of the element is also passed to the predicate function f.

  • since 1.3, but only
  • since 2.1 with labels
val find_idx : f:('a -> bool) -> 'a t -> (int * 'a) option

find_idx ~f a returns Some (i,x) where x is the i-th element of a, and f x holds. Otherwise returns None.

  • since 0.3.4
val max : cmp:('a -> 'a -> int) -> 'a t -> 'a option

max ~cmp a returns None if a is empty, otherwise, returns Some e where e is a maximum element in a with respect to cmp.

  • since 3.12
val max_exn : cmp:('a -> 'a -> int) -> 'a t -> 'a

max_exn ~cmp a is like max, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val argmax : cmp:('a -> 'a -> int) -> 'a t -> int option

argmax ~cmp a returns None if a is empty, otherwise, returns Some i where i is the index of a maximum element in a with respect to cmp.

  • since 3.12
val argmax_exn : cmp:('a -> 'a -> int) -> 'a t -> int

argmax_exn ~cmp a is like argmax, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val min : cmp:('a -> 'a -> int) -> 'a t -> 'a option

min ~cmp a returns None if a is empty, otherwise, returns Some e where e is a minimum element in a with respect to cmp.

  • since 3.12
val min_exn : cmp:('a -> 'a -> int) -> 'a t -> 'a

min_exn ~cmp a is like min, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val argmin : cmp:('a -> 'a -> int) -> 'a t -> int option

argmin ~cmp a returns None if a is empty, otherwise, returns Some i where i is the index of a minimum element in a with respect to cmp.

  • since 3.12
val argmin_exn : cmp:('a -> 'a -> int) -> 'a t -> int

argmin_exn ~cmp a is like argmin, but

  • raises Invalid_argument

    if a is empty.

  • since 3.12
val lookup : cmp:'a ord -> key:'a -> 'a t -> int option

lookup ~cmp ~key a lookups the index of some key key in a sorted array a. Undefined behavior if the array a is not sorted wrt cmp. Complexity: O(log (n)) (dichotomic search).

  • returns

    None if the key key is not present, or Some i (i the index of the key) otherwise.

val lookup_exn : cmp:'a ord -> key:'a -> 'a t -> int

lookup_exn ~cmp ~key a is like lookup, but

  • raises Not_found

    if the key key is not present.

val bsearch : + cmp:('a -> 'a -> int) -> + key:'a -> 'a t -> - [ `All_lower | `All_bigger | `Just_after of int | `Empty | `At of int ]

bsearch ~cmp ~key a finds the index of the object key in the array a, provided a is sorted using cmp. If the array is not sorted, the result is not specified (may raise Invalid_argument).

Complexity: O(log n) where n is the length of the array a (dichotomic search).

  • returns
    • `At i if cmp a.(i) key = 0 (for some i).
    • `All_lower if all elements of a are lower than key.
    • `All_bigger if all elements of a are bigger than key.
    • `Just_after i if a.(i) < key < a.(i+1).
    • `Empty if the array a is empty.
  • raises Invalid_argument

    if the array is found to be unsorted w.r.t cmp.

  • since 0.13
val for_all2 : f:('a -> 'b -> bool) -> 'a t -> 'b t -> bool

for_all2 ~f [|a1; โ€ฆ; an|] [|b1; โ€ฆ; bn|] is true if each pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) && (f a2 b2) && โ€ฆ && (f an bn).

  • raises Invalid_argument

    if arrays have distinct lengths. Allow different types.

  • since 0.20
val exists2 : f:('a -> 'b -> bool) -> 'a t -> 'b t -> bool

exists2 ~f [|a1; โ€ฆ; an|] [|b1; โ€ฆ; bn|] is true if any pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) || (f a2 b2) || โ€ฆ || (f an bn).

  • raises Invalid_argument

    if arrays have distinct lengths. Allow different types.

  • since 0.20
val fold2 : f:('acc -> 'a -> 'b -> 'acc) -> init:'acc -> 'a t -> 'b t -> 'acc

fold2 ~f ~init a b fold on two arrays a and b stepwise. It computes f (โ€ฆ (f init a1 b1) โ€ฆ) an bn.

  • raises Invalid_argument

    if a and b have distinct lengths.

  • since 0.20
val iter2 : f:('a -> 'b -> unit) -> 'a t -> 'b t -> unit

iter2 ~f a b iterates on the two arrays a and b stepwise. It is equivalent to f a0 b0; โ€ฆ; f a.(length a - 1) b.(length b - 1); ().

  • raises Invalid_argument

    if a and b have distinct lengths.

  • since 0.20
val shuffle : 'a t -> unit

shuffle a randomly shuffles the array a, in place.

val shuffle_with : Stdlib.Random.State.t -> 'a t -> unit

shuffle_with rs a randomly shuffles the array a (like shuffle) but a specialized random state rs is used to control the random numbers being produced during shuffling (for reproducibility).

val random_choose : 'a t -> 'a random_gen

random_choose a rs randomly chooses an element of a.

  • raises Not_found

    if the array/slice is empty.

val to_string : ?sep:string -> ('a -> string) -> 'a array -> string

to_string ~sep item_to_string a print a to a string using sep as a separator between elements of a.

  • since 2.7
val to_iter : 'a t -> 'a iter

to_iter a returns an iter of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the iterator.

  • since 2.8
val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq a returns a Seq.t of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the sequence. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen a returns a gen of the elements of an array a.

IO

val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + [ `All_lower | `All_bigger | `Just_after of int | `Empty | `At of int ]

bsearch ~cmp ~key a finds the index of the object key in the array a, provided a is sorted using cmp. If the array is not sorted, the result is not specified (may raise Invalid_argument).

Complexity: O(log n) where n is the length of the array a (dichotomic search).

  • returns
    • `At i if cmp a.(i) key = 0 (for some i).
    • `All_lower if all elements of a are lower than key.
    • `All_bigger if all elements of a are bigger than key.
    • `Just_after i if a.(i) < key < a.(i+1).
    • `Empty if the array a is empty.
  • raises Invalid_argument

    if the array is found to be unsorted w.r.t cmp.

  • since 0.13
val for_all2 : f:('a -> 'b -> bool) -> 'a t -> 'b t -> bool

for_all2 ~f [|a1; โ€ฆ; an|] [|b1; โ€ฆ; bn|] is true if each pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) && (f a2 b2) && โ€ฆ && (f an bn).

  • raises Invalid_argument

    if arrays have distinct lengths. Allow different types.

  • since 0.20
val exists2 : f:('a -> 'b -> bool) -> 'a t -> 'b t -> bool

exists2 ~f [|a1; โ€ฆ; an|] [|b1; โ€ฆ; bn|] is true if any pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) || (f a2 b2) || โ€ฆ || (f an bn).

  • raises Invalid_argument

    if arrays have distinct lengths. Allow different types.

  • since 0.20
val fold2 : f:('acc -> 'a -> 'b -> 'acc) -> init:'acc -> 'a t -> 'b t -> 'acc

fold2 ~f ~init a b fold on two arrays a and b stepwise. It computes f (โ€ฆ (f init a1 b1) โ€ฆ) an bn.

  • raises Invalid_argument

    if a and b have distinct lengths.

  • since 0.20
val iter2 : f:('a -> 'b -> unit) -> 'a t -> 'b t -> unit

iter2 ~f a b iterates on the two arrays a and b stepwise. It is equivalent to f a0 b0; โ€ฆ; f a.(length a - 1) b.(length b - 1); ().

  • raises Invalid_argument

    if a and b have distinct lengths.

  • since 0.20
val shuffle : 'a t -> unit

shuffle a randomly shuffles the array a, in place.

val shuffle_with : Stdlib.Random.State.t -> 'a t -> unit

shuffle_with rs a randomly shuffles the array a (like shuffle) but a specialized random state rs is used to control the random numbers being produced during shuffling (for reproducibility).

val random_choose : 'a t -> 'a random_gen

random_choose a rs randomly chooses an element of a.

  • raises Not_found

    if the array/slice is empty.

val to_string : ?sep:string -> ('a -> string) -> 'a array -> string

to_string ~sep item_to_string a print a to a string using sep as a separator between elements of a.

  • since 2.7
val to_iter : 'a t -> 'a iter

to_iter a returns an iter of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the iterator.

  • since 2.8
val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq a returns a Seq.t of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the sequence. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen a returns a gen of the elements of an array a.

IO

val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> 'a printer -> 'a t printer

pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

val pp_i : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> (int -> 'a printer) -> - 'a t printer

pp_i ~pp_start ~pp_stop ~pp_sep pp_item ppf a prints the array a on ppf. The printing function pp_item is giving both index and element. pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

val map2 : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 ~f a b applies function f to all 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 a and b have distinct lengths.

  • since 0.20
val rev : 'a t -> 'a t

rev a copies the array a and reverses it in place.

  • since 0.20
val filter : f:('a -> bool) -> 'a t -> 'a t

filter ~f a filters elements out of the array a. Only the elements satisfying the given predicate f will be kept.

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

filter_map ~f [|a1; โ€ฆ; an|] calls (f a1) โ€ฆ (f an) and returns an array b consisting of all elements bi such as f ai = Some bi. When f returns None, the corresponding element of a is discarded.

val monoid_product : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

monoid_product ~f a b passes all combinaisons of tuples from the two arrays a and b to the function f.

  • since 2.8
val flat_map : f:('a -> 'b t) -> 'a t -> 'b array

flat_map ~f a transforms each element of a into an array, then flattens.

val except_idx : 'a t -> int -> 'a list

except_idx a i removes the element of a at given index i, and returns the list of the other elements.

val random : 'a random_gen -> 'a t random_gen
val random_non_empty : 'a random_gen -> 'a t random_gen
val random_len : int -> 'a random_gen -> 'a t random_gen

Generic Functions

module type MONO_ARRAY = sig ... end
val sort_generic : + 'a t printer

pp_i ~pp_start ~pp_stop ~pp_sep pp_item ppf a prints the array a on ppf. The printing function pp_item is giving both index and element. pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

val map2 : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 ~f a b applies function f to all 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 a and b have distinct lengths.

  • since 0.20
val rev : 'a t -> 'a t

rev a copies the array a and reverses it in place.

  • since 0.20
val filter : f:('a -> bool) -> 'a t -> 'a t

filter ~f a filters elements out of the array a. Only the elements satisfying the given predicate f will be kept.

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

filter_map ~f [|a1; โ€ฆ; an|] calls (f a1) โ€ฆ (f an) and returns an array b consisting of all elements bi such as f ai = Some bi. When f returns None, the corresponding element of a is discarded.

val monoid_product : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

monoid_product ~f a b passes all combinaisons of tuples from the two arrays a and b to the function f.

  • since 2.8
val flat_map : f:('a -> 'b t) -> 'a t -> 'b array

flat_map ~f a transforms each element of a into an array, then flattens.

val except_idx : 'a t -> int -> 'a list

except_idx a i removes the element of a at given index i, and returns the list of the other elements.

val random : 'a random_gen -> 'a t random_gen
val random_non_empty : 'a random_gen -> 'a t random_gen
val random_len : int -> 'a random_gen -> 'a t random_gen

Generic Functions

module type MONO_ARRAY = sig ... end
val sort_generic : (module MONO_ARRAY with type elt = 'elt and type t = 'arr) -> - cmp:('elt -> 'elt -> int) -> + cmp:('elt -> 'elt -> int) -> 'arr -> - unit

sort_generic (module M) ~cmp a sorts the array a, without allocating (eats stack space though). Performance might be lower than Array.sort.

  • since 0.14

Infix Operators

It is convenient to open CCArray.Infix to access the infix operators without cluttering the scope too much.

  • since 2.7
module Infix : sig ... end
include module type of Infix
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

a >>= f is the infix version of flat_map.

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

a >>| f is the infix version of map.

  • since 0.8
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

a >|= f is the infix version of map.

  • since 0.8
val (--) : int -> int -> int t

x -- y creates an array containing integers in the range x .. y. Bounds included.

val (--^) : int -> int -> int t

x --^ y creates an array containing integers in the range x .. y. Right bound excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file + unit

sort_generic (module M) ~cmp a sorts the array a, without allocating (eats stack space though). Performance might be lower than Array.sort.

  • since 0.14

Infix Operators

It is convenient to open CCArray.Infix to access the infix operators without cluttering the scope too much.

module Infix : sig ... end
include module type of Infix
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

a >>= f is the infix version of flat_map.

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

a >>| f is the infix version of map.

  • since 0.8
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

a >|= f is the infix version of map.

  • since 0.8
val (--) : int -> int -> int t

x -- y creates an array containing integers in the range x .. y. Bounds included.

val (--^) : int -> int -> int t

x --^ y creates an array containing integers in the range x .. y. Right bound excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html b/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html index 16537294..19004fcc 100644 --- a/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html +++ b/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html @@ -1,2 +1,2 @@ -MONO_ARRAY (containers.CCArrayLabels.MONO_ARRAY)

Module type CCArrayLabels.MONO_ARRAY

type elt
type t
val length : t -> int
val get : t -> int -> elt
val set : t -> int -> elt -> unit
\ No newline at end of file +MONO_ARRAY (containers.CCArrayLabels.MONO_ARRAY)

Module type CCArrayLabels.MONO_ARRAY

type elt
type t
val length : t -> int
val get : t -> int -> elt
val set : t -> int -> elt -> unit
diff --git a/dev/containers/CCAtomic/index.html b/dev/containers/CCAtomic/index.html index 75ee6c9c..b787c91c 100644 --- a/dev/containers/CCAtomic/index.html +++ b/dev/containers/CCAtomic/index.html @@ -1,2 +1,2 @@ -CCAtomic (containers.CCAtomic)

Module CCAtomic

include module type of struct include Stdlib.Atomic end
type !'a t = 'a Stdlib.Atomic.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.

\ No newline at end of file +CCAtomic (containers.CCAtomic)

Module CCAtomic

include module type of struct include Stdlib.Atomic end
type !'a t = 'a Stdlib.Atomic.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.

diff --git a/dev/containers/CCBool/index.html b/dev/containers/CCBool/index.html index f57bd158..9423c155 100644 --- a/dev/containers/CCBool/index.html +++ b/dev/containers/CCBool/index.html @@ -1,2 +1,2 @@ -CCBool (containers.CCBool)

Module CCBool

Basic Bool functions

type t = bool
val compare : t -> t -> int

compare b1 b2 is the total ordering on booleans b1 and b2, similar to Stdlib.compare.

val equal : t -> t -> bool

equal b1 b2 is true if b1 and b2 are the same.

val to_int : t -> int

to_int true = 1, to_int false = 0.

  • since 2.7
val of_int : int -> t

of_int i is the same as i <> 0

  • since 2.7
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : t printer
\ No newline at end of file +CCBool (containers.CCBool)

Module CCBool

Basic Bool functions

type t = bool
val compare : t -> t -> int

compare b1 b2 is the total ordering on booleans b1 and b2, similar to Stdlib.compare.

val equal : t -> t -> bool

equal b1 b2 is true if b1 and b2 are the same.

val to_int : t -> int

to_int true = 1, to_int false = 0.

  • since 2.7
val of_int : int -> t

of_int i is the same as i <> 0

  • since 2.7
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : t printer
diff --git a/dev/containers/CCByte_buffer/index.html b/dev/containers/CCByte_buffer/index.html index 00ac9a0f..73cbf3f8 100644 --- a/dev/containers/CCByte_buffer/index.html +++ b/dev/containers/CCByte_buffer/index.html @@ -1,2 +1,2 @@ -CCByte_buffer (containers.CCByte_buffer)

Module CCByte_buffer

Byte buffer.

A dynamic vector of bytes.

type t
type 'a iter = ('a -> unit) -> unit
val create : ?cap:int -> unit -> t

Create a new buffer with given initial capacity.

val length : t -> int

Current length.

val is_empty : t -> bool

is_empty b is length b=0

val capacity : t -> int

Current capacity (size of the array returned by bytes)

val bytes : t -> bytes

Access the underlying byte buffer. This buffer can change after operations that affect the capacity (e.g. add_char).

val clear : t -> unit
val ensure_cap : t -> int -> unit

ensure_cap self n ensures that capacity self >= n.

val shrink_to : t -> int -> unit

shrink_to buf n reduces length buf to at most n. Does nothing if the length is already <= n.

val add_char : t -> char -> unit

Push a character at the end.

val append_bytes : t -> bytes -> unit
val append_subbytes : t -> bytes -> int -> int -> unit
val append_string : t -> string -> unit
val append_substring : t -> string -> int -> int -> unit
val append_buf : t -> Stdlib.Buffer.t -> unit
val append_iter : t -> char iter -> unit
val append_seq : t -> char Stdlib.Seq.t -> unit
val get : t -> int -> char
val unsafe_get : t -> int -> char
val set : t -> int -> char -> unit
val unsafe_set : t -> int -> char -> unit
val contents : t -> string

Copy the internal data to a string

val contents_bytes : t -> bytes

Copy the internal data to a byte buffer

val iter : (char -> unit) -> t -> unit
val fold_left : ('a -> char -> 'a) -> 'a -> t -> 'a
val of_iter : char iter -> t
val of_seq : char Stdlib.Seq.t -> t
val to_iter : t -> char iter
val to_seq : t -> char Stdlib.Seq.t
\ No newline at end of file +CCByte_buffer (containers.CCByte_buffer)

Module CCByte_buffer

Byte buffer.

A dynamic vector of bytes.

type t
type 'a iter = ('a -> unit) -> unit
val create : ?cap:int -> unit -> t

Create a new buffer with given initial capacity.

val length : t -> int

Current length.

val is_empty : t -> bool

is_empty b is length b=0

val capacity : t -> int

Current capacity (size of the array returned by bytes)

val bytes : t -> bytes

Access the underlying byte buffer. This buffer can change after operations that affect the capacity (e.g. add_char).

val clear : t -> unit
val ensure_cap : t -> int -> unit

ensure_cap self n ensures that capacity self >= n.

val shrink_to : t -> int -> unit

shrink_to buf n reduces length buf to at most n. Does nothing if the length is already <= n.

val add_char : t -> char -> unit

Push a character at the end.

val append_bytes : t -> bytes -> unit
val append_subbytes : t -> bytes -> int -> int -> unit
val append_string : t -> string -> unit
val append_substring : t -> string -> int -> int -> unit
val append_buf : t -> Stdlib.Buffer.t -> unit
val append_iter : t -> char iter -> unit
val append_seq : t -> char Stdlib.Seq.t -> unit
val get : t -> int -> char
val unsafe_get : t -> int -> char
val set : t -> int -> char -> unit
val unsafe_set : t -> int -> char -> unit
val contents : t -> string

Copy the internal data to a string

val contents_bytes : t -> bytes

Copy the internal data to a byte buffer

val iter : (char -> unit) -> t -> unit
val fold_left : ('a -> char -> 'a) -> 'a -> t -> 'a
val of_iter : char iter -> t
val of_seq : char Stdlib.Seq.t -> t
val to_iter : t -> char iter
val to_seq : t -> char Stdlib.Seq.t
diff --git a/dev/containers/CCCanonical_sexp/Make/argument-1-Sexp/index.html b/dev/containers/CCCanonical_sexp/Make/argument-1-Sexp/index.html index ae63fbef..4fac891e 100644 --- a/dev/containers/CCCanonical_sexp/Make/argument-1-Sexp/index.html +++ b/dev/containers/CCCanonical_sexp/Make/argument-1-Sexp/index.html @@ -1,2 +1,2 @@ -Sexp (containers.CCCanonical_sexp.Make.Sexp)

Parameter Make.Sexp

type t
val atom : string -> t
val list : t list -> t
val match_ : t -> atom:(string -> 'a) -> list:(t list -> 'a) -> 'a
\ No newline at end of file +Sexp (containers.CCCanonical_sexp.Make.Sexp)

Parameter Make.Sexp

type t
val atom : string -> t
val list : t list -> t
val match_ : t -> atom:(string -> 'a) -> list:(t list -> 'a) -> 'a
diff --git a/dev/containers/CCCanonical_sexp/Make/index.html b/dev/containers/CCCanonical_sexp/Make/index.html index e16fa19b..717c6b64 100644 --- a/dev/containers/CCCanonical_sexp/Make/index.html +++ b/dev/containers/CCCanonical_sexp/Make/index.html @@ -1,2 +1,2 @@ -Make (containers.CCCanonical_sexp.Make)

Module CCCanonical_sexp.Make

Parser and printer

Parameters

module Sexp : SEXP

Signature

type t = Sexp.t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

  • since 2.8
val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

\ No newline at end of file +Make (containers.CCCanonical_sexp.Make)

Module CCCanonical_sexp.Make

Parser and printer

Parameters

module Sexp : SEXP

Signature

type t = Sexp.t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

  • since 2.8
val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

diff --git a/dev/containers/CCCanonical_sexp/index.html b/dev/containers/CCCanonical_sexp/index.html index 8e8b0ebb..1af601a7 100644 --- a/dev/containers/CCCanonical_sexp/index.html +++ b/dev/containers/CCCanonical_sexp/index.html @@ -1,2 +1,2 @@ -CCCanonical_sexp (containers.CCCanonical_sexp)

Module CCCanonical_sexp

Canonical S-expressions

See wikipedia. These S-expressions are binary safe.

type 'a or_error = ('a, string) result
type 'a gen = unit -> 'a option
module type SEXP = CCSexp_intf.BASIC_SEXP
module type S = CCSexp_intf.S0
module Make (Sexp : SEXP) : S with type t = Sexp.t

Basics

type t = [
  1. | `Atom of string
  2. | `List of t list
]

A simple, structural representation of S-expressions. Compatible with CCSexp.

include S with type t := t
type sexp = t

Re-exports

val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

val equal : t -> t -> bool
val compare : t -> t -> int
val atom : string -> t
\ No newline at end of file +CCCanonical_sexp (containers.CCCanonical_sexp)

Module CCCanonical_sexp

Canonical S-expressions

See wikipedia. These S-expressions are binary safe.

type 'a or_error = ('a, string) result
type 'a gen = unit -> 'a option
module type SEXP = CCSexp_intf.BASIC_SEXP
module type S = CCSexp_intf.S0
module Make (Sexp : SEXP) : S with type t = Sexp.t

Basics

type t = [
  1. | `Atom of string
  2. | `List of t list
]

A simple, structural representation of S-expressions. Compatible with CCSexp.

include S with type t := t
type sexp = t

Re-exports

val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

val equal : t -> t -> bool
val compare : t -> t -> int
val atom : string -> t
diff --git a/dev/containers/CCChar/Infix/index.html b/dev/containers/CCChar/Infix/index.html index 3a4e0b32..7fb07de4 100644 --- a/dev/containers/CCChar/Infix/index.html +++ b/dev/containers/CCChar/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCChar.Infix)

Module CCChar.Infix

val (=) : t -> t -> bool
  • since 3.3
val (<>) : t -> t -> bool
  • since 3.3
val (<) : t -> t -> bool
  • since 3.3
val (>) : t -> t -> bool
  • since 3.3
val (<=) : t -> t -> bool
  • since 3.3
val (>=) : t -> t -> bool
  • since 3.3
\ No newline at end of file +Infix (containers.CCChar.Infix)

Module CCChar.Infix

val (=) : t -> t -> bool
  • since 3.3
val (<>) : t -> t -> bool
  • since 3.3
val (<) : t -> t -> bool
  • since 3.3
val (>) : t -> t -> bool
  • since 3.3
val (<=) : t -> t -> bool
  • since 3.3
val (>=) : t -> t -> bool
  • since 3.3
diff --git a/dev/containers/CCChar/index.html b/dev/containers/CCChar/index.html index 487982d3..4d692273 100644 --- a/dev/containers/CCChar/index.html +++ b/dev/containers/CCChar/index.html @@ -1,2 +1,2 @@ -CCChar (containers.CCChar)

Module CCChar

Utils around char

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 : char -> char

Convert the given character to its equivalent lowercase character, using the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val uppercase : char -> char

Convert the given character to its equivalent uppercase character, using the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val lowercase_ascii : char -> char

Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

  • since 4.03.0
val uppercase_ascii : char -> char

Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

  • since 4.03.0
type t = char

An alias for the type of characters.

val equal : t -> t -> bool

The equal function for chars.

  • since 4.03.0
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 of_int_exn : int -> t

Alias to Char.chr. Return the character with the given ASCII code.

  • raises Invalid_argument

    if the int is not within 0 โ€ฆ 255.

  • since 1.0
val of_int : int -> t option

Safe version of of_int_exn.

  • since 1.0
val to_int : t -> int

Alias to Char.code. Return the ASCII code of the argument.

  • since 1.0
val to_string : t -> string

to_string c returns a string containing c

  • since 2.7
val pp_buf : Stdlib.Buffer.t -> t -> unit

Renamed from pp since 2.0.

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

Renamed from print since 2.0.

Infix Operators

module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 3.3
val (<>) : t -> t -> bool
  • since 3.3
val (<) : t -> t -> bool
  • since 3.3
val (>) : t -> t -> bool
  • since 3.3
val (<=) : t -> t -> bool
  • since 3.3
val (>=) : t -> t -> bool
  • since 3.3
\ No newline at end of file +CCChar (containers.CCChar)

Module CCChar

Utils around char

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 : char -> char

Convert the given character to its equivalent lowercase character, using the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val uppercase : char -> char

Convert the given character to its equivalent uppercase character, using the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val lowercase_ascii : char -> char

Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

  • since 4.03.0
val uppercase_ascii : char -> char

Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

  • since 4.03.0
type t = char

An alias for the type of characters.

val equal : t -> t -> bool

The equal function for chars.

  • since 4.03.0
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 of_int_exn : int -> t

Alias to Char.chr. Return the character with the given ASCII code.

  • raises Invalid_argument

    if the int is not within 0 โ€ฆ 255.

  • since 1.0
val of_int : int -> t option

Safe version of of_int_exn.

  • since 1.0
val to_int : t -> int

Alias to Char.code. Return the ASCII code of the argument.

  • since 1.0
val to_string : t -> string

to_string c returns a string containing c

  • since 2.7
val pp_buf : Stdlib.Buffer.t -> t -> unit

Renamed from pp since 2.0.

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

Renamed from print since 2.0.

Infix Operators

module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 3.3
val (<>) : t -> t -> bool
  • since 3.3
val (<) : t -> t -> bool
  • since 3.3
val (>) : t -> t -> bool
  • since 3.3
val (<=) : t -> t -> bool
  • since 3.3
val (>=) : t -> t -> bool
  • since 3.3
diff --git a/dev/containers/CCEither/index.html b/dev/containers/CCEither/index.html index ba23f684..d59f52ac 100644 --- a/dev/containers/CCEither/index.html +++ b/dev/containers/CCEither/index.html @@ -1,16 +1,16 @@ -CCEither (containers.CCEither)

Module CCEither

Either Monad

Module that is compatible with Either form OCaml 4.12 but can be use with any ocaml version compatible with container

type 'a iter = ('a -> unit) -> unit
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

type ('a, 'b) t = ('a, 'b) Either.t =
  1. | Left of 'a
  2. | Right of 'b
val left : 'a -> ('a, 'b) t

left l is Left l

val right : 'b -> ('a, 'b) t

right r is Right r

val is_left : ('a, 'b) t -> bool

is_left x checks if x = Left _

val is_right : ('a, 'b) t -> bool

is_right x checks if x = Right _

val find_left : ('a, 'b) t -> 'a option

find_left x returns l if x = Left l and None otherwise.

val find_right : ('a, 'b) t -> 'b option

find_right x returns r if x = Left r and None otherwise.

val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t

Map of the Left variant.

val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t

Map of the Right variant.

val map : - left:('a1 -> 'a2) -> - right:('b1 -> 'b2) -> +CCEither (containers.CCEither)

Module CCEither

Either Monad

Module that is compatible with Either form OCaml 4.12 but can be use with any ocaml version compatible with container

  • since 3.2
type 'a iter = ('a -> unit) -> unit
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

type ('a, 'b) t = ('a, 'b) Either.t =
  1. | Left of 'a
  2. | Right of 'b
val left : 'a -> ('a, 'b) t

left l is Left l

val right : 'b -> ('a, 'b) t

right r is Right r

val is_left : ('a, 'b) t -> bool

is_left x checks if x = Left _

val is_right : ('a, 'b) t -> bool

is_right x checks if x = Right _

val find_left : ('a, 'b) t -> 'a option

find_left x returns l if x = Left l and None otherwise.

val find_right : ('a, 'b) t -> 'b option

find_right x returns r if x = Left r and None otherwise.

val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t

Map of the Left variant.

val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t

Map of the Right variant.

val map : + left:('a1 -> 'a2) -> + right:('b1 -> 'b2) -> ('a1, 'b1) t -> - ('a2, 'b2) t

Map using left or right.

val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c

Fold using left or right.

val iter : left:('a -> unit) -> right:('b -> unit) -> ('a, 'b) t -> unit

Iter using left or right.

val for_all : left:('a -> bool) -> right:('b -> bool) -> ('a, 'b) t -> bool

Check some property on Left or Right variant.

val equal : - left:('a -> 'a -> bool) -> - right:('b -> 'b -> bool) -> + ('a2, 'b2) t

Map using left or right.

val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c

Fold using left or right.

val iter : left:('a -> unit) -> right:('b -> unit) -> ('a, 'b) t -> unit

Iter using left or right.

val for_all : left:('a -> bool) -> right:('b -> bool) -> ('a, 'b) t -> bool

Check some property on Left or Right variant.

val equal : + left:('a -> 'a -> bool) -> + right:('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool
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

IO

val pp : left:'a printer -> right:'b printer -> ('a, 'b) t printer

Pretty printer.

\ No newline at end of file + int

IO

val pp : left:'a printer -> right:'b printer -> ('a, 'b) t printer

Pretty printer.

diff --git a/dev/containers/CCEqual/Infix/index.html b/dev/containers/CCEqual/Infix/index.html index 95a34838..f1c444fc 100644 --- a/dev/containers/CCEqual/Infix/index.html +++ b/dev/containers/CCEqual/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCEqual.Infix)

Module CCEqual.Infix

val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

\ No newline at end of file +Infix (containers.CCEqual.Infix)

Module CCEqual.Infix

val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

diff --git a/dev/containers/CCEqual/index.html b/dev/containers/CCEqual/index.html index 0d70624e..689a5bb9 100644 --- a/dev/containers/CCEqual/index.html +++ b/dev/containers/CCEqual/index.html @@ -1,2 +1,2 @@ -CCEqual (containers.CCEqual)

Module CCEqual

Equality Combinators

type 'a t = 'a -> 'a -> bool

Equality function. Must be transitive, symmetric, and reflexive.

val poly : 'a t

Standard polymorphic equality.

val physical : 'a t

Standard physical equality.

  • since 2.0
val int : int t
val string : string t
val bool : bool t
val float : float t
val unit : unit t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val option : 'a t -> 'a option t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val map : ('a -> 'b) -> 'b t -> 'a t

map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.

val always_eq : _ t

Always returns true. All values are equal.

  • since 3.0
val never_eq : _ t

Always returns false. No values are, so this is not even reflexive (i.e. x=x is false). Be careful!

  • since 3.0
module Infix : sig ... end
include module type of Infix
val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

\ No newline at end of file +CCEqual (containers.CCEqual)

Module CCEqual

Equality Combinators

type 'a t = 'a -> 'a -> bool

Equality function. Must be transitive, symmetric, and reflexive.

val poly : 'a t

Standard polymorphic equality.

val physical : 'a t

Standard physical equality.

  • since 2.0
val int : int t
val string : string t
val bool : bool t
val float : float t
val unit : unit t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val option : 'a t -> 'a option t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val map : ('a -> 'b) -> 'b t -> 'a t

map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.

val always_eq : _ t

Always returns true. All values are equal.

  • since 3.0
val never_eq : _ t

Always returns false. No values are, so this is not even reflexive (i.e. x=x is false). Be careful!

  • since 3.0
module Infix : sig ... end
include module type of Infix
val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

diff --git a/dev/containers/CCEqualLabels/Infix/index.html b/dev/containers/CCEqualLabels/Infix/index.html index 343d68c7..c5bde7a9 100644 --- a/dev/containers/CCEqualLabels/Infix/index.html +++ b/dev/containers/CCEqualLabels/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCEqualLabels.Infix)

Module CCEqualLabels.Infix

val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

\ No newline at end of file +Infix (containers.CCEqualLabels.Infix)

Module CCEqualLabels.Infix

val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

diff --git a/dev/containers/CCEqualLabels/index.html b/dev/containers/CCEqualLabels/index.html index 65efe57c..23a271ba 100644 --- a/dev/containers/CCEqualLabels/index.html +++ b/dev/containers/CCEqualLabels/index.html @@ -1,2 +1,2 @@ -CCEqualLabels (containers.CCEqualLabels)

Module CCEqualLabels

Equality Combinators (Labeled version of CCEqual)

type 'a t = 'a -> 'a -> bool

Equality function. Must be transitive, symmetric, and reflexive.

val poly : 'a t

Standard polymorphic equality.

val physical : 'a t

Standard physical equality.

  • since 2.0
val int : int t
val string : string t
val bool : bool t
val float : float t
val unit : unit t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val option : 'a t -> 'a option t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val map : f:('a -> 'b) -> 'b t -> 'a t

map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.

val always_eq : _ t

Always returns true. All values are equal.

  • since 3.9
val never_eq : _ t

Always returns false. No values are, so this is not even reflexive (i.e. x=x is false). Be careful!

  • since 3.9
module Infix : sig ... end
include module type of Infix
val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

\ No newline at end of file +CCEqualLabels (containers.CCEqualLabels)

Module CCEqualLabels

Equality Combinators (Labeled version of CCEqual)

type 'a t = 'a -> 'a -> bool

Equality function. Must be transitive, symmetric, and reflexive.

val poly : 'a t

Standard polymorphic equality.

val physical : 'a t

Standard physical equality.

  • since 2.0
val int : int t
val string : string t
val bool : bool t
val float : float t
val unit : unit t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val option : 'a t -> 'a option t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val map : f:('a -> 'b) -> 'b t -> 'a t

map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.

val always_eq : _ t

Always returns true. All values are equal.

  • since 3.9
val never_eq : _ t

Always returns false. No values are, so this is not even reflexive (i.e. x=x is false). Be careful!

  • since 3.9
module Infix : sig ... end
include module type of Infix
val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

diff --git a/dev/containers/CCFloat/Infix/index.html b/dev/containers/CCFloat/Infix/index.html index 2513ff3b..c48b30da 100644 --- a/dev/containers/CCFloat/Infix/index.html +++ b/dev/containers/CCFloat/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCFloat.Infix)

Module CCFloat.Infix

val (=) : t -> t -> bool
  • since 0.17
val (<>) : t -> t -> bool
  • since 0.17
val (<) : t -> t -> bool
  • since 0.17
val (>) : t -> t -> bool
  • since 0.17
val (<=) : t -> t -> bool
  • since 0.17
val (>=) : t -> t -> bool
  • since 0.17
val (+) : t -> t -> t

Addition.

  • since 2.1
val (-) : t -> t -> t

Subtraction.

  • since 2.1
val (~-) : t -> t

Unary negation.

  • since 2.1
val (*) : t -> t -> t

Multiplication.

  • since 2.1
val (/) : t -> t -> t

Division.

  • since 2.1
\ No newline at end of file +Infix (containers.CCFloat.Infix)

Module CCFloat.Infix

val (=) : t -> t -> bool
  • since 0.17
val (<>) : t -> t -> bool
  • since 0.17
val (<) : t -> t -> bool
  • since 0.17
val (>) : t -> t -> bool
  • since 0.17
val (<=) : t -> t -> bool
  • since 0.17
val (>=) : t -> t -> bool
  • since 0.17
val (+) : t -> t -> t

Addition.

  • since 2.1
val (-) : t -> t -> t

Subtraction.

  • since 2.1
val (~-) : t -> t

Unary negation.

  • since 2.1
val (*) : t -> t -> t

Multiplication.

  • since 2.1
val (/) : t -> t -> t

Division.

  • since 2.1
diff --git a/dev/containers/CCFloat/index.html b/dev/containers/CCFloat/index.html index 1312329e..aede364b 100644 --- a/dev/containers/CCFloat/index.html +++ b/dev/containers/CCFloat/index.html @@ -1,2 +1,2 @@ -CCFloat (containers.CCFloat)

Module CCFloat

Basic operations on floating-point numbers

type t = float
type fpclass = fpclass =
  1. | FP_normal
  2. | FP_subnormal
  3. | FP_zero
  4. | FP_infinite
  5. | FP_nan
val nan : t

nan is Not a Number (NaN). Equal to Stdlib.nan.

val max_value : t

max_value is Positive infinity. Equal to Stdlib.infinity.

val min_value : t

min_value is Negative infinity. Equal to Stdlib.neg_infinity.

val max_finite_value : t

max_finite_value is the largest finite float value. Equal to Stdlib.max_float.

val epsilon : t

epsilon is the smallest positive float x such that 1.0 +. x <> 1.0. Equal to Stdlib.epsilon_float.

val pi : t

pi is the constant pi. The ratio of a circumference to its diameter.

  • since 3.0
val is_nan : t -> bool

is_nan f returns true if f is NaN, false otherwise.

val add : t -> t -> t

add x y is equal to x +. y.

val sub : t -> t -> t

sub x y is equal to x -. y.

val neg : t -> t

neg x is equal to ~-. x.

val abs : t -> t

abs x is the absolute value of the floating-point number x. Equal to Stdlib.abs_float.

val scale : t -> t -> t

scale x y is equal to x *. y.

val min : t -> t -> t

min x y returns the min of the two given values x and y.

val max : t -> t -> t

max x y returns the max of the two given values x and y.

val equal : t -> t -> bool

equal x y is true if x and y are the same.

val compare : t -> t -> int

compare x y is Stdlib.comparexy.

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val pp : t printer
val hash : t -> int
val random : t -> t random_gen
val random_small : t random_gen
val random_range : t -> t -> t random_gen
val fsign : t -> t

fsign x is one of -1., -0., +0., +1., or nan if x is NaN.

  • since 0.7
val round : t -> t

round x returns the closest integer value, either above or below. For n + 0.5, round returns n.

  • since 0.20
exception TrapNaN of string
val sign_exn : t -> int

sign_exn x will return the sign of x as 1, 0 or -1, or raise an exception TrapNaN if x is NaN. Note that infinities have defined signs in OCaml.

  • since 0.7
val to_int : t -> int

Alias to int_of_float. Unspecified if outside of the range of integers.

val of_int : int -> t

Alias to float_of_int.

val to_string : t -> string
val of_string_exn : string -> t

Alias to float_of_string.

  • raises Failure

    in case of failure.

  • since 1.2
val of_string_opt : string -> t option
  • since 3.0
val equal_precision : epsilon:t -> t -> t -> bool

Equality with allowed error up to a non negative epsilon value.

val classify : t -> fpclass

classify x returns the class of the given floating-point number x: normal, subnormal, zero, infinite or nan (not a number).

Infix Operators

module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 0.17
val (<>) : t -> t -> bool
  • since 0.17
val (<) : t -> t -> bool
  • since 0.17
val (>) : t -> t -> bool
  • since 0.17
val (<=) : t -> t -> bool
  • since 0.17
val (>=) : t -> t -> bool
  • since 0.17
val (+) : t -> t -> t

Addition.

  • since 2.1
val (-) : t -> t -> t

Subtraction.

  • since 2.1
val (~-) : t -> t

Unary negation.

  • since 2.1
val (*) : t -> t -> t

Multiplication.

  • since 2.1
val (/) : t -> t -> t

Division.

  • since 2.1
\ No newline at end of file +CCFloat (containers.CCFloat)

Module CCFloat

Basic operations on floating-point numbers

type t = float
type fpclass = fpclass =
  1. | FP_normal
  2. | FP_subnormal
  3. | FP_zero
  4. | FP_infinite
  5. | FP_nan
val nan : t

nan is Not a Number (NaN). Equal to Stdlib.nan.

val max_value : t

max_value is Positive infinity. Equal to Stdlib.infinity.

val min_value : t

min_value is Negative infinity. Equal to Stdlib.neg_infinity.

val max_finite_value : t

max_finite_value is the largest finite float value. Equal to Stdlib.max_float.

val epsilon : t

epsilon is the smallest positive float x such that 1.0 +. x <> 1.0. Equal to Stdlib.epsilon_float.

val pi : t

pi is the constant pi. The ratio of a circumference to its diameter.

  • since 3.0
val is_nan : t -> bool

is_nan f returns true if f is NaN, false otherwise.

val add : t -> t -> t

add x y is equal to x +. y.

val sub : t -> t -> t

sub x y is equal to x -. y.

val neg : t -> t

neg x is equal to ~-. x.

val abs : t -> t

abs x is the absolute value of the floating-point number x. Equal to Stdlib.abs_float.

val scale : t -> t -> t

scale x y is equal to x *. y.

val min : t -> t -> t

min x y returns the min of the two given values x and y.

val max : t -> t -> t

max x y returns the max of the two given values x and y.

val equal : t -> t -> bool

equal x y is true if x and y are the same.

val compare : t -> t -> int

compare x y is Stdlib.comparexy.

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val pp : t printer
val hash : t -> int
val random : t -> t random_gen
val random_small : t random_gen
val random_range : t -> t -> t random_gen
val fsign : t -> t

fsign x is one of -1., -0., +0., +1., or nan if x is NaN.

  • since 0.7
val round : t -> t

round x returns the closest integer value, either above or below. For n + 0.5, round returns n.

  • since 0.20
exception TrapNaN of string
val sign_exn : t -> int

sign_exn x will return the sign of x as 1, 0 or -1, or raise an exception TrapNaN if x is NaN. Note that infinities have defined signs in OCaml.

  • since 0.7
val to_int : t -> int

Alias to int_of_float. Unspecified if outside of the range of integers.

val of_int : int -> t

Alias to float_of_int.

val to_string : t -> string
val of_string_exn : string -> t

Alias to float_of_string.

  • raises Failure

    in case of failure.

  • since 1.2
val of_string_opt : string -> t option
  • since 3.0
val equal_precision : epsilon:t -> t -> t -> bool

Equality with allowed error up to a non negative epsilon value.

val classify : t -> fpclass

classify x returns the class of the given floating-point number x: normal, subnormal, zero, infinite or nan (not a number).

Infix Operators

module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 0.17
val (<>) : t -> t -> bool
  • since 0.17
val (<) : t -> t -> bool
  • since 0.17
val (>) : t -> t -> bool
  • since 0.17
val (<=) : t -> t -> bool
  • since 0.17
val (>=) : t -> t -> bool
  • since 0.17
val (+) : t -> t -> t

Addition.

  • since 2.1
val (-) : t -> t -> t

Subtraction.

  • since 2.1
val (~-) : t -> t

Unary negation.

  • since 2.1
val (*) : t -> t -> t

Multiplication.

  • since 2.1
val (/) : t -> t -> t

Division.

  • since 2.1
diff --git a/dev/containers/CCFormat/ANSI_codes/index.html b/dev/containers/CCFormat/ANSI_codes/index.html index a59f3155..8f3e1a09 100644 --- a/dev/containers/CCFormat/ANSI_codes/index.html +++ b/dev/containers/CCFormat/ANSI_codes/index.html @@ -1,3 +1,3 @@ -ANSI_codes (containers.CCFormat.ANSI_codes)

Module CCFormat.ANSI_codes

ANSI escape codes. This contains lower level functions for them.

type color = [
  1. | `Black
  2. | `Red
  3. | `Yellow
  4. | `Green
  5. | `Blue
  6. | `Magenta
  7. | `Cyan
  8. | `White
]

An ANSI color

type style = [
  1. | `FG of color
    (*

    foreground

    *)
  2. | `BG of color
    (*

    background

    *)
  3. | `Bold
  4. | `Reset
]

A style. Styles can be composed in a list.

val clear_line : string

clear_line is an escape code to clear the current line. It is very useful for progress bars; for example:

let pp_progress i =
-  Printf.printf "%sprogress at %d%!" ANSI_codes.clear_line i

if called repeatedly this will print successive progress messages on a single line.

val reset : string

The escape code to reset style (colors, bold, etc.)

val string_of_style : style -> string

string_of_style st is an escape code to set the current style to st. It can be printed as is on any output that is a compatible terminal.

val string_of_style_list : style list -> string

string_of_style_list styles is an escape code for multiple styles at once. For example string_of_style_list ANSI_codes.([`FG `Red; `BG `Green; `Bold]) is a very shiny style.

\ No newline at end of file +ANSI_codes (containers.CCFormat.ANSI_codes)

Module CCFormat.ANSI_codes

ANSI escape codes. This contains lower level functions for them.

type color = [
  1. | `Black
  2. | `Red
  3. | `Yellow
  4. | `Green
  5. | `Blue
  6. | `Magenta
  7. | `Cyan
  8. | `White
]

An ANSI color

type style = [
  1. | `FG of color
    (*

    foreground

    *)
  2. | `BG of color
    (*

    background

    *)
  3. | `Bold
  4. | `Reset
]

A style. Styles can be composed in a list.

val clear_line : string

clear_line is an escape code to clear the current line. It is very useful for progress bars; for example:

let pp_progress i =
+  Printf.printf "%sprogress at %d%!" ANSI_codes.clear_line i

if called repeatedly this will print successive progress messages on a single line.

val reset : string

The escape code to reset style (colors, bold, etc.)

val string_of_style : style -> string

string_of_style st is an escape code to set the current style to st. It can be printed as is on any output that is a compatible terminal.

val string_of_style_list : style list -> string

string_of_style_list styles is an escape code for multiple styles at once. For example string_of_style_list ANSI_codes.([`FG `Red; `BG `Green; `Bold]) is a very shiny style.

diff --git a/dev/containers/CCFormat/Dump/index.html b/dev/containers/CCFormat/Dump/index.html index e596e963..7da68ad3 100644 --- a/dev/containers/CCFormat/Dump/index.html +++ b/dev/containers/CCFormat/Dump/index.html @@ -1,2 +1,2 @@ -Dump (containers.CCFormat.Dump)

Module CCFormat.Dump

type 'a t = 'a printer
val unit : unit t
val int : int t
val string : string t
val bool : bool t
val float : float t
val char : char t
val int32 : int32 t
val int64 : int64 t
val nativeint : nativeint t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val option : 'a t -> 'a option t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val result : 'a t -> ('a, string) result t
val result' : 'a t -> 'e t -> ('a, 'e) result t
val to_string : 'a t -> 'a -> string
\ No newline at end of file +Dump (containers.CCFormat.Dump)

Module CCFormat.Dump

type 'a t = 'a printer
val unit : unit t
val int : int t
val string : string t
val bool : bool t
val float : float t
val char : char t
val int32 : int32 t
val int64 : int64 t
val nativeint : nativeint t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val option : 'a t -> 'a option t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val result : 'a t -> ('a, string) result t
val result' : 'a t -> 'e t -> ('a, 'e) result t
val to_string : 'a t -> 'a -> string
diff --git a/dev/containers/CCFormat/Infix/index.html b/dev/containers/CCFormat/Infix/index.html index d4708fe3..917169d5 100644 --- a/dev/containers/CCFormat/Infix/index.html +++ b/dev/containers/CCFormat/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCFormat.Infix)

Module CCFormat.Infix

val (++) : unit printer -> unit printer -> unit printer

Alias to append.

  • since 3.2
\ No newline at end of file +Infix (containers.CCFormat.Infix)

Module CCFormat.Infix

val (++) : unit printer -> unit printer -> unit printer

Alias to append.

  • since 3.2
diff --git a/dev/containers/CCFormat/index.html b/dev/containers/CCFormat/index.html index aecd1c6f..e2dd6ccd 100644 --- a/dev/containers/CCFormat/index.html +++ b/dev/containers/CCFormat/index.html @@ -1,21 +1,21 @@ -CCFormat (containers.CCFormat)

Module CCFormat

Helpers for Format

type 'a iter = ('a -> unit) -> unit

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 (); +CCFormat (containers.CCFormat)

Module CCFormat

Helpers for Format

  • since 0.8
type 'a iter = ('a -> unit) -> unit

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 = Stdlib.Format.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.0
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 : + leads to output <>PRETTYTEXT.

Formatters

type formatter = Stdlib.Format.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.0
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.0
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 followed by a new line. 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 maxixum indentation limit.

type geometry = Stdlib.Format.geometry = {
  1. max_indent : int;
  2. margin : int;
}
val check_geometry : geometry -> bool

Check if the formatter geometry is valid: 1 < max_indent < margin

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.0
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.0
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.0

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 = Stdlib.Format.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.0
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.0
    *)
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.0
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.0
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 : +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 maxixum indentation limit.

type geometry = Stdlib.Format.geometry = {
  1. max_indent : int;
  2. margin : int;
}
val check_geometry : geometry -> bool

Check if the formatter geometry is valid: 1 < max_indent < margin

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.0
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.0
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.0

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 = Stdlib.Format.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.0
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.0
    *)
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.0
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.0
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) -> @@ -39,7 +39,7 @@ unit
val set_formatter_stag_functions : formatter_stag_functions -> unit

pp_set_formatter_stag_functions ppf tag_funs changes the meaning of opening and closing semantic tag operations to use the functions in tag_funs when printing on ppf.

When opening a semantic tag with name t, the string t is passed to the opening tag-marking function (the mark_open_stag field of the record tag_funs), that must return the opening tag marker for that name. When the next call to close_stag () happens, the semantic tag name t is sent back to the closing tag-marking function (the mark_close_stag field of record tag_funs), that must return a closing tag marker for that name.

The print_ field of the record contains the tag-printing functions that are called at tag opening and tag closing time, to output regular material in the pretty-printer queue.

  • since 4.08.0
val pp_get_formatter_stag_functions : formatter -> unit -> - formatter_stag_functions
val get_formatter_stag_functions : unit -> formatter_stag_functions

Return the current semantic tag operation functions of the standard pretty-printer.

  • since 4.08.0

Defining formatters

Defining new formatters permits unrelated output of material in parallel on several output devices. All the parameters of a formatter are local to the formatter: right margin, maximum indentation limit, maximum number of pretty-printing boxes simultaneously open, ellipsis, and so on, are specific to each formatter and may be fixed independently.

For instance, given a Buffer.t buffer b, formatter_of_buffer b returns a new formatter using buffer b as its output device. Similarly, given a Stdlib.out_channel output channel oc, formatter_of_out_channel oc returns a new formatter using channel oc as its output device.

Alternatively, given out_funs, a complete set of output functions for a formatter, then formatter_of_out_functions out_funs computes a new formatter using those functions for output.

val formatter_of_out_channel : out_channel -> formatter

formatter_of_out_channel oc returns a new formatter writing to the corresponding output channel oc.

val std_formatter : formatter

The standard formatter to write to standard output.

It is defined as formatter_of_out_channel Stdlib.stdout.

val err_formatter : formatter

A formatter to write to standard error.

It is defined as formatter_of_out_channel Stdlib.stderr.

val formatter_of_buffer : Stdlib.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 : Stdlib.Buffer.t

The string buffer in which str_formatter writes.

val str_formatter : formatter

A formatter to output to the stdbuf string buffer.

str_formatter is defined as formatter_of_buffer stdbuf.

val flush_str_formatter : unit -> string

Returns the material printed with str_formatter, flushes the formatter and resets the corresponding buffer.

val make_formatter : + formatter_stag_functions
val get_formatter_stag_functions : unit -> formatter_stag_functions

Return the current semantic tag operation functions of the standard pretty-printer.

  • since 4.08.0

Defining formatters

Defining new formatters permits unrelated output of material in parallel on several output devices. All the parameters of a formatter are local to the formatter: right margin, maximum indentation limit, maximum number of pretty-printing boxes simultaneously open, ellipsis, and so on, are specific to each formatter and may be fixed independently.

For instance, given a Buffer.t buffer b, formatter_of_buffer b returns a new formatter using buffer b as its output device. Similarly, given a Stdlib.out_channel output channel oc, formatter_of_out_channel oc returns a new formatter using channel oc as its output device.

Alternatively, given out_funs, a complete set of output functions for a formatter, then formatter_of_out_functions out_funs computes a new formatter using those functions for output.

val formatter_of_out_channel : out_channel -> formatter

formatter_of_out_channel oc returns a new formatter writing to the corresponding output channel oc.

val std_formatter : formatter

The standard formatter to write to standard output.

It is defined as formatter_of_out_channel Stdlib.stdout.

val err_formatter : formatter

A formatter to write to standard error.

It is defined as formatter_of_out_channel Stdlib.stderr.

val formatter_of_buffer : Stdlib.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 : Stdlib.Buffer.t

The string buffer in which str_formatter writes.

val str_formatter : formatter

A formatter to output to the stdbuf string buffer.

str_formatter is defined as formatter_of_buffer stdbuf.

val flush_str_formatter : unit -> string

Returns the material printed with str_formatter, 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
@@ -53,28 +53,28 @@
   symbolic_output_buffer ->
   symbolic_output_item ->
   unit

add_symbolic_output_item sob itm adds item itm to buffer sob.

  • since 4.06.0
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.0

Convenience formatting functions.

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.0
val pp_print_seq : - ?pp_sep:(formatter -> unit -> unit) -> + ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a Stdlib.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.0
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) Stdlib.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.

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 good 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 (); @@ -92,10 +92,10 @@ Format.printf "@[<v>%t@]" t

Same as kfprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 3.12.0
val kasprintf : (string -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b

Same as asprintf above, but instead of returning the string, passes it to the first argument.

  • since 4.03

Deprecated

val bprintf : Stdlib.Buffer.t -> ('a, formatter, unit) format -> 'a
  • deprecated

    This function is error prone. Do not use it. This function is neither compositional nor incremental, since it flushes the pretty-printer queue at each call.

    If you need to print to some buffer b, you must first define a formatter writing to b, using let to_b = formatter_of_buffer b; then use regular calls to Format.fprintf with formatter to_b.

val kprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b
  • deprecated

    An alias for ksprintf.

val set_all_formatter_output_functions : - out:(string -> int -> int -> unit) -> - flush:(unit -> unit) -> - newline:(unit -> unit) -> - spaces:(int -> unit) -> + out:(string -> int -> int -> unit) -> + flush:(unit -> unit) -> + newline:(unit -> unit) -> + spaces:(int -> unit) -> unit
  • deprecated

    Subsumed by set_formatter_out_functions.

val get_all_formatter_output_functions : unit -> (string -> @@ -109,10 +109,10 @@ Format.printf "@[<v>%t@]" t
  • (int -> unit)
  • deprecated

    Subsumed by get_formatter_out_functions.

val pp_set_all_formatter_output_functions : formatter -> - out:(string -> int -> int -> unit) -> - flush:(unit -> unit) -> - newline:(unit -> unit) -> - spaces:(int -> unit) -> + out:(string -> int -> int -> unit) -> + flush:(unit -> unit) -> + newline:(unit -> unit) -> + spaces:(int -> unit) -> unit
  • deprecated

    Subsumed by pp_set_formatter_out_functions.

val pp_get_all_formatter_output_functions : formatter -> unit -> @@ -131,22 +131,22 @@ Format.printf "@[<v>%t@]" t

This function will erase non-string tag formatting functions.

val set_formatter_tag_functions : formatter_tag_functions -> unit
val pp_get_formatter_tag_functions : formatter -> unit -> - formatter_tag_functions
val get_formatter_tag_functions : unit -> formatter_tag_functions
type -'a printer = t -> 'a -> unit

Combinators

val silent : 'a printer

Prints nothing.

val unit : unit printer

Prints "()".

val int : int printer
val string : string printer
val bool : bool printer
val float3 : float printer
val float : float printer
val exn : exn printer

Printer using Printexc.to_string.

  • since 3.0
val space : unit printer

Alias to pp_print_space.

  • since 3.2
val cut : unit printer

Alias to pp_print_cut.

  • since 3.2
val break : (int * int) printer

Tuple-ized printer form of pp_print_break.

  • since 3.2
val newline : unit printer

Force newline (see Format.pp_force_newline).

  • since 1.2
val substring : (string * int * int) printer

substring (s,i,len) prints the substring (s,i,len), where i is the offset in s and len the number of bytes in the substring.

  • raises Invalid_argument

    if the triple (s,i,len) does not describe a proper substring.

  • since 1.2
val text : string printer

Print string, but replacing spaces with breaks and newlines with newline. See pp_print_text on recent versions of OCaml.

  • since 1.2
val string_lines : string printer

string_lines out s prints s with all newlines ('\n') replaced by a cut, in a vertical box. It does NOT insert breakable spaces in place of spaces, unlike text. This means an already formatted string can be displayed inside another formatter without mangling the indentation.

  • since 3.3
val char : char printer
  • since 0.14
val int32 : int32 printer
  • since 0.14
val int64 : int64 printer
  • since 0.14
val nativeint : nativeint printer
  • since 0.14
val flush : unit printer

Alias to Format.pp_print_flush.

  • since 1.2
val string_quoted : string printer

Similar to CCString.print.

  • since 0.14
val list : ?sep:unit printer -> 'a printer -> 'a list printer
val array : ?sep:unit printer -> 'a printer -> 'a array printer
val arrayi : ?sep:unit printer -> (int * 'a) printer -> 'a array printer
val seq : ?sep:unit printer -> 'a printer -> 'a Stdlib.Seq.t printer
val iter : ?sep:unit printer -> 'a printer -> 'a iter printer
val opt : 'a printer -> 'a option printer

opt pp prints options as follows:

  • Some x will become "some foo" if pp x ---> "foo".
  • None will become "none".

In the tuple printers, the sep argument is only available.

  • since 0.17
val pair : ?sep:unit printer -> 'a printer -> 'b printer -> ('a * 'b) printer
val triple : - ?sep:unit printer -> + formatter_tag_functions
val get_formatter_tag_functions : unit -> formatter_tag_functions
type -'a printer = t -> 'a -> unit

Combinators

val silent : 'a printer

Prints nothing.

val unit : unit printer

Prints "()".

val int : int printer
val string : string printer
val bool : bool printer
val float3 : float printer
val float : float printer
val exn : exn printer

Printer using Printexc.to_string.

  • since 3.0
val space : unit printer

Alias to pp_print_space.

  • since 3.2
val cut : unit printer

Alias to pp_print_cut.

  • since 3.2
val break : (int * int) printer

Tuple-ized printer form of pp_print_break.

  • since 3.2
val newline : unit printer

Force newline (see Format.pp_force_newline).

  • since 1.2
val substring : (string * int * int) printer

substring (s,i,len) prints the substring (s,i,len), where i is the offset in s and len the number of bytes in the substring.

  • raises Invalid_argument

    if the triple (s,i,len) does not describe a proper substring.

  • since 1.2
val text : string printer

Print string, but replacing spaces with breaks and newlines with newline. See pp_print_text on recent versions of OCaml.

  • since 1.2
val string_lines : string printer

string_lines out s prints s with all newlines ('\n') replaced by a cut, in a vertical box. It does NOT insert breakable spaces in place of spaces, unlike text. This means an already formatted string can be displayed inside another formatter without mangling the indentation.

  • since 3.3
val char : char printer
  • since 0.14
val int32 : int32 printer
  • since 0.14
val int64 : int64 printer
  • since 0.14
val nativeint : nativeint printer
  • since 0.14
val flush : unit printer

Alias to Format.pp_print_flush.

  • since 1.2
val string_quoted : string printer

Similar to CCString.print.

  • since 0.14
val list : ?sep:unit printer -> 'a printer -> 'a list printer
val array : ?sep:unit printer -> 'a printer -> 'a array printer
val arrayi : ?sep:unit printer -> (int * 'a) printer -> 'a array printer
val seq : ?sep:unit printer -> 'a printer -> 'a Stdlib.Seq.t printer
val iter : ?sep:unit printer -> 'a printer -> 'a iter printer
val opt : 'a printer -> 'a option printer

opt pp prints options as follows:

  • Some x will become "some foo" if pp x ---> "foo".
  • None will become "none".

In the tuple printers, the sep argument is only available.

  • since 0.17
val pair : ?sep:unit printer -> 'a printer -> 'b printer -> ('a * 'b) printer
val triple : + ?sep:unit printer -> 'a printer -> 'b printer -> 'c printer -> ('a * 'b * 'c) printer
val quad : - ?sep:unit printer -> + ?sep:unit printer -> 'a printer -> 'b printer -> 'c printer -> 'd printer -> - ('a * 'b * 'c * 'd) printer
val append : unit printer -> unit printer -> unit printer

append ppa ppb first prints ppa (), then prints ppb ().

  • since 3.2
val append_l : unit printer list -> unit printer

append_l pps runs the printers in pps sequentially.

  • since 3.2
val within : string -> string -> 'a printer -> 'a printer

within a b p wraps p inside the strings a and b. Convenient, for instances, for brackets, parenthesis, quotes, etc.

  • since 0.17
val map : ('a -> 'b) -> 'b printer -> 'a printer
val vbox : ?i:int -> 'a printer -> 'a printer

Wrap the printer in a vertical box.

  • parameter i

    level of indentation within the box (default 0).

  • since 0.16
val hvbox : ?i:int -> 'a printer -> 'a printer

Wrap the printer in a horizontal/vertical box.

  • parameter i

    level of indentation within the box (default 0).

  • since 0.16
val hovbox : ?i:int -> 'a printer -> 'a printer

Wrap the printer in a horizontal or vertical box.

  • parameter i

    level of indentation within the box (default 0).

  • since 0.16
val hbox : 'a printer -> 'a printer

Wrap the printer in an horizontal box.

  • since 0.16
val return : ('a, _, _, 'a) format4 -> unit printer

return "some_format_string" takes a argument-less format string and returns a printer actionable by (). Examples:

  • return ",@ "
  • return "@{<Red>and then@}@,"
  • return "@[<v>a@ b@]"
  • since 1.0
val of_to_string : ('a -> string) -> 'a printer

of_to_string f converts its input to a string using f, then prints the string.

  • since 1.0
val const : 'a printer -> 'a -> unit printer

const pp x is a unit printer that uses pp on x.

  • since 1.0
val some : 'a printer -> 'a option printer

some pp will print options as follows:

  • Some x is printed using pp on x
  • None is not printed at all
  • since 1.0
val const_string : string -> 'a printer

const_string s is a printer that ignores its input and always prints s.

  • since 3.5
val opaque : 'a printer

opaque is const_string "opaque". The exact string used is not stable.

  • since 3.5
val lazy_force : 'a printer -> 'a lazy_t printer

lazy_force pp out x forces x and prints the result with pp.

  • since 2.0
val lazy_or : ?default:unit printer -> 'a printer -> 'a lazy_t printer

lazy_or ?default pp out x prints default if x is not evaluated yet, or uses pp otherwise.

  • since 2.0

ANSI codes

Use ANSI escape codes https://en.wikipedia.org/wiki/ANSI_escape_code to put some colors on the terminal.

This uses tags in format strings to specify the style. Current styles are the following:

  • "reset" resets style
  • "black"
  • "red"
  • "green"
  • "yellow"
  • "blue"
  • "magenta"
  • "cyan"
  • "white"
  • "bold" bold font
  • "Black" bold black
  • "Red" bold red
  • "Green" bold green
  • "Yellow" bold yellow
  • "Blue" bold blue
  • "Magenta" bold magenta
  • "Cyan" bold cyan
  • "White" bold white

Example:

set_color_default true;;
+  ('a * 'b * 'c * 'd) printer
val append : unit printer -> unit printer -> unit printer

append ppa ppb first prints ppa (), then prints ppb ().

  • since 3.2
val append_l : unit printer list -> unit printer

append_l pps runs the printers in pps sequentially.

  • since 3.2
val within : string -> string -> 'a printer -> 'a printer

within a b p wraps p inside the strings a and b. Convenient, for instances, for brackets, parenthesis, quotes, etc.

  • since 0.17
val map : ('a -> 'b) -> 'b printer -> 'a printer
val vbox : ?i:int -> 'a printer -> 'a printer

Wrap the printer in a vertical box.

  • parameter i

    level of indentation within the box (default 0).

  • since 0.16
val hvbox : ?i:int -> 'a printer -> 'a printer

Wrap the printer in a horizontal/vertical box.

  • parameter i

    level of indentation within the box (default 0).

  • since 0.16
val hovbox : ?i:int -> 'a printer -> 'a printer

Wrap the printer in a horizontal or vertical box.

  • parameter i

    level of indentation within the box (default 0).

  • since 0.16
val hbox : 'a printer -> 'a printer

Wrap the printer in an horizontal box.

  • since 0.16
val return : ('a, _, _, 'a) format4 -> unit printer

return "some_format_string" takes a argument-less format string and returns a printer actionable by (). Examples:

  • return ",@ "
  • return "@{<Red>and then@}@,"
  • return "@[<v>a@ b@]"
  • since 1.0
val of_to_string : ('a -> string) -> 'a printer

of_to_string f converts its input to a string using f, then prints the string.

  • since 1.0
val const : 'a printer -> 'a -> unit printer

const pp x is a unit printer that uses pp on x.

  • since 1.0
val some : 'a printer -> 'a option printer

some pp will print options as follows:

  • Some x is printed using pp on x
  • None is not printed at all
  • since 1.0
val const_string : string -> 'a printer

const_string s is a printer that ignores its input and always prints s.

  • since 3.5
val opaque : 'a printer

opaque is const_string "opaque". The exact string used is not stable.

  • since 3.5
val lazy_force : 'a printer -> 'a lazy_t printer

lazy_force pp out x forces x and prints the result with pp.

  • since 2.0
val lazy_or : ?default:unit printer -> 'a printer -> 'a lazy_t printer

lazy_or ?default pp out x prints default if x is not evaluated yet, or uses pp otherwise.

  • since 2.0

ANSI codes

Use ANSI escape codes https://en.wikipedia.org/wiki/ANSI_escape_code to put some colors on the terminal.

This uses tags in format strings to specify the style. Current styles are the following:

Example:

set_color_default true;;
 
 Format.printf
-  "what is your @{<White>favorite color@}? @{<blue>blue@}! No, @{<red>red@}! Ahhhhhhh@.";;

status: unstable

val set_color_tag_handling : t -> unit

Add functions to support color tags to the given formatter.

  • since 0.15
val set_color_default : bool -> unit

set_color_default b enables color handling on the standard formatters (stdout, stderr) if b = true as well as on sprintf formatters; it disables the color handling if b = false.

val with_color : string -> 'a printer -> 'a printer

with_color "Blue" pp behaves like the printer pp, but with the given style.

status: unstable

  • since 0.16
val with_colorf : string -> t -> ('a, t, unit, unit) format4 -> 'a

with_colorf "Blue" out "%s %d" "yolo" 42 will behave like Format.fprintf, but wrapping the content with the given style.

status: unstable

  • since 0.16
val with_color_sf : string -> ('a, t, unit, string) format4 -> 'a

with_color_sf "Blue" out "%s %d" "yolo" 42 will behave like sprintf, but wrapping the content with the given style.

Example:

CCFormat.with_color_sf "red" "%a" CCFormat.Dump.(list int) [1;2;3] |> print_endline;;

status: unstable

  • since 0.21
val with_color_ksf : - f:(string -> 'b) -> + "what is your @{<White>favorite color@}? @{<blue>blue@}! No, @{<red>red@}! Ahhhhhhh@.";;

status: unstable

  • since 0.15
val set_color_tag_handling : t -> unit

Add functions to support color tags to the given formatter.

  • since 0.15
val set_color_default : bool -> unit

set_color_default b enables color handling on the standard formatters (stdout, stderr) if b = true as well as on sprintf formatters; it disables the color handling if b = false.

val with_color : string -> 'a printer -> 'a printer

with_color "Blue" pp behaves like the printer pp, but with the given style.

status: unstable

  • since 0.16
val with_colorf : string -> t -> ('a, t, unit, unit) format4 -> 'a

with_colorf "Blue" out "%s %d" "yolo" 42 will behave like Format.fprintf, but wrapping the content with the given style.

status: unstable

  • since 0.16
val with_color_sf : string -> ('a, t, unit, string) format4 -> 'a

with_color_sf "Blue" out "%s %d" "yolo" 42 will behave like sprintf, but wrapping the content with the given style.

Example:

CCFormat.with_color_sf "red" "%a" CCFormat.Dump.(list int) [1;2;3] |> print_endline;;

status: unstable

  • since 0.21
val with_color_ksf : + f:(string -> 'b) -> string -> ('a, t, unit, 'b) format4 -> 'a

with_color_ksf "Blue" ~f "%s %d" "yolo" 42 will behave like ksprintf, but wrapping the content with the given style.

Example: the following with raise Failure with a colored message

CCFormat.with_color_ksf "red" ~f:failwith "%a" CCFormat.Dump.(list int) [1;2;3];;
  • since 1.2
module ANSI_codes : sig ... end

ANSI escape codes. This contains lower level functions for them.

val styling : ANSI_codes.style list -> 'a printer -> 'a printer

styling st p is the same printer as p, except it locally sets the style st.

Example:

open CCFormat;
@@ -155,17 +155,17 @@ sprintf
   "what is your %a? %a! No, %a! Ahhhhhhh@."
   (styling [`FG `White; `Bold] string) "favorite color"
   (styling [`FG `Blue] string) "blue"
-  (styling [`FG `Red] string) "red"

Available only on OCaml >= 4.08.

  • since 3.7
val with_styling : ANSI_codes.style list -> t -> (unit -> 'a) -> 'a

with_styling style fmt f sets the given style on fmt, calls f(), then restores the previous style. It is useful in imperative-style printers (a sequence of "print a; print b; โ€ฆ").

Available only on OCaml >= 4.08.

  • since 3.7

IO

val output : t -> 'a printer -> 'a -> unit
val to_string : 'a printer -> 'a -> string
val of_chan : out_channel -> t

Alias to Format.formatter_of_out_channel.

  • since 1.2
val with_out_chan : out_channel -> (t -> 'a) -> 'a

with_out_chan oc f turns oc into a formatter fmt, and call f fmt. Behaves like f fmt from then on, but whether the call to f fails or returns, fmt is flushed before the call terminates.

  • since 1.2
val stdout : t
val stderr : t
val tee : t -> t -> t

tee a b makes a new formatter that writes in both a and b.

  • since 1.0
val sprintf : ('a, t, unit, string) format4 -> 'a

Print into a string any format string that would usually be compatible with fprintf. Like Format.asprintf.

val sprintf_no_color : ('a, t, unit, string) format4 -> 'a

Like sprintf but never prints colors.

  • since 0.16
val sprintf_dyn_color : colors:bool -> ('a, t, unit, string) format4 -> 'a

Like sprintf but enable/disable colors depending on colors.

Example:

(* with colors *)
+  (styling [`FG `Red] string) "red"

Available only on OCaml >= 4.08.

  • since 3.7
val with_styling : ANSI_codes.style list -> t -> (unit -> 'a) -> 'a

with_styling style fmt f sets the given style on fmt, calls f(), then restores the previous style. It is useful in imperative-style printers (a sequence of "print a; print b; โ€ฆ").

Available only on OCaml >= 4.08.

  • since 3.7

IO

val output : t -> 'a printer -> 'a -> unit
val to_string : 'a printer -> 'a -> string
val of_chan : out_channel -> t

Alias to Format.formatter_of_out_channel.

  • since 1.2
val with_out_chan : out_channel -> (t -> 'a) -> 'a

with_out_chan oc f turns oc into a formatter fmt, and call f fmt. Behaves like f fmt from then on, but whether the call to f fails or returns, fmt is flushed before the call terminates.

  • since 1.2
val stdout : t
val stderr : t
val tee : t -> t -> t

tee a b makes a new formatter that writes in both a and b.

  • since 1.0
val sprintf : ('a, t, unit, string) format4 -> 'a

Print into a string any format string that would usually be compatible with fprintf. Like Format.asprintf.

val sprintf_no_color : ('a, t, unit, string) format4 -> 'a

Like sprintf but never prints colors.

  • since 0.16
val sprintf_dyn_color : colors:bool -> ('a, t, unit, string) format4 -> 'a

Like sprintf but enable/disable colors depending on colors.

Example:

(* with colors *)
 CCFormat.sprintf_dyn_color ~colors:true "@{<Red>%a@}"
   CCFormat.Dump.(list int) [1;2;3] |> print_endline;;
 
 (* without colors *)
 CCFormat.sprintf_dyn_color ~colors:false "@{<Red>%a@}"
-  CCFormat.Dump.(list int) [1;2;3] |> print_endline;;
  • since 0.21
val fprintf : t -> ('a, t, unit) format -> 'a

Alias to Format.fprintf.

  • since 0.14
val fprintf_dyn_color : colors:bool -> t -> ('a, t, unit) format -> 'a

Like fprintf but enable/disable colors depending on colors.

  • since 0.21
val ksprintf : - ?margin:int -> - f:(string -> 'b) -> + CCFormat.Dump.(list int) [1;2;3] |> print_endline;;
  • since 0.21
val fprintf : t -> ('a, t, unit) format -> 'a

Alias to Format.fprintf.

  • since 0.14
val fprintf_dyn_color : colors:bool -> t -> ('a, t, unit) format -> 'a

Like fprintf but enable/disable colors depending on colors.

  • since 0.21
val ksprintf : + ?margin:int -> + f:(string -> 'b) -> ('a, Stdlib.Format.formatter, unit, 'b) format4 -> 'a

ksprintf fmt ~f formats using fmt, in a way similar to sprintf, and then calls f on the resulting string.

  • parameter margin

    set margin (since 2.1)

  • since 0.14
val to_file : string -> ('a, t, unit, unit) format4 -> 'a

Print to the given file.

Dump

Print structures as OCaml values, so that they can be parsed back by OCaml (typically, in the toplevel, for debugging).

Example:

Format.printf "%a@." CCFormat.Dump.(list int) CCList.(1 -- 200);;
 
 Format.printf "%a@." CCFormat.Dump.(array (list (pair int bool)))
-  [| [1, true; 2, false]; []; [42, false] |];;
  • since 0.21
module Dump : sig ... end
module Infix : sig ... end
include module type of Infix
val (++) : unit printer -> unit printer -> unit printer

Alias to append.

  • since 3.2
\ No newline at end of file + [| [1, true; 2, false]; []; [42, false] |];;
module Dump : sig ... end
module Infix : sig ... end
include module type of Infix
val (++) : unit printer -> unit printer -> unit printer

Alias to append.

  • since 3.2
diff --git a/dev/containers/CCFun/Infix/index.html b/dev/containers/CCFun/Infix/index.html index 3e308a22..9e9c8ded 100644 --- a/dev/containers/CCFun/Infix/index.html +++ b/dev/containers/CCFun/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCFun.Infix)

Module CCFun.Infix

val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

(f %> g) x or (%>) f g x is g (f x). Alias to compose.

val (%) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c

(f % g) x or (%) f g x is f (g x). Mathematical composition.

val let@ : ('a -> 'b) -> 'a -> 'b

let@ x = foo in bar is the equivalent of foo @@ fun x -> bar. It can be very useful for resource management, alongside with protect.

  • since 3.11
\ No newline at end of file +Infix (containers.CCFun.Infix)

Module CCFun.Infix

val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

(f %> g) x or (%>) f g x is g (f x). Alias to compose.

val (%) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c

(f % g) x or (%) f g x is f (g x). Mathematical composition.

val let@ : ('a -> 'b) -> 'a -> 'b

let@ x = foo in bar is the equivalent of foo @@ fun x -> bar. It can be very useful for resource management, alongside with protect.

  • since 3.11
diff --git a/dev/containers/CCFun/Monad/argument-1-X/index.html b/dev/containers/CCFun/Monad/argument-1-X/index.html index 1b6d9e26..a83a0354 100644 --- a/dev/containers/CCFun/Monad/argument-1-X/index.html +++ b/dev/containers/CCFun/Monad/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers.CCFun.Monad.X)

Parameter Monad.X

type t
\ No newline at end of file +X (containers.CCFun.Monad.X)

Parameter Monad.X

type t
diff --git a/dev/containers/CCFun/Monad/index.html b/dev/containers/CCFun/Monad/index.html index a8758bd1..24c72a7f 100644 --- a/dev/containers/CCFun/Monad/index.html +++ b/dev/containers/CCFun/Monad/index.html @@ -1,2 +1,2 @@ -Monad (containers.CCFun.Monad)

Module CCFun.Monad

Parameters

module X : sig ... end

Signature

type 'a t = X.t -> 'a
val return : 'a -> 'a t

Monadic return.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

Monadic bind.

\ No newline at end of file +Monad (containers.CCFun.Monad)

Module CCFun.Monad

Parameters

module X : sig ... end

Signature

type 'a t = X.t -> 'a
val return : 'a -> 'a t

Monadic return.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

Monadic bind.

diff --git a/dev/containers/CCFun/index.html b/dev/containers/CCFun/index.html index 8d118ddc..8e53731c 100644 --- a/dev/containers/CCFun/index.html +++ b/dev/containers/CCFun/index.html @@ -1,4 +1,4 @@ -CCFun (containers.CCFun)

Module CCFun

Basic operations on Functions

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.

val compose : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

compose f g x is g (f x). Composition.

val compose_binop : ('a -> 'b) -> ('b -> 'b -> 'c) -> 'a -> 'a -> 'c

compose_binop f g is fun x y -> g (f x) (f y). Example (partial order): List.sort (compose_binop fst CCInt.compare) [1, true; 2, false; 1, false].

  • since 0.6
val curry : (('a * 'b) -> 'c) -> 'a -> 'b -> 'c

curry f x y is f (x,y). Convert a function which accepts a pair of arguments into a function which accepts two arguments.

val uncurry : ('a -> 'b -> 'c) -> ('a * 'b) -> 'c

uncurry f (x,y) is f x y. Convert a function which accepts a two arguments into a function which accepts a pair of arguments.

val tap : ('a -> _) -> 'a -> 'a

tap f x evaluates f x, discards it, then returns x. Useful in a pipeline, for instance:

CCArray.(1 -- 10)
+CCFun (containers.CCFun)

Module CCFun

Basic operations on Functions

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.

val compose : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

compose f g x is g (f x). Composition.

val compose_binop : ('a -> 'b) -> ('b -> 'b -> 'c) -> 'a -> 'a -> 'c

compose_binop f g is fun x y -> g (f x) (f y). Example (partial order): List.sort (compose_binop fst CCInt.compare) [1, true; 2, false; 1, false].

  • since 0.6
val curry : (('a * 'b) -> 'c) -> 'a -> 'b -> 'c

curry f x y is f (x,y). Convert a function which accepts a pair of arguments into a function which accepts two arguments.

val uncurry : ('a -> 'b -> 'c) -> ('a * 'b) -> 'c

uncurry f (x,y) is f x y. Convert a function which accepts a two arguments into a function which accepts a pair of arguments.

val tap : ('a -> _) -> 'a -> 'a

tap f x evaluates f x, discards it, then returns x. Useful in a pipeline, for instance:

CCArray.(1 -- 10)
 |> tap CCArray.shuffle
-|> tap @@ CCArray.sort Stdlib.compare
val lexicographic : ('a -> 'a -> int) -> ('a -> 'a -> int) -> 'a -> 'a -> int

Lexicographic combination of comparison functions.

val finally : h:(unit -> _) -> f:(unit -> 'a) -> 'a

finally ~h f calls f () and returns its result. If it raises, the same exception is raised; in any case, h () is called after f () terminates. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.

val finally1 : h:(unit -> _) -> ('a -> 'b) -> 'a -> 'b

finally1 ~h f x is the same as f x, but after the computation, h () is called whether f x rose an exception or not. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.

  • since 0.16
val finally2 : h:(unit -> _) -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c

finally2 ~h f x y is the same as f x y, but after the computation, h () is called whether f x y rose an exception or not. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.

  • since 0.16
val opaque_identity : 'a -> 'a

opaque_identity x is like x, but prevents Flambda from using x's definition for optimizing it. (flambda is an optimization/inlining pass in OCaml >= 4.03).

  • since 0.18
val iterate : int -> ('a -> 'a) -> 'a -> 'a

iterate n f is f iterated n times. That is to say, iterate 0 f x is x, iterate 1 f x is f x, iterate 2 f x is f (f x), etc.

  • since 2.1

Infix

Infix operators.

module Infix : sig ... end
include module type of Infix
val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

(f %> g) x or (%>) f g x is g (f x). Alias to compose.

val (%) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c

(f % g) x or (%) f g x is f (g x). Mathematical composition.

val let@ : ('a -> 'b) -> 'a -> 'b

let@ x = foo in bar is the equivalent of foo @@ fun x -> bar. It can be very useful for resource management, alongside with protect.

  • since 3.11

Monad

Functions with a fixed domain are monads in their codomain.

module Monad (X : sig ... end) : sig ... end
\ No newline at end of file +|> tap @@ CCArray.sort Stdlib.compare
val lexicographic : ('a -> 'a -> int) -> ('a -> 'a -> int) -> 'a -> 'a -> int

Lexicographic combination of comparison functions.

val finally : h:(unit -> _) -> f:(unit -> 'a) -> 'a

finally ~h f calls f () and returns its result. If it raises, the same exception is raised; in any case, h () is called after f () terminates. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.

val finally1 : h:(unit -> _) -> ('a -> 'b) -> 'a -> 'b

finally1 ~h f x is the same as f x, but after the computation, h () is called whether f x rose an exception or not. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.

  • since 0.16
val finally2 : h:(unit -> _) -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c

finally2 ~h f x y is the same as f x y, but after the computation, h () is called whether f x y rose an exception or not. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.

  • since 0.16
val opaque_identity : 'a -> 'a

opaque_identity x is like x, but prevents Flambda from using x's definition for optimizing it. (flambda is an optimization/inlining pass in OCaml >= 4.03).

  • since 0.18
val iterate : int -> ('a -> 'a) -> 'a -> 'a

iterate n f is f iterated n times. That is to say, iterate 0 f x is x, iterate 1 f x is f x, iterate 2 f x is f (f x), etc.

  • since 2.1

Infix

Infix operators.

module Infix : sig ... end
include module type of Infix
val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

(f %> g) x or (%>) f g x is g (f x). Alias to compose.

val (%) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c

(f % g) x or (%) f g x is f (g x). Mathematical composition.

val let@ : ('a -> 'b) -> 'a -> 'b

let@ x = foo in bar is the equivalent of foo @@ fun x -> bar. It can be very useful for resource management, alongside with protect.

  • since 3.11

Monad

Functions with a fixed domain are monads in their codomain.

module Monad (X : sig ... end) : sig ... end
diff --git a/dev/containers/CCHash/index.html b/dev/containers/CCHash/index.html index 8e148abf..cd6a0f48 100644 --- a/dev/containers/CCHash/index.html +++ b/dev/containers/CCHash/index.html @@ -1,4 +1,4 @@ -CCHash (containers.CCHash)

Module CCHash

Hash combinators

The API of this module is stable as per semantic versioning, like the rest of containers. However the exact implementation of hashing function can change and should not be relied on (i.e. hashing a value always returns the same integer within a run of a program, not across versions of OCaml and Containers).

Definitions

type hash = int

A hash value is a positive integer.

type 'a t = 'a -> hash

A hash function for values of type 'a.

val const : hash -> _ t

const h hashes any value into h. Use with caution!.

val const0 : _ t

Always return 0. Useful for ignoring elements. Example: Hash.(pair string const0) will map pairs ("a", 1) and ("a", 2) to the same hash, but not the same as ("b", 1).

  • since 1.5
val int : int t
val bool : bool t
val char : char t
val int32 : int32 t
val int64 : int64 t
val nativeint : nativeint t
val slice : string -> int -> int t

slice s i len state hashes the slice i, โ€ฆ, i+len-1 of s into state.

val bytes : bytes t

Hash a byte array.

  • since 3.5
val string : string t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val opt : 'a t -> 'a option t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val map : ('a -> 'b) -> 'b t -> 'a t

map f h is the hasher that takes x, and uses h to hash f x.

For example:

module Str_set = Set.Make(String)
+CCHash (containers.CCHash)

Module CCHash

Hash combinators

The API of this module is stable as per semantic versioning, like the rest of containers. However the exact implementation of hashing function can change and should not be relied on (i.e. hashing a value always returns the same integer within a run of a program, not across versions of OCaml and Containers).

Definitions

type hash = int

A hash value is a positive integer.

type 'a t = 'a -> hash

A hash function for values of type 'a.

val const : hash -> _ t

const h hashes any value into h. Use with caution!.

val const0 : _ t

Always return 0. Useful for ignoring elements. Example: Hash.(pair string const0) will map pairs ("a", 1) and ("a", 2) to the same hash, but not the same as ("b", 1).

  • since 1.5
val int : int t
val bool : bool t
val char : char t
val int32 : int32 t
val int64 : int64 t
val nativeint : nativeint t
val slice : string -> int -> int t

slice s i len state hashes the slice i, โ€ฆ, i+len-1 of s into state.

val bytes : bytes t

Hash a byte array.

  • since 3.5
val string : string t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val opt : 'a t -> 'a option t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val map : ('a -> 'b) -> 'b t -> 'a t

map f h is the hasher that takes x, and uses h to hash f x.

For example:

module Str_set = Set.Make(String)
 
-let hash_str_set : Str_set.t CCHash.t = CCHash.(map Str_set.to_seq @@ seq string)
  • since 3.5
val if_ : bool -> 'a t -> 'a t -> 'a t

Decide which hash function to use depending on the boolean.

val poly : 'a t

poly x is Hashtbl.hash x. The regular polymorphic hash function.

val list_comm : 'a t -> 'a list t

Commutative version of list. Lists that are equal up to permutation will have the same hash.

  • since 1.0
val array_comm : 'a t -> 'a array t

Commutative version of array. Arrays that are equal up to permutation will have the same hash.

  • since 1.0

Base hash combinators

val combine : 'a t -> hash -> 'a -> hash
val combine2 : hash -> hash -> hash
val combine3 : hash -> hash -> hash -> hash
val combine4 : hash -> hash -> hash -> hash -> hash
val combine5 : hash -> hash -> hash -> hash -> hash -> hash
  • since 2.1
val combine6 : hash -> hash -> hash -> hash -> hash -> hash -> hash
  • since 2.1

Iterators

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val seq : 'a t -> 'a Stdlib.Seq.t t
val iter : 'a t -> 'a iter t
val gen : 'a t -> 'a gen t
\ No newline at end of file +let hash_str_set : Str_set.t CCHash.t = CCHash.(map Str_set.to_seq @@ seq string)
  • since 3.5
val if_ : bool -> 'a t -> 'a t -> 'a t

Decide which hash function to use depending on the boolean.

val poly : 'a t

poly x is Hashtbl.hash x. The regular polymorphic hash function.

val list_comm : 'a t -> 'a list t

Commutative version of list. Lists that are equal up to permutation will have the same hash.

  • since 1.0
val array_comm : 'a t -> 'a array t

Commutative version of array. Arrays that are equal up to permutation will have the same hash.

  • since 1.0

Base hash combinators

val combine : 'a t -> hash -> 'a -> hash
val combine2 : hash -> hash -> hash
val combine3 : hash -> hash -> hash -> hash
val combine4 : hash -> hash -> hash -> hash -> hash
val combine5 : hash -> hash -> hash -> hash -> hash -> hash
  • since 2.1
val combine6 : hash -> hash -> hash -> hash -> hash -> hash -> hash
  • since 2.1

Iterators

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val seq : 'a t -> 'a Stdlib.Seq.t t
val iter : 'a t -> 'a iter t
val gen : 'a t -> 'a gen t
diff --git a/dev/containers/CCHashtbl/Make/argument-1-X/index.html b/dev/containers/CCHashtbl/Make/argument-1-X/index.html index ebbef61f..b6c8184f 100644 --- a/dev/containers/CCHashtbl/Make/argument-1-X/index.html +++ b/dev/containers/CCHashtbl/Make/argument-1-X/index.html @@ -1,2 +1,2 @@ -X (containers.CCHashtbl.Make.X)

Parameter Make.X

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 +X (containers.CCHashtbl.Make.X)

Parameter Make.X

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/dev/containers/CCHashtbl/Make/index.html b/dev/containers/CCHashtbl/Make/index.html index e455664f..e6d3f0b7 100644 --- a/dev/containers/CCHashtbl/Make/index.html +++ b/dev/containers/CCHashtbl/Make/index.html @@ -1,17 +1,17 @@ -Make (containers.CCHashtbl.Make)

Module CCHashtbl.Make

Parameters

Signature

include Hashtbl.S with type key = X.t with type 'a t = 'a Hashtbl.Make(X).t
type key = X.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
  • since 4.00.0
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 replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val get : 'a t -> key -> 'a option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : 'a t -> key -> default:'a -> 'a

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val add_list : 'a list t -> key -> 'a -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val incr : ?by:int -> int t -> key -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> int t -> key -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val keys : 'a t -> key iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : 'a t -> 'a iter

values tbl f iterates on values in the table.

val keys_list : _ t -> key list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : 'a t -> 'a list

values_list t is the list of values in t.

  • since 0.8
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list

Map on a hashtable's items, collect into a list.

val to_iter : 'a t -> (key * 'a) iter

Iterate on bindings in the table.

  • since 2.8
val add_iter : 'a t -> (key * 'a) iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : - f:(key -> 'a -> 'a -> 'a) -> +Make (containers.CCHashtbl.Make)

Module CCHashtbl.Make

Parameters

Signature

include Hashtbl.S with type key = X.t with type 'a t = 'a Hashtbl.Make(X).t
type key = X.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
  • since 4.00.0
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 replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val get : 'a t -> key -> 'a option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : 'a t -> key -> default:'a -> 'a

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val add_list : 'a list t -> key -> 'a -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val incr : ?by:int -> int t -> key -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> int t -> key -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val keys : 'a t -> key iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : 'a t -> 'a iter

values tbl f iterates on values in the table.

val keys_list : _ t -> key list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : 'a t -> 'a list

values_list t is the list of values in t.

  • since 0.8
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list

Map on a hashtable's items, collect into a list.

val to_iter : 'a t -> (key * 'a) iter

Iterate on bindings in the table.

  • since 2.8
val add_iter : 'a t -> (key * 'a) iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) iter -> - unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

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

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : - f:(key -> 'a -> 'a -> 'a) -> + unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

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

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> - unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_iter : (key * 'a) iter -> 'a t

From the given bindings, added in order.

  • since 2.8
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) iter -> 'a t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

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

From the given bindings, added in order. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_iter_count : int t -> key iter -> unit

add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.

  • since 2.8
val add_seq_count : int t -> key Stdlib.Seq.t -> unit

add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.

  • since 3.0
val of_iter_count : key iter -> int t

Like add_seq_count, but allocates a new table and returns it.

  • since 2.8
val of_seq_count : key Stdlib.Seq.t -> int t

Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.

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

to_list tbl returns the list of (key,value) bindings (order unspecified).

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

of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.

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

of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> - ?pp_arrow:unit printer -> + unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_iter : (key * 'a) iter -> 'a t

From the given bindings, added in order.

  • since 2.8
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) iter -> 'a t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

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

From the given bindings, added in order. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_iter_count : int t -> key iter -> unit

add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.

  • since 2.8
val add_seq_count : int t -> key Stdlib.Seq.t -> unit

add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.

  • since 3.0
val of_iter_count : key iter -> int t

Like add_seq_count, but allocates a new table and returns it.

  • since 2.8
val of_seq_count : key Stdlib.Seq.t -> int t

Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.

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

to_list tbl returns the list of (key,value) bindings (order unspecified).

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

of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.

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

of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> + ?pp_arrow:unit printer -> key printer -> 'a printer -> - 'a t printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
\ No newline at end of file + 'a t printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
diff --git a/dev/containers/CCHashtbl/Poly/index.html b/dev/containers/CCHashtbl/Poly/index.html index 8ef17aab..4695c0cb 100644 --- a/dev/containers/CCHashtbl/Poly/index.html +++ b/dev/containers/CCHashtbl/Poly/index.html @@ -1,30 +1,30 @@ -Poly (containers.CCHashtbl.Poly)

Module CCHashtbl.Poly

val get : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> 'b option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> default:'b -> 'b

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b iter

values tbl f iterates on values in the table tbl.

val keys_list : ('a, 'b) Stdlib.Hashtbl.t -> 'a list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t -> 'b list

values_list tbl is the list of values in tbl.

  • since 0.8
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Stdlib.Hashtbl.t -> 'c list

map_list f tbl maps on a tbl's items. Collect into a list.

val incr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter

Iterate on bindings in the table.

  • since 2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t -> 'a -> 'b -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : - f:('a -> 'b -> 'b -> 'b) -> +Poly (containers.CCHashtbl.Poly)

Module CCHashtbl.Poly

val get : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> 'b option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> default:'b -> 'b

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b iter

values tbl f iterates on values in the table tbl.

val keys_list : ('a, 'b) Stdlib.Hashtbl.t -> 'a list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t -> 'b list

values_list tbl is the list of values in tbl.

  • since 0.8
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Stdlib.Hashtbl.t -> 'c list

map_list f tbl maps on a tbl's items. Collect into a list.

val incr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter

Iterate on bindings in the table.

  • since 2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t -> 'a -> 'b -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : + f:('a -> 'b -> 'b -> 'b) -> ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter -> - unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : - f:('a -> 'b -> 'b -> 'b) -> + unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : + f:('a -> 'b -> 'b -> 'b) -> ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_iter : ('a * 'b) iter -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order.

  • since 2.8
val of_iter_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) iter -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) Stdlib.Seq.t -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_iter_count : ('a, int) Stdlib.Hashtbl.t -> 'a iter -> unit

add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.

  • since 2.8
val add_seq_count : ('a, int) Stdlib.Hashtbl.t -> 'a Stdlib.Seq.t -> unit

add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.

  • since 3.0
val of_iter_count : 'a iter -> ('a, int) Stdlib.Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • since 2.8
val of_seq_count : 'a Stdlib.Seq.t -> ('a, int) Stdlib.Hashtbl.t

Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.

  • since 3.0
val to_list : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) list

to_list tbl returns the list of (key,value) bindings (order unspecified).

val of_list : ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.

val of_list_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val update : ('a, 'b) Stdlib.Hashtbl.t -> - f:('a -> 'b option -> 'b option) -> - k:'a -> - unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> - ?pp_arrow:unit printer -> + f:('a -> 'b option -> 'b option) -> + k:'a -> + unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> + ?pp_arrow:unit printer -> 'a printer -> 'b printer -> - ('a, 'b) Stdlib.Hashtbl.t printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
\ No newline at end of file + ('a, 'b) Stdlib.Hashtbl.t printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
diff --git a/dev/containers/CCHashtbl/index.html b/dev/containers/CCHashtbl/index.html index 6225bc71..84106985 100644 --- a/dev/containers/CCHashtbl/index.html +++ b/dev/containers/CCHashtbl/index.html @@ -1,32 +1,32 @@ -CCHashtbl (containers.CCHashtbl)

Module CCHashtbl

Extension to the standard Hashtbl

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a eq = 'a -> 'a -> bool
type 'a hash = 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Polymorphic tables

This sub-module contains the extension of the standard polymorphic Hashtbl.

module Poly : sig ... end
include module type of Poly
val get : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> 'b option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> default:'b -> 'b

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b iter

values tbl f iterates on values in the table tbl.

val keys_list : ('a, 'b) Stdlib.Hashtbl.t -> 'a list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t -> 'b list

values_list tbl is the list of values in tbl.

  • since 0.8
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Stdlib.Hashtbl.t -> 'c list

map_list f tbl maps on a tbl's items. Collect into a list.

val incr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter

Iterate on bindings in the table.

  • since 2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t -> 'a -> 'b -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : - f:('a -> 'b -> 'b -> 'b) -> +CCHashtbl (containers.CCHashtbl)

Module CCHashtbl

Extension to the standard Hashtbl

  • since 0.4
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a eq = 'a -> 'a -> bool
type 'a hash = 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Polymorphic tables

This sub-module contains the extension of the standard polymorphic Hashtbl.

module Poly : sig ... end
include module type of Poly
val get : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> 'b option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> default:'b -> 'b

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b iter

values tbl f iterates on values in the table tbl.

val keys_list : ('a, 'b) Stdlib.Hashtbl.t -> 'a list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t -> 'b list

values_list tbl is the list of values in tbl.

  • since 0.8
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Stdlib.Hashtbl.t -> 'c list

map_list f tbl maps on a tbl's items. Collect into a list.

val incr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter

Iterate on bindings in the table.

  • since 2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t -> 'a -> 'b -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : + f:('a -> 'b -> 'b -> 'b) -> ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) iter -> - unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : - f:('a -> 'b -> 'b -> 'b) -> + unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : + f:('a -> 'b -> 'b -> 'b) -> ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_iter : ('a * 'b) iter -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order.

  • since 2.8
val of_iter_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) iter -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) Stdlib.Seq.t -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_iter_count : ('a, int) Stdlib.Hashtbl.t -> 'a iter -> unit

add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.

  • since 2.8
val add_seq_count : ('a, int) Stdlib.Hashtbl.t -> 'a Stdlib.Seq.t -> unit

add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.

  • since 3.0
val of_iter_count : 'a iter -> ('a, int) Stdlib.Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • since 2.8
val of_seq_count : 'a Stdlib.Seq.t -> ('a, int) Stdlib.Hashtbl.t

Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.

  • since 3.0
val to_list : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) list

to_list tbl returns the list of (key,value) bindings (order unspecified).

val of_list : ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.

val of_list_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val update : ('a, 'b) Stdlib.Hashtbl.t -> - f:('a -> 'b option -> 'b option) -> - k:'a -> - unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> - ?pp_arrow:unit printer -> + f:('a -> 'b option -> 'b option) -> + k:'a -> + unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> + ?pp_arrow:unit printer -> 'a printer -> 'b printer -> ('a, 'b) Stdlib.Hashtbl.t printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13

Functor

module type S = sig ... end
module Make (X : Stdlib.Hashtbl.HashedType) : - S with type key = X.t and type 'a t = 'a Stdlib.Hashtbl.Make(X).t
\ No newline at end of file + S with type key = X.t and type 'a t = 'a Stdlib.Hashtbl.Make(X).t
diff --git a/dev/containers/CCHashtbl/module-type-S/index.html b/dev/containers/CCHashtbl/module-type-S/index.html index fe372548..292191bc 100644 --- a/dev/containers/CCHashtbl/module-type-S/index.html +++ b/dev/containers/CCHashtbl/module-type-S/index.html @@ -1,17 +1,17 @@ -S (containers.CCHashtbl.S)

Module type CCHashtbl.S

include Stdlib.Hashtbl.S
type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
  • since 4.00.0
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 replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val get : 'a t -> key -> 'a option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : 'a t -> key -> default:'a -> 'a

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val add_list : 'a list t -> key -> 'a -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val incr : ?by:int -> int t -> key -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> int t -> key -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val keys : 'a t -> key iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : 'a t -> 'a iter

values tbl f iterates on values in the table.

val keys_list : _ t -> key list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : 'a t -> 'a list

values_list t is the list of values in t.

  • since 0.8
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list

Map on a hashtable's items, collect into a list.

val to_iter : 'a t -> (key * 'a) iter

Iterate on bindings in the table.

  • since 2.8
val add_iter : 'a t -> (key * 'a) iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : - f:(key -> 'a -> 'a -> 'a) -> +S (containers.CCHashtbl.S)

Module type CCHashtbl.S

include Stdlib.Hashtbl.S
type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
  • since 4.00.0
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 replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val get : 'a t -> key -> 'a option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : 'a t -> key -> default:'a -> 'a

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val add_list : 'a list t -> key -> 'a -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val incr : ?by:int -> int t -> key -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> int t -> key -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val keys : 'a t -> key iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : 'a t -> 'a iter

values tbl f iterates on values in the table.

val keys_list : _ t -> key list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : 'a t -> 'a list

values_list t is the list of values in t.

  • since 0.8
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list

Map on a hashtable's items, collect into a list.

val to_iter : 'a t -> (key * 'a) iter

Iterate on bindings in the table.

  • since 2.8
val add_iter : 'a t -> (key * 'a) iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) iter -> - unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

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

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : - f:(key -> 'a -> 'a -> 'a) -> + unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

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

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> - unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_iter : (key * 'a) iter -> 'a t

From the given bindings, added in order.

  • since 2.8
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) iter -> 'a t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

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

From the given bindings, added in order. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_iter_count : int t -> key iter -> unit

add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.

  • since 2.8
val add_seq_count : int t -> key Stdlib.Seq.t -> unit

add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.

  • since 3.0
val of_iter_count : key iter -> int t

Like add_seq_count, but allocates a new table and returns it.

  • since 2.8
val of_seq_count : key Stdlib.Seq.t -> int t

Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.

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

to_list tbl returns the list of (key,value) bindings (order unspecified).

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

of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.

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

of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> - ?pp_arrow:unit printer -> + unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_iter : (key * 'a) iter -> 'a t

From the given bindings, added in order.

  • since 2.8
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) iter -> 'a t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

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

From the given bindings, added in order. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_iter_count : int t -> key iter -> unit

add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.

  • since 2.8
val add_seq_count : int t -> key Stdlib.Seq.t -> unit

add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.

  • since 3.0
val of_iter_count : key iter -> int t

Like add_seq_count, but allocates a new table and returns it.

  • since 2.8
val of_seq_count : key Stdlib.Seq.t -> int t

Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.

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

to_list tbl returns the list of (key,value) bindings (order unspecified).

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

of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.

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

of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> + ?pp_arrow:unit printer -> key printer -> 'a printer -> - 'a t printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
\ No newline at end of file + 'a t printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
diff --git a/dev/containers/CCHeap/Make/argument-1-E/index.html b/dev/containers/CCHeap/Make/argument-1-E/index.html index 95626549..fb1db7b7 100644 --- a/dev/containers/CCHeap/Make/argument-1-E/index.html +++ b/dev/containers/CCHeap/Make/argument-1-E/index.html @@ -1,2 +1,2 @@ -E (containers.CCHeap.Make.E)

Parameter Make.E

type t
val leq : t -> t -> bool

leq x y shall return true iff x is lower or equal to y.

\ No newline at end of file +E (containers.CCHeap.Make.E)

Parameter Make.E

type t
val leq : t -> t -> bool

leq x y shall return true iff x is lower or equal to y.

diff --git a/dev/containers/CCHeap/Make/index.html b/dev/containers/CCHeap/Make/index.html index fe62ec59..5016b179 100644 --- a/dev/containers/CCHeap/Make/index.html +++ b/dev/containers/CCHeap/Make/index.html @@ -1,7 +1,7 @@ -Make (containers.CCHeap.Make)

Module CCHeap.Make

Parameters

module E : PARTIAL_ORD

Signature

type elt = E.t
type t
val empty : t

empty returns the empty heap.

val is_empty : t -> bool

is_empty h returns true if the heap h is empty.

exception Empty
val merge : t -> t -> t

merge h1 h2 merges the two heaps h1 and h2.

val insert : elt -> t -> t

insert x h inserts an element x into the heap h.

val add : t -> elt -> t

add h x inserts an element x into the heap h.

val filter : (elt -> bool) -> t -> t

filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.

val find_min : t -> elt option

find_min h find the minimal element of the heap h.

val find_min_exn : t -> elt

find_min_exn h is like find_min but can fail.

  • raises Empty

    if the heap is empty.

val take : t -> (t * elt) option

take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.

val take_exn : t -> t * elt

take_exn h is like take, but can fail.

  • raises Empty

    if the heap is empty.

val delete_one : (elt -> elt -> bool) -> elt -> t -> t

delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.

  • since 2.0
val delete_all : (elt -> elt -> bool) -> elt -> t -> t

delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.

  • since 2.0
val iter : (elt -> unit) -> t -> unit

iter f h iterates over the heap h invoking f with the current element.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

fold f acc h folds on all values of h.

val size : t -> int

size h is the number of elements in the heap h. Linear complexity.

Conversions

val to_list : t -> elt list

to_list h returns the elements of the heap h, in no particular order.

val to_list_sorted : t -> elt list

to_list_sorted h returns the elements of the heap h in increasing order.

  • since 1.1
val add_list : t -> elt list -> t

add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.

  • since 0.16
val of_list : elt list -> t

of_list l is add_list empty l. Complexity: O(n log n).

val add_iter : t -> elt iter -> t

add_iter h iter is like add_list.

  • since 2.8
val add_seq : t -> elt Stdlib.Seq.t -> t

add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.

  • since 3.0
val of_iter : elt iter -> t

of_iter iter builds a heap from a given iter. Complexity: O(n log n).

  • since 2.8
val of_seq : elt Stdlib.Seq.t -> t

of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.

  • since 3.0
val to_iter : t -> elt iter

to_iter h returns a iter of the elements of the heap h.

  • since 2.8
val to_seq : t -> elt Stdlib.Seq.t

to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter_sorted : t -> elt iter

to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.

  • since 2.8
val to_seq_sorted : t -> elt Stdlib.Seq.t

to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.

  • since 3.0
val add_gen : t -> elt gen -> t

add_gen h gen adds the gen gen to the heap h.

  • since 0.16
val of_gen : elt gen -> t

of_gen gen builds a heap from a given gen. Complexity: O(n log n).

val to_gen : t -> elt gen

to_gen h returns a gen of the elements of the heap h.

val to_tree : t -> elt ktree

to_tree h returns a ktree of the elements of the heap h.

val to_string : ?sep:string -> (elt -> string) -> t -> string

to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).

  • since 2.7
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> +Make (containers.CCHeap.Make)

Module CCHeap.Make

Parameters

module E : PARTIAL_ORD

Signature

type elt = E.t
type t
val empty : t

empty returns the empty heap.

val is_empty : t -> bool

is_empty h returns true if the heap h is empty.

exception Empty
val merge : t -> t -> t

merge h1 h2 merges the two heaps h1 and h2.

val insert : elt -> t -> t

insert x h inserts an element x into the heap h.

val add : t -> elt -> t

add h x inserts an element x into the heap h.

val filter : (elt -> bool) -> t -> t

filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.

val find_min : t -> elt option

find_min h find the minimal element of the heap h.

val find_min_exn : t -> elt

find_min_exn h is like find_min but can fail.

  • raises Empty

    if the heap is empty.

val take : t -> (t * elt) option

take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.

val take_exn : t -> t * elt

take_exn h is like take, but can fail.

  • raises Empty

    if the heap is empty.

val delete_one : (elt -> elt -> bool) -> elt -> t -> t

delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.

  • since 2.0
val delete_all : (elt -> elt -> bool) -> elt -> t -> t

delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.

  • since 2.0
val iter : (elt -> unit) -> t -> unit

iter f h iterates over the heap h invoking f with the current element.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

fold f acc h folds on all values of h.

val size : t -> int

size h is the number of elements in the heap h. Linear complexity.

Conversions

val to_list : t -> elt list

to_list h returns the elements of the heap h, in no particular order.

val to_list_sorted : t -> elt list

to_list_sorted h returns the elements of the heap h in increasing order.

  • since 1.1
val add_list : t -> elt list -> t

add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.

  • since 0.16
val of_list : elt list -> t

of_list l is add_list empty l. Complexity: O(n log n).

val add_iter : t -> elt iter -> t

add_iter h iter is like add_list.

  • since 2.8
val add_seq : t -> elt Stdlib.Seq.t -> t

add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.

  • since 3.0
val of_iter : elt iter -> t

of_iter iter builds a heap from a given iter. Complexity: O(n log n).

  • since 2.8
val of_seq : elt Stdlib.Seq.t -> t

of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.

  • since 3.0
val to_iter : t -> elt iter

to_iter h returns a iter of the elements of the heap h.

  • since 2.8
val to_seq : t -> elt Stdlib.Seq.t

to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter_sorted : t -> elt iter

to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.

  • since 2.8
val to_seq_sorted : t -> elt Stdlib.Seq.t

to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.

  • since 3.0
val add_gen : t -> elt gen -> t

add_gen h gen adds the gen gen to the heap h.

  • since 0.16
val of_gen : elt gen -> t

of_gen gen builds a heap from a given gen. Complexity: O(n log n).

val to_gen : t -> elt gen

to_gen h returns a gen of the elements of the heap h.

val to_tree : t -> elt ktree

to_tree h returns a ktree of the elements of the heap h.

val to_string : ?sep:string -> (elt -> string) -> t -> string

to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).

  • since 2.7
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> elt printer -> - t printer

pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ "). Renamed from print since 2.0

  • since 0.16
\ No newline at end of file + t printer

pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ "). Renamed from print since 2.0

  • since 0.16
diff --git a/dev/containers/CCHeap/Make_from_compare/argument-1-E/index.html b/dev/containers/CCHeap/Make_from_compare/argument-1-E/index.html index 37a83237..d907a94b 100644 --- a/dev/containers/CCHeap/Make_from_compare/argument-1-E/index.html +++ b/dev/containers/CCHeap/Make_from_compare/argument-1-E/index.html @@ -1,2 +1,2 @@ -E (containers.CCHeap.Make_from_compare.E)

Parameter Make_from_compare.E

type t
val compare : t -> t -> int

compare a b shall return a negative value if a is smaller than b, 0 if a and b are equal or a positive value if a is greater than b

\ No newline at end of file +E (containers.CCHeap.Make_from_compare.E)

Parameter Make_from_compare.E

type t
val compare : t -> t -> int

compare a b shall return a negative value if a is smaller than b, 0 if a and b are equal or a positive value if a is greater than b

diff --git a/dev/containers/CCHeap/Make_from_compare/index.html b/dev/containers/CCHeap/Make_from_compare/index.html index 620f1f03..e66009cd 100644 --- a/dev/containers/CCHeap/Make_from_compare/index.html +++ b/dev/containers/CCHeap/Make_from_compare/index.html @@ -1,7 +1,7 @@ -Make_from_compare (containers.CCHeap.Make_from_compare)

Module CCHeap.Make_from_compare

A convenient version of Make that take a TOTAL_ORD instead of a partially ordered module. It allow to directly pass modules that implement compare without implementing leq explicitly

Parameters

module E : TOTAL_ORD

Signature

type elt = E.t
type t
val empty : t

empty returns the empty heap.

val is_empty : t -> bool

is_empty h returns true if the heap h is empty.

exception Empty
val merge : t -> t -> t

merge h1 h2 merges the two heaps h1 and h2.

val insert : elt -> t -> t

insert x h inserts an element x into the heap h.

val add : t -> elt -> t

add h x inserts an element x into the heap h.

val filter : (elt -> bool) -> t -> t

filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.

val find_min : t -> elt option

find_min h find the minimal element of the heap h.

val find_min_exn : t -> elt

find_min_exn h is like find_min but can fail.

  • raises Empty

    if the heap is empty.

val take : t -> (t * elt) option

take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.

val take_exn : t -> t * elt

take_exn h is like take, but can fail.

  • raises Empty

    if the heap is empty.

val delete_one : (elt -> elt -> bool) -> elt -> t -> t

delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.

  • since 2.0
val delete_all : (elt -> elt -> bool) -> elt -> t -> t

delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.

  • since 2.0
val iter : (elt -> unit) -> t -> unit

iter f h iterates over the heap h invoking f with the current element.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

fold f acc h folds on all values of h.

val size : t -> int

size h is the number of elements in the heap h. Linear complexity.

Conversions

val to_list : t -> elt list

to_list h returns the elements of the heap h, in no particular order.

val to_list_sorted : t -> elt list

to_list_sorted h returns the elements of the heap h in increasing order.

  • since 1.1
val add_list : t -> elt list -> t

add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.

  • since 0.16
val of_list : elt list -> t

of_list l is add_list empty l. Complexity: O(n log n).

val add_iter : t -> elt iter -> t

add_iter h iter is like add_list.

  • since 2.8
val add_seq : t -> elt Stdlib.Seq.t -> t

add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.

  • since 3.0
val of_iter : elt iter -> t

of_iter iter builds a heap from a given iter. Complexity: O(n log n).

  • since 2.8
val of_seq : elt Stdlib.Seq.t -> t

of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.

  • since 3.0
val to_iter : t -> elt iter

to_iter h returns a iter of the elements of the heap h.

  • since 2.8
val to_seq : t -> elt Stdlib.Seq.t

to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter_sorted : t -> elt iter

to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.

  • since 2.8
val to_seq_sorted : t -> elt Stdlib.Seq.t

to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.

  • since 3.0
val add_gen : t -> elt gen -> t

add_gen h gen adds the gen gen to the heap h.

  • since 0.16
val of_gen : elt gen -> t

of_gen gen builds a heap from a given gen. Complexity: O(n log n).

val to_gen : t -> elt gen

to_gen h returns a gen of the elements of the heap h.

val to_tree : t -> elt ktree

to_tree h returns a ktree of the elements of the heap h.

val to_string : ?sep:string -> (elt -> string) -> t -> string

to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).

  • since 2.7
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> +Make_from_compare (containers.CCHeap.Make_from_compare)

Module CCHeap.Make_from_compare

A convenient version of Make that take a TOTAL_ORD instead of a partially ordered module. It allow to directly pass modules that implement compare without implementing leq explicitly

Parameters

module E : TOTAL_ORD

Signature

type elt = E.t
type t
val empty : t

empty returns the empty heap.

val is_empty : t -> bool

is_empty h returns true if the heap h is empty.

exception Empty
val merge : t -> t -> t

merge h1 h2 merges the two heaps h1 and h2.

val insert : elt -> t -> t

insert x h inserts an element x into the heap h.

val add : t -> elt -> t

add h x inserts an element x into the heap h.

val filter : (elt -> bool) -> t -> t

filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.

val find_min : t -> elt option

find_min h find the minimal element of the heap h.

val find_min_exn : t -> elt

find_min_exn h is like find_min but can fail.

  • raises Empty

    if the heap is empty.

val take : t -> (t * elt) option

take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.

val take_exn : t -> t * elt

take_exn h is like take, but can fail.

  • raises Empty

    if the heap is empty.

val delete_one : (elt -> elt -> bool) -> elt -> t -> t

delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.

  • since 2.0
val delete_all : (elt -> elt -> bool) -> elt -> t -> t

delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.

  • since 2.0
val iter : (elt -> unit) -> t -> unit

iter f h iterates over the heap h invoking f with the current element.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

fold f acc h folds on all values of h.

val size : t -> int

size h is the number of elements in the heap h. Linear complexity.

Conversions

val to_list : t -> elt list

to_list h returns the elements of the heap h, in no particular order.

val to_list_sorted : t -> elt list

to_list_sorted h returns the elements of the heap h in increasing order.

  • since 1.1
val add_list : t -> elt list -> t

add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.

  • since 0.16
val of_list : elt list -> t

of_list l is add_list empty l. Complexity: O(n log n).

val add_iter : t -> elt iter -> t

add_iter h iter is like add_list.

  • since 2.8
val add_seq : t -> elt Stdlib.Seq.t -> t

add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.

  • since 3.0
val of_iter : elt iter -> t

of_iter iter builds a heap from a given iter. Complexity: O(n log n).

  • since 2.8
val of_seq : elt Stdlib.Seq.t -> t

of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.

  • since 3.0
val to_iter : t -> elt iter

to_iter h returns a iter of the elements of the heap h.

  • since 2.8
val to_seq : t -> elt Stdlib.Seq.t

to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter_sorted : t -> elt iter

to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.

  • since 2.8
val to_seq_sorted : t -> elt Stdlib.Seq.t

to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.

  • since 3.0
val add_gen : t -> elt gen -> t

add_gen h gen adds the gen gen to the heap h.

  • since 0.16
val of_gen : elt gen -> t

of_gen gen builds a heap from a given gen. Complexity: O(n log n).

val to_gen : t -> elt gen

to_gen h returns a gen of the elements of the heap h.

val to_tree : t -> elt ktree

to_tree h returns a ktree of the elements of the heap h.

val to_string : ?sep:string -> (elt -> string) -> t -> string

to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).

  • since 2.7
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> elt printer -> - t printer

pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ "). Renamed from print since 2.0

  • since 0.16
\ No newline at end of file + t printer

pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ "). Renamed from print since 2.0

  • since 0.16
diff --git a/dev/containers/CCHeap/index.html b/dev/containers/CCHeap/index.html index 476450fd..cc2866a9 100644 --- a/dev/containers/CCHeap/index.html +++ b/dev/containers/CCHeap/index.html @@ -1,2 +1,2 @@ -CCHeap (containers.CCHeap)

Module CCHeap

Leftist Heaps

Implementation following Okasaki's book.

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ]
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type PARTIAL_ORD = sig ... end
module type TOTAL_ORD = sig ... end
module type S = sig ... end
module Make (E : PARTIAL_ORD) : S with type elt = E.t
module Make_from_compare (E : TOTAL_ORD) : S with type elt = E.t

A convenient version of Make that take a TOTAL_ORD instead of a partially ordered module. It allow to directly pass modules that implement compare without implementing leq explicitly

\ No newline at end of file +CCHeap (containers.CCHeap)

Module CCHeap

Leftist Heaps

Implementation following Okasaki's book.

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a ktree list ]
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type PARTIAL_ORD = sig ... end
module type TOTAL_ORD = sig ... end
module type S = sig ... end
module Make (E : PARTIAL_ORD) : S with type elt = E.t
module Make_from_compare (E : TOTAL_ORD) : S with type elt = E.t

A convenient version of Make that take a TOTAL_ORD instead of a partially ordered module. It allow to directly pass modules that implement compare without implementing leq explicitly

diff --git a/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html b/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html index 18c4a566..3a4110cf 100644 --- a/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html +++ b/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html @@ -1,2 +1,2 @@ -PARTIAL_ORD (containers.CCHeap.PARTIAL_ORD)

Module type CCHeap.PARTIAL_ORD

type t
val leq : t -> t -> bool

leq x y shall return true iff x is lower or equal to y.

\ No newline at end of file +PARTIAL_ORD (containers.CCHeap.PARTIAL_ORD)

Module type CCHeap.PARTIAL_ORD

type t
val leq : t -> t -> bool

leq x y shall return true iff x is lower or equal to y.

diff --git a/dev/containers/CCHeap/module-type-S/index.html b/dev/containers/CCHeap/module-type-S/index.html index 43ffd5b4..7e35a663 100644 --- a/dev/containers/CCHeap/module-type-S/index.html +++ b/dev/containers/CCHeap/module-type-S/index.html @@ -1,7 +1,7 @@ -S (containers.CCHeap.S)

Module type CCHeap.S

type elt
type t
val empty : t

empty returns the empty heap.

val is_empty : t -> bool

is_empty h returns true if the heap h is empty.

exception Empty
val merge : t -> t -> t

merge h1 h2 merges the two heaps h1 and h2.

val insert : elt -> t -> t

insert x h inserts an element x into the heap h.

val add : t -> elt -> t

add h x inserts an element x into the heap h.

val filter : (elt -> bool) -> t -> t

filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.

val find_min : t -> elt option

find_min h find the minimal element of the heap h.

val find_min_exn : t -> elt

find_min_exn h is like find_min but can fail.

  • raises Empty

    if the heap is empty.

val take : t -> (t * elt) option

take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.

val take_exn : t -> t * elt

take_exn h is like take, but can fail.

  • raises Empty

    if the heap is empty.

val delete_one : (elt -> elt -> bool) -> elt -> t -> t

delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.

  • since 2.0
val delete_all : (elt -> elt -> bool) -> elt -> t -> t

delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.

  • since 2.0
val iter : (elt -> unit) -> t -> unit

iter f h iterates over the heap h invoking f with the current element.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

fold f acc h folds on all values of h.

val size : t -> int

size h is the number of elements in the heap h. Linear complexity.

Conversions

val to_list : t -> elt list

to_list h returns the elements of the heap h, in no particular order.

val to_list_sorted : t -> elt list

to_list_sorted h returns the elements of the heap h in increasing order.

  • since 1.1
val add_list : t -> elt list -> t

add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.

  • since 0.16
val of_list : elt list -> t

of_list l is add_list empty l. Complexity: O(n log n).

val add_iter : t -> elt iter -> t

add_iter h iter is like add_list.

  • since 2.8
val add_seq : t -> elt Stdlib.Seq.t -> t

add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.

  • since 3.0
val of_iter : elt iter -> t

of_iter iter builds a heap from a given iter. Complexity: O(n log n).

  • since 2.8
val of_seq : elt Stdlib.Seq.t -> t

of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.

  • since 3.0
val to_iter : t -> elt iter

to_iter h returns a iter of the elements of the heap h.

  • since 2.8
val to_seq : t -> elt Stdlib.Seq.t

to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter_sorted : t -> elt iter

to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.

  • since 2.8
val to_seq_sorted : t -> elt Stdlib.Seq.t

to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.

  • since 3.0
val add_gen : t -> elt gen -> t

add_gen h gen adds the gen gen to the heap h.

  • since 0.16
val of_gen : elt gen -> t

of_gen gen builds a heap from a given gen. Complexity: O(n log n).

val to_gen : t -> elt gen

to_gen h returns a gen of the elements of the heap h.

val to_tree : t -> elt ktree

to_tree h returns a ktree of the elements of the heap h.

val to_string : ?sep:string -> (elt -> string) -> t -> string

to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).

  • since 2.7
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> +S (containers.CCHeap.S)

Module type CCHeap.S

type elt
type t
val empty : t

empty returns the empty heap.

val is_empty : t -> bool

is_empty h returns true if the heap h is empty.

exception Empty
val merge : t -> t -> t

merge h1 h2 merges the two heaps h1 and h2.

val insert : elt -> t -> t

insert x h inserts an element x into the heap h.

val add : t -> elt -> t

add h x inserts an element x into the heap h.

val filter : (elt -> bool) -> t -> t

filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.

val find_min : t -> elt option

find_min h find the minimal element of the heap h.

val find_min_exn : t -> elt

find_min_exn h is like find_min but can fail.

  • raises Empty

    if the heap is empty.

val take : t -> (t * elt) option

take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.

val take_exn : t -> t * elt

take_exn h is like take, but can fail.

  • raises Empty

    if the heap is empty.

val delete_one : (elt -> elt -> bool) -> elt -> t -> t

delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.

  • since 2.0
val delete_all : (elt -> elt -> bool) -> elt -> t -> t

delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.

  • since 2.0
val iter : (elt -> unit) -> t -> unit

iter f h iterates over the heap h invoking f with the current element.

val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a

fold f acc h folds on all values of h.

val size : t -> int

size h is the number of elements in the heap h. Linear complexity.

Conversions

val to_list : t -> elt list

to_list h returns the elements of the heap h, in no particular order.

val to_list_sorted : t -> elt list

to_list_sorted h returns the elements of the heap h in increasing order.

  • since 1.1
val add_list : t -> elt list -> t

add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.

  • since 0.16
val of_list : elt list -> t

of_list l is add_list empty l. Complexity: O(n log n).

val add_iter : t -> elt iter -> t

add_iter h iter is like add_list.

  • since 2.8
val add_seq : t -> elt Stdlib.Seq.t -> t

add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.

  • since 3.0
val of_iter : elt iter -> t

of_iter iter builds a heap from a given iter. Complexity: O(n log n).

  • since 2.8
val of_seq : elt Stdlib.Seq.t -> t

of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.

  • since 3.0
val to_iter : t -> elt iter

to_iter h returns a iter of the elements of the heap h.

  • since 2.8
val to_seq : t -> elt Stdlib.Seq.t

to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter_sorted : t -> elt iter

to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.

  • since 2.8
val to_seq_sorted : t -> elt Stdlib.Seq.t

to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.

  • since 3.0
val add_gen : t -> elt gen -> t

add_gen h gen adds the gen gen to the heap h.

  • since 0.16
val of_gen : elt gen -> t

of_gen gen builds a heap from a given gen. Complexity: O(n log n).

val to_gen : t -> elt gen

to_gen h returns a gen of the elements of the heap h.

val to_tree : t -> elt ktree

to_tree h returns a ktree of the elements of the heap h.

val to_string : ?sep:string -> (elt -> string) -> t -> string

to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).

  • since 2.7
val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> elt printer -> - t printer

pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ "). Renamed from print since 2.0

  • since 0.16
\ No newline at end of file + t printer

pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ "). Renamed from print since 2.0

  • since 0.16
diff --git a/dev/containers/CCHeap/module-type-TOTAL_ORD/index.html b/dev/containers/CCHeap/module-type-TOTAL_ORD/index.html index 4c40a23b..0d68997f 100644 --- a/dev/containers/CCHeap/module-type-TOTAL_ORD/index.html +++ b/dev/containers/CCHeap/module-type-TOTAL_ORD/index.html @@ -1,2 +1,2 @@ -TOTAL_ORD (containers.CCHeap.TOTAL_ORD)

Module type CCHeap.TOTAL_ORD

type t
val compare : t -> t -> int

compare a b shall return a negative value if a is smaller than b, 0 if a and b are equal or a positive value if a is greater than b

\ No newline at end of file +TOTAL_ORD (containers.CCHeap.TOTAL_ORD)

Module type CCHeap.TOTAL_ORD

type t
val compare : t -> t -> int

compare a b shall return a negative value if a is smaller than b, 0 if a and b are equal or a positive value if a is greater than b

diff --git a/dev/containers/CCIO/File/index.html b/dev/containers/CCIO/File/index.html index 301d7ca9..ee312357 100644 --- a/dev/containers/CCIO/File/index.html +++ b/dev/containers/CCIO/File/index.html @@ -1,7 +1,7 @@ -File (containers.CCIO.File)

Module CCIO.File

type t = string

A file should be represented by its absolute path, but currently this is not enforced.

val to_string : t -> string
val make : string -> t

Build a file representation from a path (absolute or relative).

val exists : t -> bool
val is_directory : t -> bool
val remove_exn : t -> unit

remove_exn path tries to remove the file at path from the file system.

  • raises Sys_error

    if there is no file at path or access rights are wrong.

  • since 0.8
val remove : t -> unit or_error

Like remove_exn but with an error monad.

  • since 0.8
val remove_noerr : t -> unit

Like remove_exn but do not raise any exception on failure.

  • since 0.8
val read_dir : ?recurse:bool -> t -> t gen

read_dir d returns a sequence of files and directory contained in the directory d (or an empty stream if d is not a directory).

  • raises Sys_error

    in case of error (e.g. permission denied).

  • parameter recurse

    if true (default false), sub-directories are also explored, and the sequence only contains files.

val read_exn : t -> string

Read the content of the given file, or raises some exception.

  • raises Sys_error

    in case of error.

  • since 0.16
val read : t -> string or_error

Read the content of the given file.

  • since 0.16
val append_exn : t -> string -> unit

Append the given string into the given file, possibly raising.

  • raises Sys_error

    in case of error.

  • since 0.16
val append : t -> string -> unit or_error

Append the given string into the given file.

  • since 0.16
val write_exn : t -> string -> unit

Write the given string into the given file, possibly raising.

  • raises Sys_error

    in case of error.

  • since 0.16
val write : t -> string -> unit or_error

Write the given string into the given file.

  • since 0.16
type walk_item = [ `File | `Dir ] * t
val walk : t -> walk_item gen

walk p generates the files and directories contained in a directory tree by walking the tree. walk treats anything for which is_directory returns false (including symlinks, etc.) as a file.

The argument is treated as part of its own directory tree, so the result of walk p always includes p.

This is similar to read_dir with recurse=true, except that read_dir with recurse=true only generates file entries.

  • raises Sys_error

    in case of error (e.g. permission denied) during iteration.

val walk_iter : t -> walk_item iter

Like walk but with an imperative iterator.

  • since 3.6
val walk_l : t -> walk_item list

Like walk but returns a list (therefore it's eager and might take some time on large directories).

  • since 1.1
val walk_seq : t -> walk_item Stdlib.Seq.t

Like walk but returns a Seq

  • since 3.6
val show_walk_item : walk_item -> string
val with_temp : - ?temp_dir:string -> - prefix:string -> - suffix:string -> +File (containers.CCIO.File)

Module CCIO.File

type t = string

A file should be represented by its absolute path, but currently this is not enforced.

val to_string : t -> string
val make : string -> t

Build a file representation from a path (absolute or relative).

val exists : t -> bool
val is_directory : t -> bool
val remove_exn : t -> unit

remove_exn path tries to remove the file at path from the file system.

  • raises Sys_error

    if there is no file at path or access rights are wrong.

  • since 0.8
val remove : t -> unit or_error

Like remove_exn but with an error monad.

  • since 0.8
val remove_noerr : t -> unit

Like remove_exn but do not raise any exception on failure.

  • since 0.8
val read_dir : ?recurse:bool -> t -> t gen

read_dir d returns a sequence of files and directory contained in the directory d (or an empty stream if d is not a directory).

  • raises Sys_error

    in case of error (e.g. permission denied).

  • parameter recurse

    if true (default false), sub-directories are also explored, and the sequence only contains files.

val read_exn : t -> string

Read the content of the given file, or raises some exception.

  • raises Sys_error

    in case of error.

  • since 0.16
val read : t -> string or_error

Read the content of the given file.

  • since 0.16
val append_exn : t -> string -> unit

Append the given string into the given file, possibly raising.

  • raises Sys_error

    in case of error.

  • since 0.16
val append : t -> string -> unit or_error

Append the given string into the given file.

  • since 0.16
val write_exn : t -> string -> unit

Write the given string into the given file, possibly raising.

  • raises Sys_error

    in case of error.

  • since 0.16
val write : t -> string -> unit or_error

Write the given string into the given file.

  • since 0.16
type walk_item = [ `File | `Dir ] * t
val walk : t -> walk_item gen

walk p generates the files and directories contained in a directory tree by walking the tree. walk treats anything for which is_directory returns false (including symlinks, etc.) as a file.

The argument is treated as part of its own directory tree, so the result of walk p always includes p.

This is similar to read_dir with recurse=true, except that read_dir with recurse=true only generates file entries.

  • raises Sys_error

    in case of error (e.g. permission denied) during iteration.

val walk_iter : t -> walk_item iter

Like walk but with an imperative iterator.

  • since 3.6
val walk_l : t -> walk_item list

Like walk but returns a list (therefore it's eager and might take some time on large directories).

  • since 1.1
val walk_seq : t -> walk_item Stdlib.Seq.t

Like walk but returns a Seq

  • since 3.6
val show_walk_item : walk_item -> string
val with_temp : + ?temp_dir:string -> + prefix:string -> + suffix:string -> (string -> 'a) -> - 'a

with_temp ~prefix ~suffix f will call f with the name of a new temporary file (located in temp_dir). After f returns, the file is deleted. Best to be used in combination with with_out. See Filename.temp_file.

  • since 0.17
\ No newline at end of file + 'a

with_temp ~prefix ~suffix f will call f with the name of a new temporary file (located in temp_dir). After f returns, the file is deleted. Best to be used in combination with with_out. See Filename.temp_file.

  • since 0.17
diff --git a/dev/containers/CCIO/index.html b/dev/containers/CCIO/index.html index 09c11028..3bfedb67 100644 --- a/dev/containers/CCIO/index.html +++ b/dev/containers/CCIO/index.html @@ -1,5 +1,5 @@ -CCIO (containers.CCIO)

Module CCIO

IO Utils

Simple utilities to deal with basic Input/Output tasks in a resource-safe way. For advanced IO tasks, the user is advised to use something like Lwt or Async, that are far more comprehensive.

Examples:

  • obtain the list of lines of a file:
# let l = CCIO.(with_in "/tmp/some_file" read_lines_l);;
  • transfer one file into another:
# CCIO.(
+CCIO (containers.CCIO)

Module CCIO

IO Utils

Simple utilities to deal with basic Input/Output tasks in a resource-safe way. For advanced IO tasks, the user is advised to use something like Lwt or Async, that are far more comprehensive.

Examples:

  • obtain the list of lines of a file:
# let l = CCIO.(with_in "/tmp/some_file" read_lines_l);;
  • transfer one file into another:
# CCIO.(
     with_in "/tmp/input"
       (fun ic ->
          let chunks = read_chunks_gen ic in
@@ -18,25 +18,25 @@
           write_gen oc chunks
        )
   ) ;;
  • since 0.6
  • before 0.12

    was in 'containers.io', now moved into 'containers'

type 'a or_error = ('a, string) result
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option

See Gen in the gen library.

Input

val with_in : - ?mode:int -> - ?flags:open_flag list -> + ?mode:int -> + ?flags:open_flag list -> string -> (in_channel -> 'a) -> - 'a

Open an input file with the given optional flag list, calls the function on the input channel. When the function raises or returns, the channel is closed.

  • raises Sys_error

    in case of error (same as open_in and close_in).

  • parameter flags

    opening flags (default [Open_text]). Open_rdonly is used in any cases.

val read_chunks_gen : ?size:int -> in_channel -> string gen

Read the channel's content into chunks of size at most size. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.

val read_chunks_seq : ?size:int -> in_channel -> string Stdlib.Seq.t

Read the channel's content into chunks of size at most size. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.

  • since 3.5
val read_chunks_iter : ?size:int -> in_channel -> string iter

Read the channel's content into chunks of size at most size

  • since 3.6
val read_line : in_channel -> string option

Read a line from the channel. Returns None if the input is terminated. The "\n" is removed from the line.

val read_lines_gen : in_channel -> string gen

Read all lines. The generator should be traversed only once. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.

val read_lines_seq : in_channel -> string Stdlib.Seq.t

Read all lines. NOTE the seq must be used within the lifetime of the channel, see warning at the top of the file.

  • since 3.5
val read_lines_iter : in_channel -> string iter

Read all lines.

  • since 3.6
val read_lines_l : in_channel -> string list

Read all lines into a list.

val read_all : ?size:int -> in_channel -> string

Read the whole channel into a buffer, then converted into a string.

  • parameter size

    the internal buffer size.

  • since 0.7
val read_all_bytes : ?size:int -> in_channel -> Stdlib.Bytes.t

Read the whole channel into a mutable byte array.

  • parameter size

    the internal buffer size.

  • since 0.12

Output

val with_out : - ?mode:int -> - ?flags:open_flag list -> + 'a

Open an input file with the given optional flag list, calls the function on the input channel. When the function raises or returns, the channel is closed.

  • raises Sys_error

    in case of error (same as open_in and close_in).

  • parameter flags

    opening flags (default [Open_text]). Open_rdonly is used in any cases.

val read_chunks_gen : ?size:int -> in_channel -> string gen

Read the channel's content into chunks of size at most size. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.

val read_chunks_seq : ?size:int -> in_channel -> string Stdlib.Seq.t

Read the channel's content into chunks of size at most size. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.

  • since 3.5
val read_chunks_iter : ?size:int -> in_channel -> string iter

Read the channel's content into chunks of size at most size

  • since 3.6
val read_line : in_channel -> string option

Read a line from the channel. Returns None if the input is terminated. The "\n" is removed from the line.

val read_lines_gen : in_channel -> string gen

Read all lines. The generator should be traversed only once. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.

val read_lines_seq : in_channel -> string Stdlib.Seq.t

Read all lines. NOTE the seq must be used within the lifetime of the channel, see warning at the top of the file.

  • since 3.5
val read_lines_iter : in_channel -> string iter

Read all lines.

  • since 3.6
val read_lines_l : in_channel -> string list

Read all lines into a list.

val read_all : ?size:int -> in_channel -> string

Read the whole channel into a buffer, then converted into a string.

  • parameter size

    the internal buffer size.

  • since 0.7
val read_all_bytes : ?size:int -> in_channel -> Stdlib.Bytes.t

Read the whole channel into a mutable byte array.

  • parameter size

    the internal buffer size.

  • since 0.12

Output

val with_out : + ?mode:int -> + ?flags:open_flag list -> string -> (out_channel -> 'a) -> - 'a

Like with_in but for an output channel.

  • parameter flags

    opening flags (default [Open_creat; Open_trunc; Open_text]).

  • raises Sys_error

    in case of error (same as open_out and close_out). Open_wronly is used in any cases.

val with_out_a : - ?mode:int -> - ?flags:open_flag list -> + 'a

Like with_in but for an output channel.

  • parameter flags

    opening flags (default [Open_creat; Open_trunc; Open_text]).

  • raises Sys_error

    in case of error (same as open_out and close_out). Open_wronly is used in any cases.

val with_out_a : + ?mode:int -> + ?flags:open_flag list -> string -> (out_channel -> 'a) -> - 'a

Like with_out but with the [Open_append; Open_creat; Open_wronly] flags activated, to append to the file.

  • raises Sys_error

    in case of error (same as open_out and close_out).

val write_line : out_channel -> string -> unit

Write the given string on the channel, followed by "\n".

val write_gen : ?sep:string -> out_channel -> string gen -> unit

Write the given strings on the output. If provided, add sep between every two strings (but not at the end).

val write_seq : ?sep:string -> out_channel -> string Stdlib.Seq.t -> unit

Write the given strings on the output. If provided, add sep between every two strings (but not at the end).

  • since 3.5
val write_lines : out_channel -> string gen -> unit

Write every string on the output, followed by "\n".

val write_lines_iter : out_channel -> string iter -> unit

Write every string on the output, followed by "\n".

  • since 3.6
val write_lines_seq : out_channel -> string Stdlib.Seq.t -> unit

Write every string on the output, followed by "\n".

  • since 3.5
val write_lines_l : out_channel -> string list -> unit

Both

val with_in_out : - ?mode:int -> - ?flags:open_flag list -> + 'a

Like with_out but with the [Open_append; Open_creat; Open_wronly] flags activated, to append to the file.

  • raises Sys_error

    in case of error (same as open_out and close_out).

val write_line : out_channel -> string -> unit

Write the given string on the channel, followed by "\n".

val write_gen : ?sep:string -> out_channel -> string gen -> unit

Write the given strings on the output. If provided, add sep between every two strings (but not at the end).

val write_seq : ?sep:string -> out_channel -> string Stdlib.Seq.t -> unit

Write the given strings on the output. If provided, add sep between every two strings (but not at the end).

  • since 3.5
val write_lines : out_channel -> string gen -> unit

Write every string on the output, followed by "\n".

val write_lines_iter : out_channel -> string iter -> unit

Write every string on the output, followed by "\n".

  • since 3.6
val write_lines_seq : out_channel -> string Stdlib.Seq.t -> unit

Write every string on the output, followed by "\n".

  • since 3.5
val write_lines_l : out_channel -> string list -> unit

Both

val with_in_out : + ?mode:int -> + ?flags:open_flag list -> string -> (in_channel -> out_channel -> 'a) -> - 'a

Combines with_in and with_out.

  • parameter flags

    opening flags (default [Open_creat]).

  • raises Sys_error

    in case of error.

  • since 0.12
val copy_into : ?bufsize:int -> in_channel -> out_channel -> unit

copy_into ic oc writes the content of ic into oc. It is a blocking call.

  • since 3.0

Misc for Generators

val tee : ('a -> unit) list -> 'a gen -> 'a gen

tee funs gen behaves like gen, but each element is given to every function f in funs at the time the element is produced. The returned generator will raise any exception that f raises

File and file names

How to list recursively files in a directory:

# let files = CCIO.File.read_dir ~recurse:true (CCIO.File.make "/tmp");;
+  'a

Combines with_in and with_out.

  • parameter flags

    opening flags (default [Open_creat]).

  • raises Sys_error

    in case of error.

  • since 0.12
val copy_into : ?bufsize:int -> in_channel -> out_channel -> unit

copy_into ic oc writes the content of ic into oc. It is a blocking call.

  • since 3.0

Misc for Generators

val tee : ('a -> unit) list -> 'a gen -> 'a gen

tee funs gen behaves like gen, but each element is given to every function f in funs at the time the element is produced. The returned generator will raise any exception that f raises

File and file names

How to list recursively files in a directory:

# let files = CCIO.File.read_dir ~recurse:true (CCIO.File.make "/tmp");;
 # CCIO.write_lines stdout files;;

See File.walk if you also need to list directories:

# let content = CCIO.File.walk (CCIO.File.make "/tmp");;
-# Gen.map CCIO.File.show_walk_item content |> CCIO.write_lines stdout;;
module File : sig ... end
\ No newline at end of file +# Gen.map CCIO.File.show_walk_item content |> CCIO.write_lines stdout;;
module File : sig ... end
diff --git a/dev/containers/CCInt/Infix/index.html b/dev/containers/CCInt/Infix/index.html index b14d8271..30f0c140 100644 --- a/dev/containers/CCInt/Infix/index.html +++ b/dev/containers/CCInt/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCInt.Infix)

Module CCInt.Infix

val (=) : t -> t -> bool
  • since 0.17
val (<>) : t -> t -> bool
  • since 0.17
val (<) : t -> t -> bool
  • since 0.17
val (>) : t -> t -> bool
  • since 0.17
val (<=) : t -> t -> bool
  • since 0.17
val (>=) : t -> t -> bool
  • since 0.17
val (--) : t -> t -> t iter

Alias to range.

  • since 1.2
val (--^) : t -> t -> t iter

Alias to range'.

  • since 1.2
val (+) : t -> t -> t
  • since 2.1
val (-) : t -> t -> t
  • since 2.1
val (~-) : t -> t
  • since 2.1
val (*) : t -> t -> t
  • since 2.1
val (/) : t -> t -> t
  • since 2.1
val (**) : t -> t -> t
  • since 2.4
val (mod) : t -> t -> t
  • since 2.1
val (land) : t -> t -> t
  • since 2.1
val (lor) : t -> t -> t
  • since 2.1
val (lxor) : t -> t -> t
  • since 2.1
val lnot : t -> t
  • since 2.1
val (lsl) : t -> int -> t
  • since 2.1
val (lsr) : t -> int -> t
  • since 2.1
val (asr) : t -> int -> t
  • since 2.1
\ No newline at end of file +Infix (containers.CCInt.Infix)

Module CCInt.Infix

val (=) : t -> t -> bool
  • since 0.17
val (<>) : t -> t -> bool
  • since 0.17
val (<) : t -> t -> bool
  • since 0.17
val (>) : t -> t -> bool
  • since 0.17
val (<=) : t -> t -> bool
  • since 0.17
val (>=) : t -> t -> bool
  • since 0.17
val (--) : t -> t -> t iter

Alias to range.

  • since 1.2
val (--^) : t -> t -> t iter

Alias to range'.

  • since 1.2
val (+) : t -> t -> t
  • since 2.1
val (-) : t -> t -> t
  • since 2.1
val (~-) : t -> t
  • since 2.1
val (*) : t -> t -> t
  • since 2.1
val (/) : t -> t -> t
  • since 2.1
val (**) : t -> t -> t
  • since 2.4
val (mod) : t -> t -> t
  • since 2.1
val (land) : t -> t -> t
  • since 2.1
val (lor) : t -> t -> t
  • since 2.1
val (lxor) : t -> t -> t
  • since 2.1
val lnot : t -> t
  • since 2.1
val (lsl) : t -> int -> t
  • since 2.1
val (lsr) : t -> int -> t
  • since 2.1
val (asr) : t -> int -> t
  • since 2.1
diff --git a/dev/containers/CCInt/index.html b/dev/containers/CCInt/index.html index 79007079..12e2202b 100644 --- a/dev/containers/CCInt/index.html +++ b/dev/containers/CCInt/index.html @@ -1,2 +1,2 @@ -CCInt (containers.CCInt)

Module CCInt

Basic Int functions

Integers

Predicates and comparisons

Converting

type t = int
val zero : t

zero is the integer 0.

  • since 3.0
val one : t

one is the integer 1.

  • since 3.0
val minus_one : t

minus_one is the integer -1.

  • since 3.0
val add : t -> t -> t

add x y is x + y.

  • since 3.0
val sub : t -> t -> t

sub x y is x - y.

  • since 3.0
val mul : t -> t -> t

mul x y is x * y.

  • since 3.0
val div : t -> t -> t

div x y is x / y

  • since 3.0
val succ : t -> t

succ x is x + 1.

  • since 3.0
val pred : t -> t

pred x is x - 1.

  • since 3.0
val abs : t -> t

abs x is the absolute value of x. It is x if x is positive and neg x otherwise.

  • since 3.0
val max_int : t

max_int is the maximum integer.

  • since 3.0
val min_int : t

min_int is the minimum integer.

  • since 3.0
val compare : t -> t -> int

compare x y is the comparison function for integers with the same specification as Stdlib.compare.

val equal : t -> t -> bool

equal x y is true iff x and y are equal. Equality function for integers.

val hash : t -> int

hash x computes the hash of x.

val sign : t -> int

sign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x 0.

val neg : t -> t

neg x is - x. Unary negation.

  • since 0.5
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.

  • since 0.11
val floor_div : t -> t -> t

floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.

  • since 1.2
val rem : t -> t -> t

rem x n is the remainder of dividing x by n, with the same sign as n.

  • since 1.2
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a iter = ('a -> unit) -> unit
val random : int -> t random_gen
val random_small : t random_gen
val random_range : int -> int -> t random_gen
val pp : t printer

pp ppf x prints the integer x on ppf.

val to_float : t -> float

to_float is the same as float_of_int

  • since 3.0
val to_string : t -> string

to_string x returns the string representation of the integer x, in signed decimal.

  • since 0.13
val of_string : string -> t option

of_string s converts the given string s into an integer. Safe version of of_string_exn.

  • since 0.13
val of_string_exn : string -> t

of_string_exn s converts the given string s to an integer. Alias to int_of_string.

  • raises Failure

    in case of failure.

  • since 3.0
val of_float : float -> t

of_float x converts the given floating-point number x to an integer. Alias to int_of_float.

  • since 3.0
val pp_binary : t printer

pp_binary ppf x prints x on ppf. Print as "0b00101010".

  • since 0.20
val to_string_binary : t -> string

to_string_binary x returns the string representation of the integer x, in binary.

  • since 0.20
val min : t -> t -> t

min x y returns the minimum of the two integers x and y.

  • since 0.17
val max : t -> t -> t

max x y returns the maximum of the two integers x and y.

  • since 0.17
val range_by : step:t -> t -> t -> t iter

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 1.2
val range : t -> t -> t iter

range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.

  • since 1.2
val range' : t -> t -> t iter

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].

  • since 1.2
val popcount : t -> int

Number of bits set to 1

  • since 3.0
val logand : t -> t -> t

logand is the same as (land).

  • since 3.0
val logor : t -> t -> t

logand is the same as (lor).

  • since 3.0
val logxor : t -> t -> t

logxor is the same as (lxor).

  • since 3.0
val lognot : t -> t

logand is the same as lnot.

  • since 3.0
val shift_left : t -> int -> t

shift_left is the same as (lsl).

  • since 3.0
val shift_right : t -> int -> t

shift_right is the same as (asr).

  • since 3.0
val shift_right_logical : t -> int -> t

shift_right_logical is the same as (lsr).

  • since 3.0

Infix Operators

module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 0.17
val (<>) : t -> t -> bool
  • since 0.17
val (<) : t -> t -> bool
  • since 0.17
val (>) : t -> t -> bool
  • since 0.17
val (<=) : t -> t -> bool
  • since 0.17
val (>=) : t -> t -> bool
  • since 0.17
val (--) : t -> t -> t iter

Alias to range.

  • since 1.2
val (--^) : t -> t -> t iter

Alias to range'.

  • since 1.2
val (+) : t -> t -> t
  • since 2.1
val (-) : t -> t -> t
  • since 2.1
val (~-) : t -> t
  • since 2.1
val (*) : t -> t -> t
  • since 2.1
val (/) : t -> t -> t
  • since 2.1
val (**) : t -> t -> t
  • since 2.4
val (mod) : t -> t -> t
  • since 2.1
val (land) : t -> t -> t
  • since 2.1
val (lor) : t -> t -> t
  • since 2.1
val (lxor) : t -> t -> t
  • since 2.1
val lnot : t -> t
  • since 2.1
val (lsl) : t -> int -> t
  • since 2.1
val (lsr) : t -> int -> t
  • since 2.1
val (asr) : t -> int -> t
  • since 2.1
\ No newline at end of file +CCInt (containers.CCInt)

Module CCInt

Basic Int functions

Integers

Predicates and comparisons

Converting

type t = int
val zero : t

zero is the integer 0.

  • since 3.0
val one : t

one is the integer 1.

  • since 3.0
val minus_one : t

minus_one is the integer -1.

  • since 3.0
val add : t -> t -> t

add x y is x + y.

  • since 3.0
val sub : t -> t -> t

sub x y is x - y.

  • since 3.0
val mul : t -> t -> t

mul x y is x * y.

  • since 3.0
val div : t -> t -> t

div x y is x / y

  • since 3.0
val succ : t -> t

succ x is x + 1.

  • since 3.0
val pred : t -> t

pred x is x - 1.

  • since 3.0
val abs : t -> t

abs x is the absolute value of x. It is x if x is positive and neg x otherwise.

  • since 3.0
val max_int : t

max_int is the maximum integer.

  • since 3.0
val min_int : t

min_int is the minimum integer.

  • since 3.0
val compare : t -> t -> int

compare x y is the comparison function for integers with the same specification as Stdlib.compare.

val equal : t -> t -> bool

equal x y is true iff x and y are equal. Equality function for integers.

val hash : t -> int

hash x computes the hash of x.

val sign : t -> int

sign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x 0.

val neg : t -> t

neg x is - x. Unary negation.

  • since 0.5
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.

  • since 0.11
val floor_div : t -> t -> t

floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.

  • since 1.2
val rem : t -> t -> t

rem x n is the remainder of dividing x by n, with the same sign as n.

  • since 1.2
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a iter = ('a -> unit) -> unit
val random : int -> t random_gen
val random_small : t random_gen
val random_range : int -> int -> t random_gen
val pp : t printer

pp ppf x prints the integer x on ppf.

val to_float : t -> float

to_float is the same as float_of_int

  • since 3.0
val to_string : t -> string

to_string x returns the string representation of the integer x, in signed decimal.

  • since 0.13
val of_string : string -> t option

of_string s converts the given string s into an integer. Safe version of of_string_exn.

  • since 0.13
val of_string_exn : string -> t

of_string_exn s converts the given string s to an integer. Alias to int_of_string.

  • raises Failure

    in case of failure.

  • since 3.0
val of_float : float -> t

of_float x converts the given floating-point number x to an integer. Alias to int_of_float.

  • since 3.0
val pp_binary : t printer

pp_binary ppf x prints x on ppf. Print as "0b00101010".

  • since 0.20
val to_string_binary : t -> string

to_string_binary x returns the string representation of the integer x, in binary.

  • since 0.20
val min : t -> t -> t

min x y returns the minimum of the two integers x and y.

  • since 0.17
val max : t -> t -> t

max x y returns the maximum of the two integers x and y.

  • since 0.17
val range_by : step:t -> t -> t -> t iter

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 1.2
val range : t -> t -> t iter

range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.

  • since 1.2
val range' : t -> t -> t iter

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].

  • since 1.2
val popcount : t -> int

Number of bits set to 1

  • since 3.0
val logand : t -> t -> t

logand is the same as (land).

  • since 3.0
val logor : t -> t -> t

logand is the same as (lor).

  • since 3.0
val logxor : t -> t -> t

logxor is the same as (lxor).

  • since 3.0
val lognot : t -> t

logand is the same as lnot.

  • since 3.0
val shift_left : t -> int -> t

shift_left is the same as (lsl).

  • since 3.0
val shift_right : t -> int -> t

shift_right is the same as (asr).

  • since 3.0
val shift_right_logical : t -> int -> t

shift_right_logical is the same as (lsr).

  • since 3.0

Infix Operators

module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 0.17
val (<>) : t -> t -> bool
  • since 0.17
val (<) : t -> t -> bool
  • since 0.17
val (>) : t -> t -> bool
  • since 0.17
val (<=) : t -> t -> bool
  • since 0.17
val (>=) : t -> t -> bool
  • since 0.17
val (--) : t -> t -> t iter

Alias to range.

  • since 1.2
val (--^) : t -> t -> t iter

Alias to range'.

  • since 1.2
val (+) : t -> t -> t
  • since 2.1
val (-) : t -> t -> t
  • since 2.1
val (~-) : t -> t
  • since 2.1
val (*) : t -> t -> t
  • since 2.1
val (/) : t -> t -> t
  • since 2.1
val (**) : t -> t -> t
  • since 2.4
val (mod) : t -> t -> t
  • since 2.1
val (land) : t -> t -> t
  • since 2.1
val (lor) : t -> t -> t
  • since 2.1
val (lxor) : t -> t -> t
  • since 2.1
val lnot : t -> t
  • since 2.1
val (lsl) : t -> int -> t
  • since 2.1
val (lsr) : t -> int -> t
  • since 2.1
val (asr) : t -> int -> t
  • since 2.1
diff --git a/dev/containers/CCInt32/Infix/index.html b/dev/containers/CCInt32/Infix/index.html index a2ac67bc..b311ab33 100644 --- a/dev/containers/CCInt32/Infix/index.html +++ b/dev/containers/CCInt32/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCInt32.Infix)

Module CCInt32.Infix

val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 32.

val (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
\ No newline at end of file +Infix (containers.CCInt32.Infix)

Module CCInt32.Infix

val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 32.

val (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
diff --git a/dev/containers/CCInt32/index.html b/dev/containers/CCInt32/index.html index 0a2bd7b2..693b3f14 100644 --- a/dev/containers/CCInt32/index.html +++ b/dev/containers/CCInt32/index.html @@ -1,2 +1,2 @@ -CCInt32 (containers.CCInt32)

Module CCInt32

Helpers for 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.

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.0
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.0
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

Return the absolute value of its argument.

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.0
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 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.0
val equal : t -> t -> bool

The equal function for int32s.

  • since 4.03.0
val min : t -> t -> t

min x y returns the minimum of the two integers x and y.

  • since 3.0
val max : t -> t -> t

max x y returns the maximum of the two integers x and y.

  • since 3.0
val hash : t -> int

hash x computes the hash of x. Like Stdlib.abs(to_intx).

val sign : t -> int

sign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x zero.

  • since 3.0
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.

  • since 0.11
val popcount : t -> int

Number of bits set to 1.

  • since 3.9
val floor_div : t -> t -> t

floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.

  • since 3.0
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a iter = ('a -> unit) -> unit
val range_by : step:t -> t -> t -> t iter

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 3.0
val range : t -> t -> t iter

range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.

  • since 3.0
val range' : t -> t -> t iter

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].

  • since 3.0
val random : t -> t random_gen
val random_small : t random_gen
val random_range : t -> t -> t random_gen

Conversion

val of_string : string -> t option

of_string s is the safe version of of_string_exn. Like of_string_exn, but return None instead of raising.

val of_string_opt : string -> t option

of_string_opt s is an alias to of_string.

val of_string_exn : string -> t

of_string_exn s converts the given string s into a 32-bit integer. Alias to Int32.of_string. 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*CCInt32.max_int+1]. If the input exceeds CCInt32.max_int it is converted to the signed integer CCInt32.min_int + input - CCInt32.max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored. Raise Failure "Int32.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 int32.

val to_string_binary : t -> string

to_string_binary x returns the string representation of the integer x, in binary.

  • since 3.0

Printing

val pp : t printer

pp ppf x prints the integer x on ppf.

  • since 3.0
val pp_binary : t printer

pp_binary ppf x prints x on ppf. Print as "0b00101010".

  • since 3.0

Infix Operators

module Infix : sig ... end
include module type of Infix
val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 32.

val (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
\ No newline at end of file +CCInt32 (containers.CCInt32)

Module CCInt32

Helpers for 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.

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.0
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.0
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

Return the absolute value of its argument.

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.0
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 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.0
val equal : t -> t -> bool

The equal function for int32s.

  • since 4.03.0
val min : t -> t -> t

min x y returns the minimum of the two integers x and y.

  • since 3.0
val max : t -> t -> t

max x y returns the maximum of the two integers x and y.

  • since 3.0
val hash : t -> int

hash x computes the hash of x. Like Stdlib.abs(to_intx).

val sign : t -> int

sign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x zero.

  • since 3.0
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.

  • since 0.11
val popcount : t -> int

Number of bits set to 1.

  • since 3.9
val floor_div : t -> t -> t

floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.

  • since 3.0
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a iter = ('a -> unit) -> unit
val range_by : step:t -> t -> t -> t iter

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 3.0
val range : t -> t -> t iter

range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.

  • since 3.0
val range' : t -> t -> t iter

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].

  • since 3.0
val random : t -> t random_gen
val random_small : t random_gen
val random_range : t -> t -> t random_gen

Conversion

val of_string : string -> t option

of_string s is the safe version of of_string_exn. Like of_string_exn, but return None instead of raising.

val of_string_opt : string -> t option

of_string_opt s is an alias to of_string.

val of_string_exn : string -> t

of_string_exn s converts the given string s into a 32-bit integer. Alias to Int32.of_string. 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*CCInt32.max_int+1]. If the input exceeds CCInt32.max_int it is converted to the signed integer CCInt32.min_int + input - CCInt32.max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored. Raise Failure "Int32.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 int32.

val to_string_binary : t -> string

to_string_binary x returns the string representation of the integer x, in binary.

  • since 3.0

Printing

val pp : t printer

pp ppf x prints the integer x on ppf.

  • since 3.0
val pp_binary : t printer

pp_binary ppf x prints x on ppf. Print as "0b00101010".

  • since 3.0

Infix Operators

module Infix : sig ... end
include module type of Infix
val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 32.

val (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
diff --git a/dev/containers/CCInt64/Infix/index.html b/dev/containers/CCInt64/Infix/index.html index affab1cc..c9814c00 100644 --- a/dev/containers/CCInt64/Infix/index.html +++ b/dev/containers/CCInt64/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCInt64.Infix)

Module CCInt64.Infix

val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 64.

val (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
\ No newline at end of file +Infix (containers.CCInt64.Infix)

Module CCInt64.Infix

val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 64.

val (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
diff --git a/dev/containers/CCInt64/index.html b/dev/containers/CCInt64/index.html index 77cab934..129c57f3 100644 --- a/dev/containers/CCInt64/index.html +++ b/dev/containers/CCInt64/index.html @@ -1,2 +1,2 @@ -CCInt64 (containers.CCInt64)

Module CCInt64

Helpers for 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.

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.0
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.0
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

Return the absolute value of its argument.

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.0
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 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.0
val equal : t -> t -> bool

The equal function for int64s.

  • since 4.03.0
val min : t -> t -> t

min x y returns the minimum of the two integers x and y.

  • since 3.0
val max : t -> t -> t

max x y returns the maximum of the two integers x and y.

  • since 3.0
val hash : t -> int

hash x computes the hash of x, a non-negative integer. Uses FNV since 3.10

val hash_to_int64 : t -> t

Like hash but does not truncate. Uses FNV.

  • since 3.10
val popcount : t -> int

Number of bits set to 1.

  • since 3.9
val sign : t -> int

sign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x zero.

  • since 3.0
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.

  • since 0.11
val floor_div : t -> t -> t

floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.

  • since 3.0
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a iter = ('a -> unit) -> unit
val range_by : step:t -> t -> t -> t iter

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 3.0
val range : t -> t -> t iter

range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.

  • since 3.0
val range' : t -> t -> t iter

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].

  • since 3.0
val random : t -> t random_gen
val random_small : t random_gen
val random_range : t -> t -> t random_gen

Conversion

val of_string : string -> t option

of_string s is the safe version of of_string_exn. Like of_string_exn, but return None instead of raising.

val of_string_opt : string -> t option

of_string_opt s is an alias to of_string.

  • since 2.1
val of_string_exn : string -> t

of_string_exn s converts the given string s into a 64-bit integer. Alias to Int64.of_string. 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*CCInt64.max_int+1]. If the input exceeds CCInt64.max_int it is converted to the signed integer CCInt64.min_int + input - CCInt64.max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored. Raise Failure "Int64.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 int64.

val to_string_binary : t -> string

to_string_binary x returns the string representation of the integer x, in binary.

  • since 3.0

Printing

val pp : t printer

pp ppf x prints the integer x on ppf.

  • since 3.0
val pp_binary : t printer

pp_binary ppf x prints x on ppf. Print as "0b00101010".

  • since 3.0

Infix Operators

Infix operators

module Infix : sig ... end
include module type of Infix
val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 64.

val (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
\ No newline at end of file +CCInt64 (containers.CCInt64)

Module CCInt64

Helpers for 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.

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.0
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.0
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

Return the absolute value of its argument.

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.0
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 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.0
val equal : t -> t -> bool

The equal function for int64s.

  • since 4.03.0
val min : t -> t -> t

min x y returns the minimum of the two integers x and y.

  • since 3.0
val max : t -> t -> t

max x y returns the maximum of the two integers x and y.

  • since 3.0
val hash : t -> int

hash x computes the hash of x, a non-negative integer. Uses FNV since 3.10

val hash_to_int64 : t -> t

Like hash but does not truncate. Uses FNV.

  • since 3.10
val popcount : t -> int

Number of bits set to 1.

  • since 3.9
val sign : t -> int

sign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x zero.

  • since 3.0
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.

  • since 0.11
val floor_div : t -> t -> t

floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.

  • since 3.0
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a iter = ('a -> unit) -> unit
val range_by : step:t -> t -> t -> t iter

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 3.0
val range : t -> t -> t iter

range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.

  • since 3.0
val range' : t -> t -> t iter

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].

  • since 3.0
val random : t -> t random_gen
val random_small : t random_gen
val random_range : t -> t -> t random_gen

Conversion

val of_string : string -> t option

of_string s is the safe version of of_string_exn. Like of_string_exn, but return None instead of raising.

val of_string_opt : string -> t option

of_string_opt s is an alias to of_string.

  • since 2.1
val of_string_exn : string -> t

of_string_exn s converts the given string s into a 64-bit integer. Alias to Int64.of_string. 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*CCInt64.max_int+1]. If the input exceeds CCInt64.max_int it is converted to the signed integer CCInt64.min_int + input - CCInt64.max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored. Raise Failure "Int64.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 int64.

val to_string_binary : t -> string

to_string_binary x returns the string representation of the integer x, in binary.

  • since 3.0

Printing

val pp : t printer

pp ppf x prints the integer x on ppf.

  • since 3.0
val pp_binary : t printer

pp_binary ppf x prints x on ppf. Print as "0b00101010".

  • since 3.0

Infix Operators

Infix operators

module Infix : sig ... end
include module type of Infix
val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits, filling in with zeroes. The result is unspecified if y < 0 or y >= 64.

val (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
diff --git a/dev/containers/CCList/Assoc/index.html b/dev/containers/CCList/Assoc/index.html index 1014f482..0b3defd4 100644 --- a/dev/containers/CCList/Assoc/index.html +++ b/dev/containers/CCList/Assoc/index.html @@ -1,7 +1,7 @@ -Assoc (containers.CCList.Assoc)

Module CCList.Assoc

type ('a, 'b) t = ('a * 'b) list
val get : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b option

get ~eq k alist returns Some v if the given key k is present into alist, or None if not present.

val get_exn : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b

get_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.

  • raises Not_found

    if the element is not present.

val set : eq:('a -> 'a -> bool) -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t

set ~eq k v alist adds the binding k, v into the list alist (erase it if already present).

val mem : ?eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool

mem ?eq k alist returns true iff k is a key in alist.

  • since 0.16
val update : - eq:('a -> 'a -> bool) -> - f:('b option -> 'b option) -> +Assoc (containers.CCList.Assoc)

Module CCList.Assoc

type ('a, 'b) t = ('a * 'b) list
val get : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b option

get ~eq k alist returns Some v if the given key k is present into alist, or None if not present.

val get_exn : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b

get_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.

  • raises Not_found

    if the element is not present.

val set : eq:('a -> 'a -> bool) -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t

set ~eq k v alist adds the binding k, v into the list alist (erase it if already present).

val mem : ?eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool

mem ?eq k alist returns true iff k is a key in alist.

  • since 0.16
val update : + eq:('a -> 'a -> bool) -> + f:('b option -> 'b option) -> 'a -> ('a, 'b) t -> - ('a, 'b) t

update ~eq ~f k alist updates alist on the key k, by calling f (get k alist) and removing k if it returns None, mapping k to v' if it returns Some v'.

  • since 0.16
val remove : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> ('a, 'b) t

remove ~eq k alist returns the alist without the first pair with key k, if any.

  • since 0.17
val keys : ('a, 'b) t -> 'a list

keys alist returns a list of all keys of alist.

  • since 3.8
val values : ('a, 'b) t -> 'b list

values alist returns a list of all values of alist.

  • since 3.8
val map_values : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t

map_values f alist applies function f to all values of alist.

  • since 3.8
\ No newline at end of file + ('a, 'b) t

update ~eq ~f k alist updates alist on the key k, by calling f (get k alist) and removing k if it returns None, mapping k to v' if it returns Some v'.

  • since 0.16
val remove : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> ('a, 'b) t

remove ~eq k alist returns the alist without the first pair with key k, if any.

  • since 0.17
val keys : ('a, 'b) t -> 'a list

keys alist returns a list of all keys of alist.

  • since 3.8
val values : ('a, 'b) t -> 'b list

values alist returns a list of all values of alist.

  • since 3.8
val map_values : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t

map_values f alist applies function f to all values of alist.

  • since 3.8
diff --git a/dev/containers/CCList/Infix/index.html b/dev/containers/CCList/Infix/index.html index 8221d20a..b33e425b 100644 --- a/dev/containers/CCList/Infix/index.html +++ b/dev/containers/CCList/Infix/index.html @@ -1,9 +1,9 @@ -Infix (containers.CCList.Infix)

Module CCList.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

l >|= f is the infix version of map with reversed arguments.

val (@) : 'a t -> 'a t -> 'a t

l1 @ l2 concatenates two lists l1 and l2. As append.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

funs <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> l is like map.

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

l >>= f is flat_map f l.

val (--) : int -> int -> int t

i -- j is the infix alias for range. Bounds included.

val (--^) : int -> int -> int t

i --^ j is the infix alias for range'. Second bound j excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
val and& : 'a list -> 'b list -> ('a * 'b) list

(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.

# let f xs ys zs =
+Infix (containers.CCList.Infix)

Module CCList.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

l >|= f is the infix version of map with reversed arguments.

val (@) : 'a t -> 'a t -> 'a t

l1 @ l2 concatenates two lists l1 and l2. As append.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

funs <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> l is like map.

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

l >>= f is flat_map f l.

val (--) : int -> int -> int t

i -- j is the infix alias for range. Bounds included.

val (--^) : int -> int -> int t

i --^ j is the infix alias for range'. Second bound j excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
val and& : 'a list -> 'b list -> ('a * 'b) list

(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.

# let f xs ys zs =
     let+ x = xs
     and& y = ys
     and& z = zs in
     x + y + z;;
 val f : int list -> int list -> int list -> int list = <fun>
 # f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]
  • since 3.1
\ No newline at end of file +- : int list = [16; 18]
  • since 3.1
diff --git a/dev/containers/CCList/Ref/index.html b/dev/containers/CCList/Ref/index.html index 9c5765b9..a5ce88f0 100644 --- a/dev/containers/CCList/Ref/index.html +++ b/dev/containers/CCList/Ref/index.html @@ -1,2 +1,2 @@ -Ref (containers.CCList.Ref)

Module CCList.Ref

type 'a t = 'a list ref
val push : 'a t -> 'a -> unit

push rlist e adds an element e at the head of rlist.

val pop : 'a t -> 'a option

pop rlist removes and returns Some e (the first element of rlist) or None if the rlist is empty

val pop_exn : 'a t -> 'a

pop_exn rlist removes and returns the first element of rlist. Unsafe version of pop.

  • raises Failure

    if the list is empty.

val create : unit -> 'a t

create () creates a new empty reference list.

val clear : _ t -> unit

clear rlist removes all elements of rlist.

val lift : ('a list -> 'b) -> 'a t -> 'b

lift f rlist applies a list function f to the content of rlist.

val push_list : 'a t -> 'a list -> unit

push_list rlist l adds elements of the list l at the beginning of the list ref rlist. Elements at the end of the list l will be at the beginning of the list ref rlist.

\ No newline at end of file +Ref (containers.CCList.Ref)

Module CCList.Ref

type 'a t = 'a list ref
val push : 'a t -> 'a -> unit

push rlist e adds an element e at the head of rlist.

val pop : 'a t -> 'a option

pop rlist removes and returns Some e (the first element of rlist) or None if the rlist is empty

val pop_exn : 'a t -> 'a

pop_exn rlist removes and returns the first element of rlist. Unsafe version of pop.

  • raises Failure

    if the list is empty.

val create : unit -> 'a t

create () creates a new empty reference list.

val clear : _ t -> unit

clear rlist removes all elements of rlist.

val lift : ('a list -> 'b) -> 'a t -> 'b

lift f rlist applies a list function f to the content of rlist.

val push_list : 'a t -> 'a list -> unit

push_list rlist l adds elements of the list l at the beginning of the list ref rlist. Elements at the end of the list l will be at the beginning of the list ref rlist.

diff --git a/dev/containers/CCList/Traverse/argument-1-M/index.html b/dev/containers/CCList/Traverse/argument-1-M/index.html index 74fa69ee..8246fc33 100644 --- a/dev/containers/CCList/Traverse/argument-1-M/index.html +++ b/dev/containers/CCList/Traverse/argument-1-M/index.html @@ -1,2 +1,2 @@ -M (containers.CCList.Traverse.M)

Parameter Traverse.M

type 'a t
val return : 'a -> 'a t

return is the Monadic return.

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

(>>=) is the Monadic bind.

\ No newline at end of file +M (containers.CCList.Traverse.M)

Parameter Traverse.M

type 'a t
val return : 'a -> 'a t

return is the Monadic return.

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

(>>=) is the Monadic bind.

diff --git a/dev/containers/CCList/Traverse/index.html b/dev/containers/CCList/Traverse/index.html index e5f8f267..c3dcbd21 100644 --- a/dev/containers/CCList/Traverse/index.html +++ b/dev/containers/CCList/Traverse/index.html @@ -1,2 +1,2 @@ -Traverse (containers.CCList.Traverse)

Module CCList.Traverse

Monadic Traverse

This allows the traversal of a 'a t list where _ t is also a monad.

For example, a 'a option list will be traversed by extracting a value from each option, returning Some [x1;โ€ฆ;x_n]; but if one of the option is None then the whole result is None.

Another example is with result: ('a, 'err) result list can be transformed into ('a list, 'err) result by returning the first error, or Ok [x1; โ€ฆ; xn] if all the elements were successful.

This describes the behavior of sequence_m; map_m is a combination of map and sequence_m; map_m_par is like map_m but useful for some pseudo monads like Lwt.

Parameters

module M : MONAD

Signature

val sequence_m : 'a M.t t -> 'a t M.t

Traverse the list of monadic values using M.(>>=), re-combining elements with (::). See the documentation of the Traverse functor itself.

val fold_m : ('b -> 'a -> 'b M.t) -> 'b -> 'a t -> 'b M.t

Fold a function with a monadic effect through a list.

val map_m : ('a -> 'b M.t) -> 'a t -> 'b t M.t

Combination of map and sequence_m.

val map_m_par : ('a -> 'b M.t) -> 'a t -> 'b t M.t

map_m_par f (x :: l) is like map_m but f x and f l are evaluated "in parallel" before combining their result (for instance in Lwt).

Basically, when encoutering x :: tl, this computes f x and map_m_par f tl, and only then is M.(>>=) used to combine the two results into a new list.

\ No newline at end of file +Traverse (containers.CCList.Traverse)

Module CCList.Traverse

Monadic Traverse

This allows the traversal of a 'a t list where _ t is also a monad.

For example, a 'a option list will be traversed by extracting a value from each option, returning Some [x1;โ€ฆ;x_n]; but if one of the option is None then the whole result is None.

Another example is with result: ('a, 'err) result list can be transformed into ('a list, 'err) result by returning the first error, or Ok [x1; โ€ฆ; xn] if all the elements were successful.

This describes the behavior of sequence_m; map_m is a combination of map and sequence_m; map_m_par is like map_m but useful for some pseudo monads like Lwt.

Parameters

module M : MONAD

Signature

val sequence_m : 'a M.t t -> 'a t M.t

Traverse the list of monadic values using M.(>>=), re-combining elements with (::). See the documentation of the Traverse functor itself.

val fold_m : ('b -> 'a -> 'b M.t) -> 'b -> 'a t -> 'b M.t

Fold a function with a monadic effect through a list.

val map_m : ('a -> 'b M.t) -> 'a t -> 'b t M.t

Combination of map and sequence_m.

val map_m_par : ('a -> 'b M.t) -> 'a t -> 'b t M.t

map_m_par f (x :: l) is like map_m but f x and f l are evaluated "in parallel" before combining their result (for instance in Lwt).

Basically, when encoutering x :: tl, this computes f x and map_m_par f tl, and only then is M.(>>=) used to combine the two results into a new list.

diff --git a/dev/containers/CCList/index.html b/dev/containers/CCList/index.html index 7a8e20e2..d2a4b15a 100644 --- a/dev/containers/CCList/index.html +++ b/dev/containers/CCList/index.html @@ -1,19 +1,19 @@ -CCList (containers.CCList)

Module CCList

Complements to List

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val length : 'a list -> int

Return the length (number of elements) of the given list.

val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03.0 (4.05.0 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 rev : 'a list -> 'a list

List reversal.

val append : 'a list -> 'a list -> 'a list

Concatenate two lists. Same function as the infix operator @. Not tail-recursive (length of the first argument). The @ operator is not tail-recursive either.

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, but rev_append is tail-recursive and more efficient.

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).

Comparison

Iterators

val iter : ('a -> unit) -> 'a list -> unit

iter f [a1; ...; an] applies function f in turn to a1; ...; an. It is equivalent to begin f a1; f a2; ...; f an; () end.

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. Not tail-recursive.

val rev_map : ('a -> 'b) -> 'a list -> 'b list

rev_map f l gives the same result as rev (map f l), but is tail-recursive and more efficient.

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.0
val fold_left_map : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11.0
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a

fold_left f init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b

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. Not tail-recursive.

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 tail-recursive and more efficient.

val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a

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 -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c

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 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 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.0
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.

Association lists

val assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

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_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

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 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

type +'a t = 'a list
val empty : 'a t

empty is [].

val is_empty : _ t -> bool

is_empty l returns true iff l = [].

  • since 0.11
val cons_maybe : 'a option -> 'a t -> 'a t

cons_maybe (Some x) l is x :: l. cons_maybe None l is l.

  • since 0.13
val cons' : 'a t -> 'a -> 'a t

cons' l x is the same as x :: l. This is convenient for fold functions such as List.fold_left or Array.fold_left.

  • since 3.3
val fold_while : ('a -> 'b -> 'a * [ `Stop | `Continue ]) -> 'a -> 'b t -> 'a

fold_while f init l folds until a stop condition via ('a, `Stop) is indicated by the accumulator.

  • since 0.8
val fold_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list

fold_map f init l is a fold_left-like function, but it also maps the list to another list.

  • since 0.14
val fold_map_i : +CCList (containers.CCList)

Module CCList

Complements to List

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val length : 'a list -> int

Return the length (number of elements) of the given list.

val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03.0 (4.05.0 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 rev : 'a list -> 'a list

List reversal.

val append : 'a list -> 'a list -> 'a list

Concatenate two lists. Same function as the infix operator @. Not tail-recursive (length of the first argument). The @ operator is not tail-recursive either.

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, but rev_append is tail-recursive and more efficient.

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).

Comparison

Iterators

val iter : ('a -> unit) -> 'a list -> unit

iter f [a1; ...; an] applies function f in turn to a1; ...; an. It is equivalent to begin f a1; f a2; ...; f an; () end.

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. Not tail-recursive.

val rev_map : ('a -> 'b) -> 'a list -> 'b list

rev_map f l gives the same result as rev (map f l), but is tail-recursive and more efficient.

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.0
val fold_left_map : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11.0
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a

fold_left f init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b

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. Not tail-recursive.

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 tail-recursive and more efficient.

val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a

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 -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c

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 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 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.0
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.

Association lists

val assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

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_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

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 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

type +'a t = 'a list
val empty : 'a t

empty is [].

val is_empty : _ t -> bool

is_empty l returns true iff l = [].

  • since 0.11
val cons_maybe : 'a option -> 'a t -> 'a t

cons_maybe (Some x) l is x :: l. cons_maybe None l is l.

  • since 0.13
val cons' : 'a t -> 'a -> 'a t

cons' l x is the same as x :: l. This is convenient for fold functions such as List.fold_left or Array.fold_left.

  • since 3.3
val fold_while : ('a -> 'b -> 'a * [ `Stop | `Continue ]) -> 'a -> 'b t -> 'a

fold_while f init l folds until a stop condition via ('a, `Stop) is indicated by the accumulator.

  • since 0.8
val fold_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list

fold_map f init l is a fold_left-like function, but it also maps the list to another list.

  • since 0.14
val fold_map_i : ('acc -> int -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list

fold_map_i f init l is a foldi-like function, but it also maps the list to another list.

  • since 2.8
val fold_on_map : - f:('a -> 'b) -> - reduce:('acc -> 'b -> 'acc) -> + f:('a -> 'b) -> + reduce:('acc -> 'b -> 'acc) -> 'acc -> 'a list -> - 'acc

fold_on_map ~f ~reduce init l combines map f and fold_left reduce init in one operation.

  • since 2.8
val scan_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc list

scan_left f init l returns the list [init; f init x0; f (f init x0) x1; โ€ฆ] where x0, x1, etc. are the elements of l.

  • since 1.2, but only
  • since 2.2 with labels
val reduce : ('a -> 'a -> 'a) -> 'a list -> 'a option

reduce f (hd::tl) returns Some (fold_left f hd tl). If l is empty, then None is returned.

  • since 3.2
val reduce_exn : ('a -> 'a -> 'a) -> 'a list -> 'a

reduce_exn is the unsafe version of reduce.

  • raises Invalid_argument

    if the given list is empty.

  • since 3.2
val fold_map2 : + 'acc

fold_on_map ~f ~reduce init l combines map f and fold_left reduce init in one operation.

  • since 2.8
val scan_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc list

scan_left f init l returns the list [init; f init x0; f (f init x0) x1; โ€ฆ] where x0, x1, etc. are the elements of l.

  • since 1.2, but only
  • since 2.2 with labels
val reduce : ('a -> 'a -> 'a) -> 'a list -> 'a option

reduce f (hd::tl) returns Some (fold_left f hd tl). If l is empty, then None is returned.

  • since 3.2
val reduce_exn : ('a -> 'a -> 'a) -> 'a list -> 'a

reduce_exn is the unsafe version of reduce.

  • raises Invalid_argument

    if the given list is empty.

  • since 3.2
val fold_map2 : ('acc -> 'a -> 'b -> 'acc * 'c) -> 'acc -> 'a list -> 'b list -> - 'acc * 'c list

fold_map2 f init l1 l2 is to fold_map what List.map2 is to List.map.

  • raises Invalid_argument

    if the lists do not have the same length.

  • since 0.16
val fold_filter_map : + 'acc * 'c list

fold_map2 f init l1 l2 is to fold_map what List.map2 is to List.map.

  • raises Invalid_argument

    if the lists do not have the same length.

  • since 0.16
val fold_filter_map : ('acc -> 'a -> 'acc * 'b option) -> 'acc -> 'a list -> @@ -29,7 +29,7 @@ ('acc -> int -> 'a -> 'acc * 'b list) -> 'acc -> 'a list -> - 'acc * 'b list

fold_flat_map_i f init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.

  • since 2.8
val count : ('a -> bool) -> 'a list -> int

count p l counts how many elements of l satisfy predicate p.

  • since 1.5, but only
  • since 2.2 with labels
val count_true_false : ('a -> bool) -> 'a list -> int * int

count_true_false p l returns a pair (int1,int2) where int1 is the number of elements in l that satisfy the predicate p, and int2 the number of elements that do not satisfy p.

  • since 2.4
val init : int -> (int -> 'a) -> 'a t

init len f is f 0; f 1; โ€ฆ; f (len-1).

  • raises Invalid_argument

    if len < 0.

  • since 0.6
val combine : 'a list -> 'b list -> ('a * 'b) list

combine [a1; โ€ฆ; an] [b1; โ€ฆ; bn] is [(a1,b1); โ€ฆ; (an,bn)]. Transform two lists into a list of pairs. Like List.combine but tail-recursive.

  • raises Invalid_argument

    if the lists have distinct lengths.

  • since 1.2, but only
  • since 2.2 with labels
val combine_gen : 'a list -> 'b list -> ('a * 'b) gen

combine_gen l1 l2 transforms two lists into a gen of pairs. Lazy version of combine. Unlike combine, it does not fail if the lists have different lengths; instead, the output has as many pairs as the smallest input list.

  • since 1.2, but only
  • since 2.2 with labels
val combine_shortest : 'a list -> 'b list -> ('a * 'b) list

combine_shortest [a1; โ€ฆ; am] [b1; โ€ฆ; bn] is [(a1,b1); โ€ฆ; (am,bm)] if m <= n. Like combine but stops at the shortest list rather than raising.

  • since 3.1
val split : ('a * 'b) t -> 'a t * 'b t

split [(a1,b1); โ€ฆ; (an,bn)] is ([a1; โ€ฆ; an], [b1; โ€ฆ; bn]). Transform a list of pairs into a pair of lists. A tail-recursive version of List.split.

  • since 1.2, but only
  • since 2.2 with labels
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare cmp l1 l2 compares the two lists l1 and l2 using the given comparison function cmp.

val compare_lengths : 'a t -> 'b t -> int

compare_lengths l1 l2 compare the lengths of the two lists l1 and l2. Equivalent to compare (length l1) (length l2) but more efficient.

  • since 1.5, but only
  • since 2.2 with labels
val compare_length_with : 'a t -> int -> int

compare_length_with l x compares the length of the list l to an integer x. Equivalent to compare (length l) x but more efficient.

  • since 1.5, but only
  • since 2.2 with labels
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal p l1 l2 returns true if l1 and l2 are equal.

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

flat_map f l maps and flattens at the same time (safe). Evaluation order is not guaranteed.

val flat_map_i : (int -> 'a -> 'b t) -> 'a t -> 'b t

flat_map_i f l maps with index and flattens at the same time (safe). Evaluation order is not guaranteed.

  • since 2.8
val flatten : 'a t t -> 'a t

flatten [l1]; [l2]; โ€ฆ concatenates a list of lists. Safe version of List.flatten.

val product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

product comb l1 l2 computes the cartesian product of the two lists, with the given combinator comb.

val fold_product : ('c -> 'a -> 'b -> 'c) -> 'c -> 'a t -> 'b t -> 'c

fold_product f init l1 l2 applies the function f with the accumulator init on all the pair of elements of l1 and l2. Fold on the cartesian product.

val cartesian_product : 'a t t -> 'a t t

cartesian_product [[l1]; [l2]; โ€ฆ; [ln]] produces the cartesian product of this list of lists, by returning all the ways of picking one element per sublist. NOTE the order of the returned list is unspecified. For example:

# cartesian_product [[1;2];[3];[4;5;6]] |> sort =
+  'acc * 'b list

fold_flat_map_i f init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.

  • since 2.8
val count : ('a -> bool) -> 'a list -> int

count p l counts how many elements of l satisfy predicate p.

  • since 1.5, but only
  • since 2.2 with labels
val count_true_false : ('a -> bool) -> 'a list -> int * int

count_true_false p l returns a pair (int1,int2) where int1 is the number of elements in l that satisfy the predicate p, and int2 the number of elements that do not satisfy p.

  • since 2.4
val init : int -> (int -> 'a) -> 'a t

init len f is f 0; f 1; โ€ฆ; f (len-1).

  • raises Invalid_argument

    if len < 0.

  • since 0.6
val combine : 'a list -> 'b list -> ('a * 'b) list

combine [a1; โ€ฆ; an] [b1; โ€ฆ; bn] is [(a1,b1); โ€ฆ; (an,bn)]. Transform two lists into a list of pairs. Like List.combine but tail-recursive.

  • raises Invalid_argument

    if the lists have distinct lengths.

  • since 1.2, but only
  • since 2.2 with labels
val combine_gen : 'a list -> 'b list -> ('a * 'b) gen

combine_gen l1 l2 transforms two lists into a gen of pairs. Lazy version of combine. Unlike combine, it does not fail if the lists have different lengths; instead, the output has as many pairs as the smallest input list.

  • since 1.2, but only
  • since 2.2 with labels
val combine_shortest : 'a list -> 'b list -> ('a * 'b) list

combine_shortest [a1; โ€ฆ; am] [b1; โ€ฆ; bn] is [(a1,b1); โ€ฆ; (am,bm)] if m <= n. Like combine but stops at the shortest list rather than raising.

  • since 3.1
val split : ('a * 'b) t -> 'a t * 'b t

split [(a1,b1); โ€ฆ; (an,bn)] is ([a1; โ€ฆ; an], [b1; โ€ฆ; bn]). Transform a list of pairs into a pair of lists. A tail-recursive version of List.split.

  • since 1.2, but only
  • since 2.2 with labels
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare cmp l1 l2 compares the two lists l1 and l2 using the given comparison function cmp.

val compare_lengths : 'a t -> 'b t -> int

compare_lengths l1 l2 compare the lengths of the two lists l1 and l2. Equivalent to compare (length l1) (length l2) but more efficient.

  • since 1.5, but only
  • since 2.2 with labels
val compare_length_with : 'a t -> int -> int

compare_length_with l x compares the length of the list l to an integer x. Equivalent to compare (length l) x but more efficient.

  • since 1.5, but only
  • since 2.2 with labels
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal p l1 l2 returns true if l1 and l2 are equal.

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

flat_map f l maps and flattens at the same time (safe). Evaluation order is not guaranteed.

val flat_map_i : (int -> 'a -> 'b t) -> 'a t -> 'b t

flat_map_i f l maps with index and flattens at the same time (safe). Evaluation order is not guaranteed.

  • since 2.8
val flatten : 'a t t -> 'a t

flatten [l1]; [l2]; โ€ฆ concatenates a list of lists. Safe version of List.flatten.

val product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

product comb l1 l2 computes the cartesian product of the two lists, with the given combinator comb.

val fold_product : ('c -> 'a -> 'b -> 'c) -> 'c -> 'a t -> 'b t -> 'c

fold_product f init l1 l2 applies the function f with the accumulator init on all the pair of elements of l1 and l2. Fold on the cartesian product.

val cartesian_product : 'a t t -> 'a t t

cartesian_product [[l1]; [l2]; โ€ฆ; [ln]] produces the cartesian product of this list of lists, by returning all the ways of picking one element per sublist. NOTE the order of the returned list is unspecified. For example:

# cartesian_product [[1;2];[3];[4;5;6]] |> sort =
 [[1;3;4];[1;3;5];[1;3;6];[2;3;4];[2;3;5];[2;3;6]];;
 # cartesian_product [[1;2];[];[4;5;6]] = [];;
 # cartesian_product [[1;2];[3];[4];[5];[6]] |> sort =
@@ -42,53 +42,53 @@
   'b list * 'c list

partition_filter_map f l maps f on l and gather results in lists:

  • if f x = `Left y, adds y to the first list.
  • if f x = `Right z, adds z to the second list.
  • if f x = `Drop, ignores x.
  • since 3.3
val partition_map : ('a -> [< `Left of 'b | `Right of 'c | `Drop ]) -> 'a list -> - 'b list * 'c list
  • since 0.11
val group_by : ?hash:('a -> int) -> ?eq:('a -> 'a -> bool) -> 'a t -> 'a list t

group_by ?hash ?eq l groups equal elements, regardless of their order of appearance. precondition: for any x and y, if eq x y then hash x=hash y must hold.

  • since 2.3
val join : join_row:('a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t

join ~join_row a b combines every element of a with every element of b using join_row. If join_row returns None, then the two elements do not combine. Assume that b allows for multiple iterations.

  • since 2.3
val join_by : - ?eq:('key -> 'key -> bool) -> - ?hash:('key -> int) -> + 'b list * 'c list
  • since 0.11
val group_by : ?hash:('a -> int) -> ?eq:('a -> 'a -> bool) -> 'a t -> 'a list t

group_by ?hash ?eq l groups equal elements, regardless of their order of appearance. precondition: for any x and y, if eq x y then hash x=hash y must hold.

  • since 2.3
val join : join_row:('a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t

join ~join_row a b combines every element of a with every element of b using join_row. If join_row returns None, then the two elements do not combine. Assume that b allows for multiple iterations.

  • since 2.3
val join_by : + ?eq:('key -> 'key -> bool) -> + ?hash:('key -> int) -> ('a -> 'key) -> ('b -> 'key) -> - merge:('key -> 'a -> 'b -> 'c option) -> + merge:('key -> 'a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t

join_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and combine values (x,y) from (a,b) with the same key using merge. If merge returns None, the combination of values is discarded. precondition: for any x and y, if eq x y then hash x=hash y must hold.

  • since 2.3
val join_all_by : - ?eq:('key -> 'key -> bool) -> - ?hash:('key -> int) -> + ?eq:('key -> 'key -> bool) -> + ?hash:('key -> int) -> ('a -> 'key) -> ('b -> 'key) -> - merge:('key -> 'a list -> 'b list -> 'c option) -> + merge:('key -> 'a list -> 'b list -> 'c option) -> 'a t -> 'b t -> 'c t

join_all_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and, for each key k occurring in at least one of them:

  • compute the list l1 of elements of a that map to k
  • compute the list l2 of elements of b that map to k
  • call merge k l1 l2. If merge returns None, the combination of values is discarded, otherwise it returns Some c and c is inserted in the result.
  • since 2.3
val group_join_by : - ?eq:('a -> 'a -> bool) -> - ?hash:('a -> int) -> + ?eq:('a -> 'a -> bool) -> + ?hash:('a -> int) -> ('b -> 'a) -> 'a t -> 'b t -> ('a * 'b list) t

group_join_by ?eq ?hash key la lb associates to every element x of the first sequence, all the elements y of the second sequence such that eq x (key y). Elements of the first sequences without corresponding values in the second one are mapped to [] precondition: for any x and y, if eq x y then hash x=hash y must hold.

  • since 2.3
val sublists_of_len : - ?last:('a list -> 'a list option) -> - ?offset:int -> + ?last:('a list -> 'a list option) -> + ?offset:int -> int -> 'a list -> - 'a list list

sublists_of_len ?last ?offset n l returns sub-lists of l that have length n. By default, these sub-lists are non overlapping: sublists_of_len 2 [1;2;3;4;5;6] returns [1;2]; [3;4]; [5;6].

Examples:

  • sublists_of_len 2 [1;2;3;4;5;6] = [[1;2]; [3;4]; [5;6]].
  • sublists_of_len 2 ~offset:3 [1;2;3;4;5;6] = [1;2];[4;5].
  • sublists_of_len 3 ~last:CCOption.return [1;2;3;4] = [1;2;3];[4].
  • sublists_of_len 2 [1;2;3;4;5] = [[1;2]; [3;4]].
  • parameter offset

    the number of elements skipped between two consecutive sub-lists. By default it is n. If offset < n, the sub-lists will overlap; if offset > n, some elements will not appear at all.

  • parameter last

    if provided and the last group of elements g is such that length g < n, last g is called. If last g = Some g', g' is appended; otherwise g is dropped. If last = CCOption.return, it will simply keep the last group. By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.

  • since 1.0, but only
  • since 1.5 with labels
val chunks : int -> 'a list -> 'a list list

chunks n l returns consecutives chunks of size at most n from l. Each item of l will occur in exactly one chunk. Only the last chunk might be of length smaller than n. Invariant: (chunks n l |> List.flatten) = l.

  • since 3.2
val intersperse : 'a -> 'a list -> 'a list

intersperse x l inserts the element x between adjacent elements of the list l.

  • since 2.1, but only
  • since 2.2 with labels
val interleave : 'a list -> 'a list -> 'a list

interleave [x1โ€ฆxn] [y1โ€ฆym] is [x1;y1;x2;y2;โ€ฆ] and finishes with the suffix of the longest list.

  • since 2.1, but only
  • since 2.2 with labels
val pure : 'a -> 'a t

pure x is return x.

val mguard : bool -> unit t

mguard c is pure () if c is true, [] otherwise. This is useful to define a list by comprehension, e.g.:

# let square_even xs =
+  'a list list

sublists_of_len ?last ?offset n l returns sub-lists of l that have length n. By default, these sub-lists are non overlapping: sublists_of_len 2 [1;2;3;4;5;6] returns [1;2]; [3;4]; [5;6].

Examples:

  • sublists_of_len 2 [1;2;3;4;5;6] = [[1;2]; [3;4]; [5;6]].
  • sublists_of_len 2 ~offset:3 [1;2;3;4;5;6] = [1;2];[4;5].
  • sublists_of_len 3 ~last:CCOption.return [1;2;3;4] = [1;2;3];[4].
  • sublists_of_len 2 [1;2;3;4;5] = [[1;2]; [3;4]].
  • parameter offset

    the number of elements skipped between two consecutive sub-lists. By default it is n. If offset < n, the sub-lists will overlap; if offset > n, some elements will not appear at all.

  • parameter last

    if provided and the last group of elements g is such that length g < n, last g is called. If last g = Some g', g' is appended; otherwise g is dropped. If last = CCOption.return, it will simply keep the last group. By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.

  • since 1.0, but only
  • since 1.5 with labels
val chunks : int -> 'a list -> 'a list list

chunks n l returns consecutives chunks of size at most n from l. Each item of l will occur in exactly one chunk. Only the last chunk might be of length smaller than n. Invariant: (chunks n l |> List.flatten) = l.

  • since 3.2
val intersperse : 'a -> 'a list -> 'a list

intersperse x l inserts the element x between adjacent elements of the list l.

  • since 2.1, but only
  • since 2.2 with labels
val interleave : 'a list -> 'a list -> 'a list

interleave [x1โ€ฆxn] [y1โ€ฆym] is [x1;y1;x2;y2;โ€ฆ] and finishes with the suffix of the longest list.

  • since 2.1, but only
  • since 2.2 with labels
val pure : 'a -> 'a t

pure x is return x.

val mguard : bool -> unit t

mguard c is pure () if c is true, [] otherwise. This is useful to define a list by comprehension, e.g.:

# let square_even xs =
       let* x = xs in
       let* () = mguard (x mod 2 = 0) in
       return @@ x * x;;
 val square_even : int list -> int list = <fun>
 # square_even [1;2;4;3;5;2];;
-- : int list = [4; 16; 4]
  • since 3.1
val return : 'a -> 'a t

return x is x.

val take : int -> 'a t -> 'a t

take n l takes the n first elements of the list l, drop the rest.

val drop : int -> 'a t -> 'a t

drop n l drops the n first elements of the list l, keep the rest.

val hd_tl : 'a t -> 'a * 'a t

hd_tl (x :: l) returns x, l.

  • raises Failure

    if the list is empty.

  • since 0.16
val take_drop : int -> 'a t -> 'a t * 'a t

take_drop n l returns l1, l2 such that l1 @ l2 = l and length l1 = min (length l) n.

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

take_while f l returns the longest prefix of l for which f is true.

  • since 0.13
val drop_while : ('a -> bool) -> 'a t -> 'a t

drop_while f l drops the longest prefix of l for which f is true.

  • since 0.13
val take_drop_while : ('a -> bool) -> 'a t -> 'a t * 'a t

take_drop_while p l = take_while p l, drop_while p l.

  • since 1.2, but only
  • since 2.2 with labels
val last : int -> 'a t -> 'a t

last n l takes the last n elements of l (or less if l doesn't have that many elements).

val head_opt : 'a t -> 'a option

head_opt l returns Some x (the first element of the list l) or None if the list l is empty.

  • since 0.20
val tail_opt : 'a t -> 'a t option

tail_opt l returns Some l' (the given list l without its first element) or None if the list l is empty.

  • since 2.0
val last_opt : 'a t -> 'a option

last_opt l returns Some x (the last element of l) or None if the list l is empty.

  • since 0.20
val find_pred : ('a -> bool) -> 'a t -> 'a option

find_pred p l finds the first element of l that satisfies p, or returns None if no element satisfies p.

  • since 0.11
val find_opt : ('a -> bool) -> 'a t -> 'a option

find_opt p l is the safe version of find.

  • since 1.5, but only
  • since 2.2 with labels
val find_pred_exn : ('a -> bool) -> 'a t -> 'a

find_pred_exn p l is the unsafe version of find_pred.

  • raises Not_found

    if no such element is found.

  • since 0.11
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find_map f l traverses l, applying f to each element. If for some element x, f x = Some y, then Some y is returned. Otherwise the call returns None.

  • since 0.11
val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

find_mapi f l is like find_map, but also pass the index to the predicate function.

  • since 0.11
val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option

find_idx p x returns Some (i,x) where x is the i-th element of l, and p x holds. Otherwise returns None.

val remove : eq:('a -> 'a -> bool) -> key:'a -> 'a t -> 'a t

remove ~eq ~key l removes every instance of key from l. Tail-recursive.

  • parameter eq

    equality function.

  • since 0.11
val filter_map : ('a -> 'b option) -> 'a t -> 'b t

filter_map f l is the sublist of l containing only elements for which f returns Some e. Map and remove elements at the same time.

val keep_some : 'a option t -> 'a t

keep_some l retains only elements of the form Some x. Like filter_map CCFun.id.

  • since 1.3, but only
  • since 2.2 with labels
val keep_ok : ('a, _) result t -> 'a t

keep_ok l retains only elements of the form Ok x.

  • since 1.3, but only
  • since 2.2 with labels
val all_some : 'a option t -> 'a t option

all_some l returns Some l' if all elements of l are of the form Some x, or None otherwise.

  • since 1.3, but only
  • since 2.2 with labels
val all_ok : ('a, 'err) result t -> ('a t, 'err) result

all_ok l returns Ok l' if all elements of l are of the form Ok x, or Error e otherwise (with the first error met).

  • since 1.3, but only
  • since 2.2 with labels
val sorted_mem : cmp:('a -> 'a -> int) -> 'a -> 'a list -> bool

sorted_mem ~cmp x l and mem x l give the same result for any sorted list l, but potentially more efficiently.

  • since 3.5
val sorted_merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_merge ~cmp l1 l2 merges elements from both sorted list using the given comparison function cmp.

val sorted_diff : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_diff ~cmp l1 l2 returns the elements in l1 that are not in l2. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff ~cmp [1;1;1;2;2;3] [1;2;2] would be [1;1;3]. It is the left inverse of sorted_merge; that is, sorted_diff ~cmp (sorted_merge ~cmp l1 l2) l2 is always equal to l1 for sorted lists l1 and l2.

  • since 3.5
val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

sort_uniq ~cmp l sorts the list l using the given comparison function cmp and remove duplicate elements.

val sorted_merge_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_merge_uniq ~cmp l1 l2 merges the sorted lists l1 and l2 and removes duplicates.

  • since 0.10
val sorted_diff_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_diff_uniq ~cmp l1 l2 collects the elements in l1 that are not in l2 and then remove duplicates. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2] would be [1]. sorted_diff_uniq ~cmp l1 l2 and uniq_succ ~eq (sorted_diff ~cmp l1 l2) always give the same result for sorted l1 and l2 and compatible cmp and eq.

  • since 3.5
val is_sorted : cmp:('a -> 'a -> int) -> 'a list -> bool

is_sorted ~cmp l returns true iff l is sorted (according to given order).

  • parameter cmp

    the comparison function.

  • since 0.17
val sorted_insert : - cmp:('a -> 'a -> int) -> - ?uniq:bool -> +- : int list = [4; 16; 4]
  • since 3.1
val return : 'a -> 'a t

return x is x.

val take : int -> 'a t -> 'a t

take n l takes the n first elements of the list l, drop the rest.

val drop : int -> 'a t -> 'a t

drop n l drops the n first elements of the list l, keep the rest.

val hd_tl : 'a t -> 'a * 'a t

hd_tl (x :: l) returns x, l.

  • raises Failure

    if the list is empty.

  • since 0.16
val take_drop : int -> 'a t -> 'a t * 'a t

take_drop n l returns l1, l2 such that l1 @ l2 = l and length l1 = min (length l) n.

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

take_while f l returns the longest prefix of l for which f is true.

  • since 0.13
val drop_while : ('a -> bool) -> 'a t -> 'a t

drop_while f l drops the longest prefix of l for which f is true.

  • since 0.13
val take_drop_while : ('a -> bool) -> 'a t -> 'a t * 'a t

take_drop_while p l = take_while p l, drop_while p l.

  • since 1.2, but only
  • since 2.2 with labels
val last : int -> 'a t -> 'a t

last n l takes the last n elements of l (or less if l doesn't have that many elements).

val head_opt : 'a t -> 'a option

head_opt l returns Some x (the first element of the list l) or None if the list l is empty.

  • since 0.20
val tail_opt : 'a t -> 'a t option

tail_opt l returns Some l' (the given list l without its first element) or None if the list l is empty.

  • since 2.0
val last_opt : 'a t -> 'a option

last_opt l returns Some x (the last element of l) or None if the list l is empty.

  • since 0.20
val find_pred : ('a -> bool) -> 'a t -> 'a option

find_pred p l finds the first element of l that satisfies p, or returns None if no element satisfies p.

  • since 0.11
val find_opt : ('a -> bool) -> 'a t -> 'a option

find_opt p l is the safe version of find.

  • since 1.5, but only
  • since 2.2 with labels
val find_pred_exn : ('a -> bool) -> 'a t -> 'a

find_pred_exn p l is the unsafe version of find_pred.

  • raises Not_found

    if no such element is found.

  • since 0.11
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find_map f l traverses l, applying f to each element. If for some element x, f x = Some y, then Some y is returned. Otherwise the call returns None.

  • since 0.11
val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

find_mapi f l is like find_map, but also pass the index to the predicate function.

  • since 0.11
val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option

find_idx p x returns Some (i,x) where x is the i-th element of l, and p x holds. Otherwise returns None.

val remove : eq:('a -> 'a -> bool) -> key:'a -> 'a t -> 'a t

remove ~eq ~key l removes every instance of key from l. Tail-recursive.

  • parameter eq

    equality function.

  • since 0.11
val filter_map : ('a -> 'b option) -> 'a t -> 'b t

filter_map f l is the sublist of l containing only elements for which f returns Some e. Map and remove elements at the same time.

val keep_some : 'a option t -> 'a t

keep_some l retains only elements of the form Some x. Like filter_map CCFun.id.

  • since 1.3, but only
  • since 2.2 with labels
val keep_ok : ('a, _) result t -> 'a t

keep_ok l retains only elements of the form Ok x.

  • since 1.3, but only
  • since 2.2 with labels
val all_some : 'a option t -> 'a t option

all_some l returns Some l' if all elements of l are of the form Some x, or None otherwise.

  • since 1.3, but only
  • since 2.2 with labels
val all_ok : ('a, 'err) result t -> ('a t, 'err) result

all_ok l returns Ok l' if all elements of l are of the form Ok x, or Error e otherwise (with the first error met).

  • since 1.3, but only
  • since 2.2 with labels
val sorted_mem : cmp:('a -> 'a -> int) -> 'a -> 'a list -> bool

sorted_mem ~cmp x l and mem x l give the same result for any sorted list l, but potentially more efficiently.

  • since 3.5
val sorted_merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_merge ~cmp l1 l2 merges elements from both sorted list using the given comparison function cmp.

val sorted_diff : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_diff ~cmp l1 l2 returns the elements in l1 that are not in l2. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff ~cmp [1;1;1;2;2;3] [1;2;2] would be [1;1;3]. It is the left inverse of sorted_merge; that is, sorted_diff ~cmp (sorted_merge ~cmp l1 l2) l2 is always equal to l1 for sorted lists l1 and l2.

  • since 3.5
val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

sort_uniq ~cmp l sorts the list l using the given comparison function cmp and remove duplicate elements.

val sorted_merge_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_merge_uniq ~cmp l1 l2 merges the sorted lists l1 and l2 and removes duplicates.

  • since 0.10
val sorted_diff_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_diff_uniq ~cmp l1 l2 collects the elements in l1 that are not in l2 and then remove duplicates. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2] would be [1]. sorted_diff_uniq ~cmp l1 l2 and uniq_succ ~eq (sorted_diff ~cmp l1 l2) always give the same result for sorted l1 and l2 and compatible cmp and eq.

  • since 3.5
val is_sorted : cmp:('a -> 'a -> int) -> 'a list -> bool

is_sorted ~cmp l returns true iff l is sorted (according to given order).

  • parameter cmp

    the comparison function.

  • since 0.17
val sorted_insert : + cmp:('a -> 'a -> int) -> + ?uniq:bool -> 'a -> 'a list -> 'a list

sorted_insert ~cmp ?uniq x l inserts x into l such that, if l was sorted, then sorted_insert x l is sorted too.

  • parameter uniq

    if true and x is already in sorted position in l, then x is not duplicated. Default false (x will be inserted in any case).

  • since 0.17
val sorted_remove : - cmp:('a -> 'a -> int) -> - ?all:bool -> + cmp:('a -> 'a -> int) -> + ?all:bool -> 'a -> 'a list -> - 'a list

sorted_remove ~cmp x l removes x from a sorted list l such that the return value is sorted too. By default, it is the left inverse of sorted_insert; that is, sorted_remove ~cmp x (sorted_insert ~cmp x l) is equal to l for any sorted list l.

  • parameter all

    if true then all occurrences of x will be removed. Otherwise, only the first x will be removed (if any). Default false (only the first will be removed).

  • since 3.5
val uniq_succ : eq:('a -> 'a -> bool) -> 'a list -> 'a list

uniq_succ ~eq l removes duplicate elements that occur one next to the other. Examples: uniq_succ ~eq:(=) [1;2;1] = [1;2;1]. uniq_succ ~eq:(=) [1;1;2] = [1;2].

  • since 0.10
val group_succ : eq:('a -> 'a -> bool) -> 'a list -> 'a list list

group_succ ~eq l groups together consecutive elements that are equal according to eq.

  • since 0.11

Indices

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

mapi f l is like map, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iteri f l is like iter, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

val iteri2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit

iteri2 f l1 l2 applies f to the two lists l1 and l2 simultaneously. The integer passed to f indicates the index of element.

  • raises Invalid_argument

    when lists do not have the same length.

  • since 2.0, but only
  • since 2.2 with labels
val foldi : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b

foldi f init l is like fold but it also passes in the index of each element, from 0 to length l - 1 as additional argument to the folded function f. Tail-recursive.

val foldi2 : ('c -> int -> 'a -> 'b -> 'c) -> 'c -> 'a t -> 'b t -> 'c

foldi2 f init l1 l2 folds on the two lists l1 and l2, with index of each element passed to the function f. Computes f(โ€ฆ (f init i_0 l1_0 l2_0) โ€ฆ) i_n l1_n l2_n .

  • raises Invalid_argument

    when lists do not have the same length.

  • since 2.0, but only
  • since 2.2 with labels
val get_at_idx : int -> 'a t -> 'a option

get_at_idx i l returns Some i-th element of the given list l or None if the list l is too short. If the index is negative, it will get element starting from the end of the list l.

val nth_opt : 'a t -> int -> 'a option

nth_opt l n returns Some n-th element of l. Safe version of nth.

  • raises Invalid_argument

    if the int is negative.

  • since 1.5, but only
  • since 2.2 with labels
val get_at_idx_exn : int -> 'a t -> 'a

get_at_idx_exn i l gets the i-th element of l, or

  • raises Not_found

    if the index is invalid. The first element has index 0. If the index is negative, it will get element starting from the end of the list.

val set_at_idx : int -> 'a -> 'a t -> 'a t

set_at_idx i x l replaces the i-th element with x (removes the old one), or does nothing if index is too high. If the index is negative, it will set element starting from the end of the list.

val insert_at_idx : int -> 'a -> 'a t -> 'a t

insert_at_idx i x l inserts x at i-th position, between the two existing elements. If the index is too high, append at the end of the list. If the index is negative, it will insert element starting from the end of the list.

val remove_at_idx : int -> 'a t -> 'a t

remove_at_idx i l removes element at given index i. Does nothing if the index is too high. If the index is negative, it will remove element starting from the end of the list.

Set Operators

Those operations maintain the invariant that the list does not contain duplicates (if it already satisfies it).

val add_nodup : eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t

add_nodup ~eq x set adds x to set if it was not already present. Linear time.

  • since 0.11
val remove_one : eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t

remove_one ~eq x set removes one occurrence of x from set. Linear time.

  • since 0.11
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool

mem ?eq x l is true iff x is equal to an element of l. A comparator function eq can be provided. Linear time.

val subset : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

subset ~eq l1 l2 tests if all elements of the list l1 are contained in the list l2 by applying eq.

val uniq : eq:('a -> 'a -> bool) -> 'a t -> 'a t

uniq ~eq l removes duplicates in l w.r.t the equality predicate eq. Complexity is quadratic in the length of the list, but the order of elements is preserved. If you wish for a faster de-duplication but do not care about the order, use sort_uniq.

val union : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t

union ~eq l1 l2 is the union of the lists l1 and l2 w.r.t. the equality predicate eq. Complexity is product of length of inputs.

val inter : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t

inter ~eq l1 l2 is the intersection of the lists l1 and l2 w.r.t. the equality predicate eq. Complexity is product of length of inputs.

Other Constructors

val range_by : step:int -> int -> int -> int t

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 0.18
val range : int -> int -> int t

range i j iterates on integers from i to j included. It works both for decreasing and increasing ranges.

val range' : int -> int -> int t

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = [0;1;2;3;4].

val replicate : int -> 'a -> 'a t

replicate n x replicates the given element x n times.

val repeat : int -> 'a t -> 'a t

repeat n l concatenates the list l with itself n times.

Association Lists

module Assoc : sig ... end
val assoc : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> 'b

assoc ~eq k alist returns the value v associated with key k in alist. Like Assoc.get_exn.

  • since 2.0
val assoc_opt : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> 'b option

assoc_opt ~eq k alist returns Some v if the given key k is present into alist, or None if not present. Like Assoc.get.

  • since 1.5, but only
  • since 2.0 with labels
val assq_opt : 'a -> ('a * 'b) t -> 'b option

assq_opt k alist returns Some v if the given key k is present into alist. Like Assoc.assoc_opt but use physical equality instead of structural equality to compare keys. Safe version of assq.

  • since 1.5, but only
  • since 2.0 with labels
val mem_assoc : ?eq:('a -> 'a -> bool) -> 'a -> ('a * _) t -> bool

mem_assoc ?eq k alist returns true iff k is a key in alist. Like Assoc.mem.

  • since 2.0
val remove_assoc : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> ('a * 'b) t

remove_assoc ~eq k alist returns the alist without the first pair with key k, if any. Like Assoc.remove.

  • since 2.0

References on Lists

  • since 0.3.3
module Ref : sig ... end
module type MONAD = sig ... end
module Traverse (M : MONAD) : sig ... end

Conversions

val random : 'a random_gen -> 'a t random_gen
val random_non_empty : 'a random_gen -> 'a t random_gen
val random_len : int -> 'a random_gen -> 'a t random_gen
val random_choose : 'a t -> 'a random_gen

random_choose l randomly chooses an element in the list l.

  • raises Not_found

    if the list is empty.

val random_sequence : 'a random_gen t -> 'a t random_gen
val to_string : - ?start:string -> - ?stop:string -> - ?sep:string -> + 'a list

sorted_remove ~cmp x l removes x from a sorted list l such that the return value is sorted too. By default, it is the left inverse of sorted_insert; that is, sorted_remove ~cmp x (sorted_insert ~cmp x l) is equal to l for any sorted list l.

  • parameter all

    if true then all occurrences of x will be removed. Otherwise, only the first x will be removed (if any). Default false (only the first will be removed).

  • since 3.5
val uniq_succ : eq:('a -> 'a -> bool) -> 'a list -> 'a list

uniq_succ ~eq l removes duplicate elements that occur one next to the other. Examples: uniq_succ ~eq:(=) [1;2;1] = [1;2;1]. uniq_succ ~eq:(=) [1;1;2] = [1;2].

  • since 0.10
val group_succ : eq:('a -> 'a -> bool) -> 'a list -> 'a list list

group_succ ~eq l groups together consecutive elements that are equal according to eq.

  • since 0.11

Indices

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

mapi f l is like map, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iteri f l is like iter, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

val iteri2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit

iteri2 f l1 l2 applies f to the two lists l1 and l2 simultaneously. The integer passed to f indicates the index of element.

  • raises Invalid_argument

    when lists do not have the same length.

  • since 2.0, but only
  • since 2.2 with labels
val foldi : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b

foldi f init l is like fold but it also passes in the index of each element, from 0 to length l - 1 as additional argument to the folded function f. Tail-recursive.

val foldi2 : ('c -> int -> 'a -> 'b -> 'c) -> 'c -> 'a t -> 'b t -> 'c

foldi2 f init l1 l2 folds on the two lists l1 and l2, with index of each element passed to the function f. Computes f(โ€ฆ (f init i_0 l1_0 l2_0) โ€ฆ) i_n l1_n l2_n .

  • raises Invalid_argument

    when lists do not have the same length.

  • since 2.0, but only
  • since 2.2 with labels
val get_at_idx : int -> 'a t -> 'a option

get_at_idx i l returns Some i-th element of the given list l or None if the list l is too short. If the index is negative, it will get element starting from the end of the list l.

val nth_opt : 'a t -> int -> 'a option

nth_opt l n returns Some n-th element of l. Safe version of nth.

  • raises Invalid_argument

    if the int is negative.

  • since 1.5, but only
  • since 2.2 with labels
val get_at_idx_exn : int -> 'a t -> 'a

get_at_idx_exn i l gets the i-th element of l, or

  • raises Not_found

    if the index is invalid. The first element has index 0. If the index is negative, it will get element starting from the end of the list.

val set_at_idx : int -> 'a -> 'a t -> 'a t

set_at_idx i x l replaces the i-th element with x (removes the old one), or does nothing if index is too high. If the index is negative, it will set element starting from the end of the list.

val insert_at_idx : int -> 'a -> 'a t -> 'a t

insert_at_idx i x l inserts x at i-th position, between the two existing elements. If the index is too high, append at the end of the list. If the index is negative, it will insert element starting from the end of the list.

val remove_at_idx : int -> 'a t -> 'a t

remove_at_idx i l removes element at given index i. Does nothing if the index is too high. If the index is negative, it will remove element starting from the end of the list.

Set Operators

Those operations maintain the invariant that the list does not contain duplicates (if it already satisfies it).

val add_nodup : eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t

add_nodup ~eq x set adds x to set if it was not already present. Linear time.

  • since 0.11
val remove_one : eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t

remove_one ~eq x set removes one occurrence of x from set. Linear time.

  • since 0.11
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool

mem ?eq x l is true iff x is equal to an element of l. A comparator function eq can be provided. Linear time.

val subset : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

subset ~eq l1 l2 tests if all elements of the list l1 are contained in the list l2 by applying eq.

val uniq : eq:('a -> 'a -> bool) -> 'a t -> 'a t

uniq ~eq l removes duplicates in l w.r.t the equality predicate eq. Complexity is quadratic in the length of the list, but the order of elements is preserved. If you wish for a faster de-duplication but do not care about the order, use sort_uniq.

val union : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t

union ~eq l1 l2 is the union of the lists l1 and l2 w.r.t. the equality predicate eq. Complexity is product of length of inputs.

val inter : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t

inter ~eq l1 l2 is the intersection of the lists l1 and l2 w.r.t. the equality predicate eq. Complexity is product of length of inputs.

Other Constructors

val range_by : step:int -> int -> int -> int t

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 0.18
val range : int -> int -> int t

range i j iterates on integers from i to j included. It works both for decreasing and increasing ranges.

val range' : int -> int -> int t

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = [0;1;2;3;4].

val replicate : int -> 'a -> 'a t

replicate n x replicates the given element x n times.

val repeat : int -> 'a t -> 'a t

repeat n l concatenates the list l with itself n times.

Association Lists

module Assoc : sig ... end
val assoc : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> 'b

assoc ~eq k alist returns the value v associated with key k in alist. Like Assoc.get_exn.

  • since 2.0
val assoc_opt : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> 'b option

assoc_opt ~eq k alist returns Some v if the given key k is present into alist, or None if not present. Like Assoc.get.

  • since 1.5, but only
  • since 2.0 with labels
val assq_opt : 'a -> ('a * 'b) t -> 'b option

assq_opt k alist returns Some v if the given key k is present into alist. Like Assoc.assoc_opt but use physical equality instead of structural equality to compare keys. Safe version of assq.

  • since 1.5, but only
  • since 2.0 with labels
val mem_assoc : ?eq:('a -> 'a -> bool) -> 'a -> ('a * _) t -> bool

mem_assoc ?eq k alist returns true iff k is a key in alist. Like Assoc.mem.

  • since 2.0
val remove_assoc : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> ('a * 'b) t

remove_assoc ~eq k alist returns the alist without the first pair with key k, if any. Like Assoc.remove.

  • since 2.0

References on Lists

  • since 0.3.3
module Ref : sig ... end
module type MONAD = sig ... end
module Traverse (M : MONAD) : sig ... end

Conversions

val random : 'a random_gen -> 'a t random_gen
val random_non_empty : 'a random_gen -> 'a t random_gen
val random_len : int -> 'a random_gen -> 'a t random_gen
val random_choose : 'a t -> 'a random_gen

random_choose l randomly chooses an element in the list l.

  • raises Not_found

    if the list is empty.

val random_sequence : 'a random_gen t -> 'a t random_gen
val to_string : + ?start:string -> + ?stop:string -> + ?sep:string -> ('a -> string) -> 'a t -> string

to_string ?start ?stop ?sep item_to_string l prints l to a string using sep as a separator between elements of l.

  • since 2.7
val to_iter : 'a t -> 'a iter

to_iter l returns a iter of the elements of the list l.

  • since 2.8
val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq l returns a Seq.t of the elements of the list l. Renamed from to_std_seq since 3.0.

  • since 3.0
val of_iter : 'a iter -> 'a t

of_iter iter builds a list from a given iter. In the result, elements appear in the same order as they did in the source iter.

  • since 2.8
val of_seq_rev : 'a Stdlib.Seq.t -> 'a t

of_seq_rev seq builds a list from a given Seq.t, in reverse order. Renamed from to_std_seq_rev since 3.0.

  • since 3.0
val of_seq : 'a Stdlib.Seq.t -> 'a t

of_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen l returns a gen of the elements of the list l.

val of_gen : 'a gen -> 'a t

of_gen gen builds a list from a given gen. In the result, elements appear in the same order as they did in the source gen.

Infix Operators

It is convenient to open CCList.Infix to access the infix operators without cluttering the scope too much.

  • since 0.16
module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

l >|= f is the infix version of map with reversed arguments.

val (@) : 'a t -> 'a t -> 'a t

l1 @ l2 concatenates two lists l1 and l2. As append.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

funs <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> l is like map.

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

l >>= f is flat_map f l.

val (--) : int -> int -> int t

i -- j is the infix alias for range. Bounds included.

val (--^) : int -> int -> int t

i --^ j is the infix alias for range'. Second bound j excluded.

  • since 0.17
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
val and& : 'a list -> 'b list -> ('a * 'b) list

(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.

# let f xs ys zs =
@@ -99,8 +99,8 @@ val square_even : int list -> int list = <fun>
 val f : int list -> int list -> int list -> int list = <fun>
 # f [1;2] [5;6;7] [10;10];;
 - : int list = [16; 18]
  • since 3.1

IO

val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> 'a printer -> - 'a t printer

pp ?pp_start ?pp_stop ?pp_sep ppf l prints the contents of a list.

\ No newline at end of file + 'a t printer

pp ?pp_start ?pp_stop ?pp_sep ppf l prints the contents of a list.

diff --git a/dev/containers/CCList/module-type-MONAD/index.html b/dev/containers/CCList/module-type-MONAD/index.html index 37e7c4c5..4440c0c0 100644 --- a/dev/containers/CCList/module-type-MONAD/index.html +++ b/dev/containers/CCList/module-type-MONAD/index.html @@ -1,2 +1,2 @@ -MONAD (containers.CCList.MONAD)

Module type CCList.MONAD

Monadic Operations

type 'a t
val return : 'a -> 'a t

return is the Monadic return.

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

(>>=) is the Monadic bind.

\ No newline at end of file +MONAD (containers.CCList.MONAD)

Module type CCList.MONAD

Monadic Operations

type 'a t
val return : 'a -> 'a t

return is the Monadic return.

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

(>>=) is the Monadic bind.

diff --git a/dev/containers/CCListLabels/Assoc/index.html b/dev/containers/CCListLabels/Assoc/index.html index c113ee84..2f6d1092 100644 --- a/dev/containers/CCListLabels/Assoc/index.html +++ b/dev/containers/CCListLabels/Assoc/index.html @@ -1,7 +1,7 @@ -Assoc (containers.CCListLabels.Assoc)

Module CCListLabels.Assoc

type ('a, 'b) t = ('a * 'b) list
val get : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b option

get ~eq k alist returns Some v if the given key k is present into alist, or None if not present.

val get_exn : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b

get_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.

  • raises Not_found

    if the element is not present.

val set : eq:('a -> 'a -> bool) -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t

set ~eq k v alist adds the binding k, v into the list alist (erase it if already present).

val mem : ?eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool

mem ?eq k alist returns true iff k is a key in alist.

  • since 0.16
val update : - eq:('a -> 'a -> bool) -> - f:('b option -> 'b option) -> +Assoc (containers.CCListLabels.Assoc)

Module CCListLabels.Assoc

type ('a, 'b) t = ('a * 'b) list
val get : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b option

get ~eq k alist returns Some v if the given key k is present into alist, or None if not present.

val get_exn : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b

get_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.

  • raises Not_found

    if the element is not present.

val set : eq:('a -> 'a -> bool) -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t

set ~eq k v alist adds the binding k, v into the list alist (erase it if already present).

val mem : ?eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool

mem ?eq k alist returns true iff k is a key in alist.

  • since 0.16
val update : + eq:('a -> 'a -> bool) -> + f:('b option -> 'b option) -> 'a -> ('a, 'b) t -> - ('a, 'b) t

update ~eq ~f k alist updates alist on the key k, by calling f (get alist k) and removing k if it returns None, mapping k to v' if it returns Some v'.

  • since 0.16
val remove : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> ('a, 'b) t

remove ~eq k alist returns the alist without the first pair with key k, if any.

  • since 0.17
val keys : ('a, 'b) t -> 'a list

keys alist returns a list of all keys of alist.

  • since 3.8
val values : ('a, 'b) t -> 'b list

values alist returns a list of all values of alist.

  • since 3.8
val map_values : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t

map_values f alist applies function f to all values of alist.

  • since 3.8
\ No newline at end of file + ('a, 'b) t

update ~eq ~f k alist updates alist on the key k, by calling f (get alist k) and removing k if it returns None, mapping k to v' if it returns Some v'.

  • since 0.16
val remove : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> ('a, 'b) t

remove ~eq k alist returns the alist without the first pair with key k, if any.

  • since 0.17
val keys : ('a, 'b) t -> 'a list

keys alist returns a list of all keys of alist.

  • since 3.8
val values : ('a, 'b) t -> 'b list

values alist returns a list of all values of alist.

  • since 3.8
val map_values : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t

map_values f alist applies function f to all values of alist.

  • since 3.8
diff --git a/dev/containers/CCListLabels/Infix/index.html b/dev/containers/CCListLabels/Infix/index.html index e17e958e..f22a4ed4 100644 --- a/dev/containers/CCListLabels/Infix/index.html +++ b/dev/containers/CCListLabels/Infix/index.html @@ -1,9 +1,9 @@ -Infix (containers.CCListLabels.Infix)

Module CCListLabels.Infix

val (>|=) : 'a CCList.t -> ('a -> 'b) -> 'b CCList.t

l >|= f is the infix version of map with reversed arguments.

val (@) : 'a CCList.t -> 'a CCList.t -> 'a CCList.t

l1 @ l2 concatenates two lists l1 and l2. As append.

val (<*>) : ('a -> 'b) CCList.t -> 'a CCList.t -> 'b CCList.t

funs <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a -> 'b) -> 'a CCList.t -> 'b CCList.t

f <$> l is like map.

val (>>=) : 'a CCList.t -> ('a -> 'b CCList.t) -> 'b CCList.t

l >>= f is flat_map f l.

val (--) : int -> int -> int CCList.t

i -- j is the infix alias for range. Bounds included.

val (--^) : int -> int -> int CCList.t

i --^ j is the infix alias for range'. Second bound j excluded.

  • since 0.17
val let+ : 'a CCList.t -> ('a -> 'b) -> 'b CCList.t
val and+ : 'a CCList.t -> 'b CCList.t -> ('a * 'b) CCList.t
val let* : 'a CCList.t -> ('a -> 'b CCList.t) -> 'b CCList.t
val and* : 'a CCList.t -> 'b CCList.t -> ('a * 'b) CCList.t
val and& : 'a list -> 'b list -> ('a * 'b) list

(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.

# let f xs ys zs =
+Infix (containers.CCListLabels.Infix)

Module CCListLabels.Infix

val (>|=) : 'a CCList.t -> ('a -> 'b) -> 'b CCList.t

l >|= f is the infix version of map with reversed arguments.

val (@) : 'a CCList.t -> 'a CCList.t -> 'a CCList.t

l1 @ l2 concatenates two lists l1 and l2. As append.

val (<*>) : ('a -> 'b) CCList.t -> 'a CCList.t -> 'b CCList.t

funs <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a -> 'b) -> 'a CCList.t -> 'b CCList.t

f <$> l is like map.

val (>>=) : 'a CCList.t -> ('a -> 'b CCList.t) -> 'b CCList.t

l >>= f is flat_map f l.

val (--) : int -> int -> int CCList.t

i -- j is the infix alias for range. Bounds included.

val (--^) : int -> int -> int CCList.t

i --^ j is the infix alias for range'. Second bound j excluded.

  • since 0.17
val let+ : 'a CCList.t -> ('a -> 'b) -> 'b CCList.t
val and+ : 'a CCList.t -> 'b CCList.t -> ('a * 'b) CCList.t
val let* : 'a CCList.t -> ('a -> 'b CCList.t) -> 'b CCList.t
val and* : 'a CCList.t -> 'b CCList.t -> ('a * 'b) CCList.t
val and& : 'a list -> 'b list -> ('a * 'b) list

(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.

# let f xs ys zs =
     let+ x = xs
     and& y = ys
     and& z = zs in
     x + y + z;;
 val f : int list -> int list -> int list -> int list = <fun>
 # f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]
  • since 3.1
\ No newline at end of file +- : int list = [16; 18]
  • since 3.1
diff --git a/dev/containers/CCListLabels/Ref/index.html b/dev/containers/CCListLabels/Ref/index.html index 11e8d314..d63a34dc 100644 --- a/dev/containers/CCListLabels/Ref/index.html +++ b/dev/containers/CCListLabels/Ref/index.html @@ -1,2 +1,2 @@ -Ref (containers.CCListLabels.Ref)

Module CCListLabels.Ref

type 'a t = 'a list ref
val push : 'a t -> 'a -> unit

push rlist e adds an element e at the head of rlist.

val pop : 'a t -> 'a option

pop rlist removes and returns Some e (the first element of rlist) or None if the rlist is empty

val pop_exn : 'a t -> 'a

pop_exn rlist removes and returns the first element of rlist. Unsafe version of pop.

  • raises Failure

    if the list is empty.

val create : unit -> 'a t

create () creates a new empty reference list.

val clear : _ t -> unit

clear rlist removes all elements of rlist.

val lift : ('a list -> 'b) -> 'a t -> 'b

lift f rlist applies a list function f to the content of rlist.

val push_list : 'a t -> 'a list -> unit

push_list rlist l adds elements of the list l at the beginning of the list ref rlist. Elements at the end of the list l will be at the beginning of the list ref rlist.

\ No newline at end of file +Ref (containers.CCListLabels.Ref)

Module CCListLabels.Ref

type 'a t = 'a list ref
val push : 'a t -> 'a -> unit

push rlist e adds an element e at the head of rlist.

val pop : 'a t -> 'a option

pop rlist removes and returns Some e (the first element of rlist) or None if the rlist is empty

val pop_exn : 'a t -> 'a

pop_exn rlist removes and returns the first element of rlist. Unsafe version of pop.

  • raises Failure

    if the list is empty.

val create : unit -> 'a t

create () creates a new empty reference list.

val clear : _ t -> unit

clear rlist removes all elements of rlist.

val lift : ('a list -> 'b) -> 'a t -> 'b

lift f rlist applies a list function f to the content of rlist.

val push_list : 'a t -> 'a list -> unit

push_list rlist l adds elements of the list l at the beginning of the list ref rlist. Elements at the end of the list l will be at the beginning of the list ref rlist.

diff --git a/dev/containers/CCListLabels/Traverse/argument-1-M/index.html b/dev/containers/CCListLabels/Traverse/argument-1-M/index.html index 58712395..7720b16a 100644 --- a/dev/containers/CCListLabels/Traverse/argument-1-M/index.html +++ b/dev/containers/CCListLabels/Traverse/argument-1-M/index.html @@ -1,2 +1,2 @@ -M (containers.CCListLabels.Traverse.M)

Parameter Traverse.M

type 'a t
val return : 'a -> 'a t

return is the Monadic return.

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

(>>=) is the Monadic bind.

\ No newline at end of file +M (containers.CCListLabels.Traverse.M)

Parameter Traverse.M

type 'a t
val return : 'a -> 'a t

return is the Monadic return.

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

(>>=) is the Monadic bind.

diff --git a/dev/containers/CCListLabels/Traverse/index.html b/dev/containers/CCListLabels/Traverse/index.html index f205631a..1211f304 100644 --- a/dev/containers/CCListLabels/Traverse/index.html +++ b/dev/containers/CCListLabels/Traverse/index.html @@ -1,2 +1,2 @@ -Traverse (containers.CCListLabels.Traverse)

Module CCListLabels.Traverse

Parameters

module M : MONAD

Signature

val sequence_m : 'a M.t t -> 'a t M.t
val fold_m : f:('b -> 'a -> 'b M.t) -> init:'b -> 'a t -> 'b M.t
val map_m : f:('a -> 'b M.t) -> 'a t -> 'b t M.t
val map_m_par : f:('a -> 'b M.t) -> 'a t -> 'b t M.t

map_m_par ~f (x :: l) is like map_m but f x and f l are evaluated "in parallel" before combining their result (for instance in Lwt).

\ No newline at end of file +Traverse (containers.CCListLabels.Traverse)

Module CCListLabels.Traverse

Parameters

module M : MONAD

Signature

val sequence_m : 'a M.t t -> 'a t M.t
val fold_m : f:('b -> 'a -> 'b M.t) -> init:'b -> 'a t -> 'b M.t
val map_m : f:('a -> 'b M.t) -> 'a t -> 'b t M.t
val map_m_par : f:('a -> 'b M.t) -> 'a t -> 'b t M.t

map_m_par ~f (x :: l) is like map_m but f x and f l are evaluated "in parallel" before combining their result (for instance in Lwt).

diff --git a/dev/containers/CCListLabels/index.html b/dev/containers/CCListLabels/index.html index 83e67cb8..0c00ddd5 100644 --- a/dev/containers/CCListLabels/index.html +++ b/dev/containers/CCListLabels/index.html @@ -1,116 +1,116 @@ -CCListLabels (containers.CCListLabels)

Module CCListLabels

Complements to ListLabels

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val length : 'a list -> int

Return the length (number of elements) of the given list.

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 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, but rev_append is tail-recursive and more efficient.

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).

Comparison

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 begin f a1; f a2; ...; f an; () end.

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 tail-recursive and more efficient.

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.0
val fold_left_map : - f:('a -> 'b -> 'a * 'c) -> - init:'a -> +CCListLabels (containers.CCListLabels)

Module CCListLabels

Complements to ListLabels

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val length : 'a list -> int

Return the length (number of elements) of the given list.

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 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, but rev_append is tail-recursive and more efficient.

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).

Comparison

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 begin f a1; f a2; ...; f an; () end.

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 tail-recursive and more efficient.

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.0
val fold_left_map : + f:('a -> 'b -> 'a * 'c) -> + init:'a -> 'b list -> - 'a * 'c list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11.0
val fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b list -> 'a

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 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. Not tail-recursive.

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 tail-recursive and more efficient.

val fold_left2 : - f:('a -> 'b -> 'c -> 'a) -> - init:'a -> + 'a * 'c list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11.0
val fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b list -> 'a

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 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. Not tail-recursive.

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 tail-recursive and more efficient.

val fold_left2 : + f:('a -> 'b -> 'c -> 'a) -> + init:'a -> 'b list -> 'c list -> - 'a

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 -> 'c -> 'c) -> + 'a

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 -> 'c -> 'c) -> 'a list -> 'b list -> - init:'c -> - 'c

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 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_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.0
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 assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

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_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

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 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

type 'a t = 'a list
val empty : 'a t

empty is [].

val is_empty : _ t -> bool

is_empty l returns true iff l = [].

  • since 0.11
val map : f:('a -> 'b) -> 'a t -> 'b t

map ~f [a0; a1; โ€ฆ; an] applies function f in turn to [a0; a1; โ€ฆ; an]. Safe version of List.map.

val cons : 'a -> 'a t -> 'a t

cons x l is x::l.

  • since 0.12
val append : 'a t -> 'a t -> 'a t

append l1 l2 returns the list that is the concatenation of l1 and l2. Safe version of List.append.

val cons' : 'a t -> 'a -> 'a t

cons' l x is the same as x :: l. This is convenient for fold functions such as List.fold_left or Array.fold_left.

  • since 3.3
val cons_maybe : 'a option -> 'a t -> 'a t

cons_maybe (Some x) l is x :: l. cons_maybe None l is l.

  • since 0.13
val filter : f:('a -> bool) -> 'a t -> 'a t

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 l is preserved. Safe version of List.filter.

val fold_right : f:('a -> 'b -> 'b) -> 'a t -> init:'b -> 'b

fold_right ~f [a1; โ€ฆ; an] ~init is f a1 (f a2 ( โ€ฆ (f an init) โ€ฆ )). Safe version of List.fold_right.

val fold_while : - f:('a -> 'b -> 'a * [ `Stop | `Continue ]) -> - init:'a -> + init:'c -> + 'c

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 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_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.0
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 assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

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_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

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 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

type 'a t = 'a list
val empty : 'a t

empty is [].

val is_empty : _ t -> bool

is_empty l returns true iff l = [].

  • since 0.11
val map : f:('a -> 'b) -> 'a t -> 'b t

map ~f [a0; a1; โ€ฆ; an] applies function f in turn to [a0; a1; โ€ฆ; an]. Safe version of List.map.

val cons : 'a -> 'a t -> 'a t

cons x l is x::l.

  • since 0.12
val append : 'a t -> 'a t -> 'a t

append l1 l2 returns the list that is the concatenation of l1 and l2. Safe version of List.append.

val cons' : 'a t -> 'a -> 'a t

cons' l x is the same as x :: l. This is convenient for fold functions such as List.fold_left or Array.fold_left.

  • since 3.3
val cons_maybe : 'a option -> 'a t -> 'a t

cons_maybe (Some x) l is x :: l. cons_maybe None l is l.

  • since 0.13
val filter : f:('a -> bool) -> 'a t -> 'a t

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 l is preserved. Safe version of List.filter.

val fold_right : f:('a -> 'b -> 'b) -> 'a t -> init:'b -> 'b

fold_right ~f [a1; โ€ฆ; an] ~init is f a1 (f a2 ( โ€ฆ (f an init) โ€ฆ )). Safe version of List.fold_right.

val fold_while : + f:('a -> 'b -> 'a * [ `Stop | `Continue ]) -> + init:'a -> 'b t -> 'a

fold_while ~f ~init l folds until a stop condition via ('a, `Stop) is indicated by the accumulator.

  • since 0.8
val fold_map : - f:('acc -> 'a -> 'acc * 'b) -> - init:'acc -> + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> 'a list -> 'acc * 'b list

fold_map ~f ~init l is a fold_left-like function, but it also maps the list to another list.

  • since 0.14
val fold_map_i : - f:('acc -> int -> 'a -> 'acc * 'b) -> - init:'acc -> + f:('acc -> int -> 'a -> 'acc * 'b) -> + init:'acc -> 'a list -> 'acc * 'b list

fold_map_i ~f ~init l is a foldi-like function, but it also maps the list to another list.

  • since 2.8
val fold_on_map : - f:('a -> 'b) -> - reduce:('acc -> 'b -> 'acc) -> - init:'acc -> + f:('a -> 'b) -> + reduce:('acc -> 'b -> 'acc) -> + init:'acc -> 'a list -> - 'acc

fold_on_map ~f ~reduce ~init l combines map ~f and fold_left ~reduce ~init in one operation.

  • since 2.8
val scan_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc list

scan_left ~f ~init l returns the list [init; f init x0; f (f init x0) x1; โ€ฆ] where x0, x1, etc. are the elements of l.

  • since 1.2, but only
  • since 2.2 with labels
val reduce : f:('a -> 'a -> 'a) -> 'a list -> 'a option

reduce f (hd::tl) returns Some (fold_left f hd tl). If l is empty, then None is returned.

  • since 3.2
val reduce_exn : f:('a -> 'a -> 'a) -> 'a list -> 'a

reduce_exn is the unsafe version of reduce.

  • raises Invalid_argument

    if the given list is empty.

  • since 3.2
val fold_map2 : - f:('acc -> 'a -> 'b -> 'acc * 'c) -> - init:'acc -> + 'acc

fold_on_map ~f ~reduce ~init l combines map ~f and fold_left ~reduce ~init in one operation.

  • since 2.8
val scan_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc list

scan_left ~f ~init l returns the list [init; f init x0; f (f init x0) x1; โ€ฆ] where x0, x1, etc. are the elements of l.

  • since 1.2, but only
  • since 2.2 with labels
val reduce : f:('a -> 'a -> 'a) -> 'a list -> 'a option

reduce f (hd::tl) returns Some (fold_left f hd tl). If l is empty, then None is returned.

  • since 3.2
val reduce_exn : f:('a -> 'a -> 'a) -> 'a list -> 'a

reduce_exn is the unsafe version of reduce.

  • raises Invalid_argument

    if the given list is empty.

  • since 3.2
val fold_map2 : + f:('acc -> 'a -> 'b -> 'acc * 'c) -> + init:'acc -> 'a list -> 'b list -> - 'acc * 'c list

fold_map2 ~f ~init l1 l2 is to fold_map what List.map2 is to List.map.

  • raises Invalid_argument

    if the lists do not have the same length.

  • since 0.16
val fold_filter_map : - f:('acc -> 'a -> 'acc * 'b option) -> - init:'acc -> + 'acc * 'c list

fold_map2 ~f ~init l1 l2 is to fold_map what List.map2 is to List.map.

  • raises Invalid_argument

    if the lists do not have the same length.

  • since 0.16
val fold_filter_map : + f:('acc -> 'a -> 'acc * 'b option) -> + init:'acc -> 'a list -> 'acc * 'b list

fold_filter_map ~f ~init l is a fold_left-like function, but also generates a list of output in a way similar to filter_map.

  • since 0.17
val fold_filter_map_i : - f:('acc -> int -> 'a -> 'acc * 'b option) -> - init:'acc -> + f:('acc -> int -> 'a -> 'acc * 'b option) -> + init:'acc -> 'a list -> 'acc * 'b list

fold_filter_map_i ~f ~init l is a foldi-like function, but also generates a list of output in a way similar to filter_map.

  • since 2.8
val fold_flat_map : - f:('acc -> 'a -> 'acc * 'b list) -> - init:'acc -> + f:('acc -> 'a -> 'acc * 'b list) -> + init:'acc -> 'a list -> 'acc * 'b list

fold_flat_map ~f ~init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.

  • since 0.14
val fold_flat_map_i : - f:('acc -> int -> 'a -> 'acc * 'b list) -> - init:'acc -> + f:('acc -> int -> 'a -> 'acc * 'b list) -> + init:'acc -> 'a list -> - 'acc * 'b list

fold_flat_map_i ~f ~init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.

  • since 2.8
val count : f:('a -> bool) -> 'a list -> int

count ~f l counts how many elements of l satisfy predicate f.

  • since 1.5, but only
  • since 2.2 with labels
val count_true_false : f:('a -> bool) -> 'a list -> int * int

count_true_false ~f l returns a pair (int1,int2) where int1 is the number of elements in l that satisfy the predicate f, and int2 the number of elements that do not satisfy f.

  • since 2.4
val init : int -> f:(int -> 'a) -> 'a t

init len ~f is f 0; f 1; โ€ฆ; f (len-1).

  • raises Invalid_argument

    if len < 0.

  • since 0.6
val combine : 'a list -> 'b list -> ('a * 'b) list

combine [a1; โ€ฆ; an] [b1; โ€ฆ; bn] is [(a1,b1); โ€ฆ; (an,bn)]. Transform two lists into a list of pairs. Like List.combine but tail-recursive.

  • raises Invalid_argument

    if the lists have distinct lengths.

  • since 1.2, but only
  • since 2.2 with labels
val combine_gen : 'a list -> 'b list -> ('a * 'b) gen

combine_gen l1 l2 transforms two lists into a gen of pairs. Lazy version of combine. Unlike combine, it does not fail if the lists have different lengths; instead, the output has as many pairs as the smallest input list.

  • since 1.2, but only
  • since 2.2 with labels
val combine_shortest : 'a list -> 'b list -> ('a * 'b) list

combine_shortest [a1; โ€ฆ; am] [b1; โ€ฆ; bn] is [(a1,b1); โ€ฆ; (am,bm)] if m <= n. Like combine but stops at the shortest list rather than raising.

  • since 3.1
val split : ('a * 'b) t -> 'a t * 'b t

split [(a1,b1); โ€ฆ; (an,bn)] is ([a1; โ€ฆ; an], [b1; โ€ฆ; bn]). Transform a list of pairs into a pair of lists. A tail-recursive version of List.split.

  • since 1.2, but only
  • since 2.2 with labels
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare cmp l1 l2 compares the two lists l1 and l2 using the given comparison function cmp.

val compare_lengths : 'a t -> 'b t -> int

compare_lengths l1 l2 compare the lengths of the two lists l1 and l2. Equivalent to compare (length l1) (length l2) but more efficient.

  • since 1.5, but only
  • since 2.2 with labels
val compare_length_with : 'a t -> int -> int

compare_length_with l x compares the length of the list l to an integer x. Equivalent to compare (length l) x but more efficient.

  • since 1.5, but only
  • since 2.2 with labels
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal p l1 l2 returns true if l1 and l2 are equal.

val flat_map : f:('a -> 'b t) -> 'a t -> 'b t

flat_map ~f l maps and flattens at the same time (safe). Evaluation order is not guaranteed.

val flat_map_i : f:(int -> 'a -> 'b t) -> 'a t -> 'b t

flat_map_i ~f l maps with index and flattens at the same time (safe). Evaluation order is not guaranteed.

  • since 2.8
val flatten : 'a t t -> 'a t

flatten [l1]; [l2]; โ€ฆ concatenates a list of lists. Safe version of List.flatten.

val product : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

product ~f l1 l2 computes the cartesian product of the two lists, with the given combinator f.

val fold_product : f:('c -> 'a -> 'b -> 'c) -> init:'c -> 'a t -> 'b t -> 'c

fold_product ~f ~init l1 l2 applies the function f with the accumulator init on all the pair of elements of l1 and l2. Fold on the cartesian product.

val cartesian_product : 'a t t -> 'a t t

cartesian_product [[l1];[l2]; โ€ฆ; [ln]] produces the cartesian product of this list of lists, by returning all the ways of picking one element per sublist. NOTE the order of the returned list is unspecified. For example:

# cartesian_product [[1;2];[3];[4;5;6]] |> sort =
+  'acc * 'b list

fold_flat_map_i ~f ~init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.

  • since 2.8
val count : f:('a -> bool) -> 'a list -> int

count ~f l counts how many elements of l satisfy predicate f.

  • since 1.5, but only
  • since 2.2 with labels
val count_true_false : f:('a -> bool) -> 'a list -> int * int

count_true_false ~f l returns a pair (int1,int2) where int1 is the number of elements in l that satisfy the predicate f, and int2 the number of elements that do not satisfy f.

  • since 2.4
val init : int -> f:(int -> 'a) -> 'a t

init len ~f is f 0; f 1; โ€ฆ; f (len-1).

  • raises Invalid_argument

    if len < 0.

  • since 0.6
val combine : 'a list -> 'b list -> ('a * 'b) list

combine [a1; โ€ฆ; an] [b1; โ€ฆ; bn] is [(a1,b1); โ€ฆ; (an,bn)]. Transform two lists into a list of pairs. Like List.combine but tail-recursive.

  • raises Invalid_argument

    if the lists have distinct lengths.

  • since 1.2, but only
  • since 2.2 with labels
val combine_gen : 'a list -> 'b list -> ('a * 'b) gen

combine_gen l1 l2 transforms two lists into a gen of pairs. Lazy version of combine. Unlike combine, it does not fail if the lists have different lengths; instead, the output has as many pairs as the smallest input list.

  • since 1.2, but only
  • since 2.2 with labels
val combine_shortest : 'a list -> 'b list -> ('a * 'b) list

combine_shortest [a1; โ€ฆ; am] [b1; โ€ฆ; bn] is [(a1,b1); โ€ฆ; (am,bm)] if m <= n. Like combine but stops at the shortest list rather than raising.

  • since 3.1
val split : ('a * 'b) t -> 'a t * 'b t

split [(a1,b1); โ€ฆ; (an,bn)] is ([a1; โ€ฆ; an], [b1; โ€ฆ; bn]). Transform a list of pairs into a pair of lists. A tail-recursive version of List.split.

  • since 1.2, but only
  • since 2.2 with labels
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare cmp l1 l2 compares the two lists l1 and l2 using the given comparison function cmp.

val compare_lengths : 'a t -> 'b t -> int

compare_lengths l1 l2 compare the lengths of the two lists l1 and l2. Equivalent to compare (length l1) (length l2) but more efficient.

  • since 1.5, but only
  • since 2.2 with labels
val compare_length_with : 'a t -> int -> int

compare_length_with l x compares the length of the list l to an integer x. Equivalent to compare (length l) x but more efficient.

  • since 1.5, but only
  • since 2.2 with labels
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal p l1 l2 returns true if l1 and l2 are equal.

val flat_map : f:('a -> 'b t) -> 'a t -> 'b t

flat_map ~f l maps and flattens at the same time (safe). Evaluation order is not guaranteed.

val flat_map_i : f:(int -> 'a -> 'b t) -> 'a t -> 'b t

flat_map_i ~f l maps with index and flattens at the same time (safe). Evaluation order is not guaranteed.

  • since 2.8
val flatten : 'a t t -> 'a t

flatten [l1]; [l2]; โ€ฆ concatenates a list of lists. Safe version of List.flatten.

val product : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

product ~f l1 l2 computes the cartesian product of the two lists, with the given combinator f.

val fold_product : f:('c -> 'a -> 'b -> 'c) -> init:'c -> 'a t -> 'b t -> 'c

fold_product ~f ~init l1 l2 applies the function f with the accumulator init on all the pair of elements of l1 and l2. Fold on the cartesian product.

val cartesian_product : 'a t t -> 'a t t

cartesian_product [[l1];[l2]; โ€ฆ; [ln]] produces the cartesian product of this list of lists, by returning all the ways of picking one element per sublist. NOTE the order of the returned list is unspecified. For example:

# cartesian_product [[1;2];[3];[4;5;6]] |> sort =
 [[1;3;4];[1;3;5];[1;3;6];[2;3;4];[2;3;5];[2;3;6]];;
 # cartesian_product [[1;2];[];[4;5;6]] = [];;
 # cartesian_product [[1;2];[3];[4];[5];[6]] |> sort =
-[[1;3;4;5;6];[2;3;4;5;6]];;

invariant: cartesian_product l = map_product id l.

  • since 1.2, but only
  • since 2.2 with labels
val map_product_l : f:('a -> 'b list) -> 'a list -> 'b list list

map_product_l ~f l maps each element of l to a list of objects of type 'b using f. We obtain [l1; l2; โ€ฆ; ln] where length l=n and li : 'b list. Then, it returns all the ways of picking exactly one element per li.

  • since 1.2, but only
  • since 2.2 with labels
val diagonal : 'a t -> ('a * 'a) t

diagonal l returns all pairs of distinct positions of the list l, that is the list of List.nth i l, List.nth j l if i < j.

val partition_map_either : - f:('a -> ('b, 'c) CCEither.t) -> +[[1;3;4;5;6];[2;3;4;5;6]];;

invariant: cartesian_product l = map_product id l.

  • since 1.2, but only
  • since 2.2 with labels
val map_product_l : f:('a -> 'b list) -> 'a list -> 'b list list

map_product_l ~f l maps each element of l to a list of objects of type 'b using f. We obtain [l1; l2; โ€ฆ; ln] where length l=n and li : 'b list. Then, it returns all the ways of picking exactly one element per li.

  • since 1.2, but only
  • since 2.2 with labels
val diagonal : 'a t -> ('a * 'a) t

diagonal l returns all pairs of distinct positions of the list l, that is the list of List.nth i l, List.nth j l if i < j.

val partition_map_either : + f:('a -> ('b, 'c) CCEither.t) -> 'a list -> 'b list * 'c list

partition_map_either ~f l maps f on l and gather results in lists:

  • if f x = Left y, adds y to the first list.
  • if f x = Right z, adds z to the second list.
  • since 3.3
val partition_filter_map : - f:('a -> [< `Left of 'b | `Right of 'c | `Drop ]) -> + f:('a -> [< `Left of 'b | `Right of 'c | `Drop ]) -> 'a list -> 'b list * 'c list

partition_filter_map ~f l maps f on l and gather results in lists:

  • if f x = `Left y, adds y to the first list.
  • if f x = `Right z, adds z to the second list.
  • if f x = `Drop, ignores x.
  • since 0.11
val partition_map : - f:('a -> [< `Left of 'b | `Right of 'c | `Drop ]) -> + f:('a -> [< `Left of 'b | `Right of 'c | `Drop ]) -> 'a list -> - 'b list * 'c list
val group_by : ?hash:('a -> int) -> ?eq:('a -> 'a -> bool) -> 'a t -> 'a list t

group_by ?hash ?eq l groups equal elements, regardless of their order of appearance. precondition: for any x and y, if eq x y then hash x = hash y must hold.

  • since 2.3
val join : join_row:('a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t

join ~join_row a b combines every element of a with every element of b using join_row. If join_row returns None, then the two elements do not combine. Assume that b allows for multiple iterations.

  • since 2.3
val join_by : - ?eq:('key -> 'key -> bool) -> - ?hash:('key -> int) -> + 'b list * 'c list
val group_by : ?hash:('a -> int) -> ?eq:('a -> 'a -> bool) -> 'a t -> 'a list t

group_by ?hash ?eq l groups equal elements, regardless of their order of appearance. precondition: for any x and y, if eq x y then hash x = hash y must hold.

  • since 2.3
val join : join_row:('a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t

join ~join_row a b combines every element of a with every element of b using join_row. If join_row returns None, then the two elements do not combine. Assume that b allows for multiple iterations.

  • since 2.3
val join_by : + ?eq:('key -> 'key -> bool) -> + ?hash:('key -> int) -> ('a -> 'key) -> ('b -> 'key) -> - merge:('key -> 'a -> 'b -> 'c option) -> + merge:('key -> 'a -> 'b -> 'c option) -> 'a t -> 'b t -> 'c t

join_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and combine values (x,y) from (a,b) with the same key using merge. If merge returns None, the combination of values is discarded. precondition: for any x and y, if eq x y then hash x = hash y must hold.

  • since 2.3
val join_all_by : - ?eq:('key -> 'key -> bool) -> - ?hash:('key -> int) -> + ?eq:('key -> 'key -> bool) -> + ?hash:('key -> int) -> ('a -> 'key) -> ('b -> 'key) -> - merge:('key -> 'a list -> 'b list -> 'c option) -> + merge:('key -> 'a list -> 'b list -> 'c option) -> 'a t -> 'b t -> 'c t

join_all_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and, for each key k occurring in at least one of them:

  • compute the list l1 of elements of a that map to k
  • compute the list l2 of elements of b that map to k
  • call merge k l1 l2. If merge returns None, the combination of values is discarded, otherwise it returns Some c and c is inserted in the result.
  • since 2.3
val group_join_by : - ?eq:('a -> 'a -> bool) -> - ?hash:('a -> int) -> + ?eq:('a -> 'a -> bool) -> + ?hash:('a -> int) -> ('b -> 'a) -> 'a t -> 'b t -> ('a * 'b list) t

group_join_by ?eq ?hash key la lb associates to every element x of the first sequence, all the elements y of the second sequence such that eq x (key y). Elements of the first sequences without corresponding values in the second one are mapped to [] precondition: for any x and y, if eq x y then hash x = hash y must hold.

  • since 2.3
val sublists_of_len : - ?last:('a list -> 'a list option) -> - ?offset:int -> - len:int -> + ?last:('a list -> 'a list option) -> + ?offset:int -> + len:int -> 'a list -> - 'a list list

sublists_of_len ?last ?offset n l returns sub-lists of l that have length n. By default, these sub-lists are non overlapping: sublists_of_len 2 [1;2;3;4;5;6] returns [1;2]; [3;4]; [5;6].

Examples:

  • sublists_of_len 2 [1;2;3;4;5;6] = [[1;2]; [3;4]; [5;6]].
  • sublists_of_len 2 ~offset:3 [1;2;3;4;5;6] = [1;2];[4;5].
  • sublists_of_len 3 ~last:CCOption.return [1;2;3;4] = [1;2;3];[4].
  • sublists_of_len 2 [1;2;3;4;5] = [[1;2]; [3;4]].
  • parameter offset

    the number of elements skipped between two consecutive sub-lists. By default it is n. If offset < n, the sub-lists will overlap; if offset > n, some elements will not appear at all.

  • parameter last

    if provided and the last group of elements g is such that length g < n, last g is called. If last g = Some g', g' is appended; otherwise g is dropped. If last = CCOption.return, it will simply keep the last group. By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.

  • since 1.0, but only
  • since 1.5 with labels
val chunks : int -> 'a list -> 'a list list

chunks n l returns consecutives chunks of size at most n from l. Each item of l will occur in exactly one chunk. Only the last chunk might be of length smaller than n. Invariant: (chunks n l |> List.flatten) = l.

  • since 3.2
val intersperse : x:'a -> 'a list -> 'a list

intersperse ~x l inserts the element x between adjacent elements of the list l.

  • since 2.1, but only
  • since 2.2 with labels
val interleave : 'a list -> 'a list -> 'a list

interleave [x1โ€ฆxn] [y1โ€ฆym] is [x1,y1,x2,y2,โ€ฆ] and finishes with the suffix of the longest list.

  • since 2.1, but only
  • since 2.2 with labels
val pure : 'a -> 'a t

pure x is return x.

val mguard : bool -> unit t

mguard c is pure () if c is true, [] otherwise. This is useful to define a list by comprehension, e.g.:

# let square_even xs =
+  'a list list

sublists_of_len ?last ?offset n l returns sub-lists of l that have length n. By default, these sub-lists are non overlapping: sublists_of_len 2 [1;2;3;4;5;6] returns [1;2]; [3;4]; [5;6].

Examples:

  • sublists_of_len 2 [1;2;3;4;5;6] = [[1;2]; [3;4]; [5;6]].
  • sublists_of_len 2 ~offset:3 [1;2;3;4;5;6] = [1;2];[4;5].
  • sublists_of_len 3 ~last:CCOption.return [1;2;3;4] = [1;2;3];[4].
  • sublists_of_len 2 [1;2;3;4;5] = [[1;2]; [3;4]].
  • parameter offset

    the number of elements skipped between two consecutive sub-lists. By default it is n. If offset < n, the sub-lists will overlap; if offset > n, some elements will not appear at all.

  • parameter last

    if provided and the last group of elements g is such that length g < n, last g is called. If last g = Some g', g' is appended; otherwise g is dropped. If last = CCOption.return, it will simply keep the last group. By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.

  • since 1.0, but only
  • since 1.5 with labels
val chunks : int -> 'a list -> 'a list list

chunks n l returns consecutives chunks of size at most n from l. Each item of l will occur in exactly one chunk. Only the last chunk might be of length smaller than n. Invariant: (chunks n l |> List.flatten) = l.

  • since 3.2
val intersperse : x:'a -> 'a list -> 'a list

intersperse ~x l inserts the element x between adjacent elements of the list l.

  • since 2.1, but only
  • since 2.2 with labels
val interleave : 'a list -> 'a list -> 'a list

interleave [x1โ€ฆxn] [y1โ€ฆym] is [x1,y1,x2,y2,โ€ฆ] and finishes with the suffix of the longest list.

  • since 2.1, but only
  • since 2.2 with labels
val pure : 'a -> 'a t

pure x is return x.

val mguard : bool -> unit t

mguard c is pure () if c is true, [] otherwise. This is useful to define a list by comprehension, e.g.:

# let square_even xs =
       let* x = xs in
       let* () = mguard (x mod 2 = 0) in
       return @@ x * x;;
 val square_even : int list -> int list = <fun>
 # square_even [1;2;4;3;5;2];;
-- : int list = [4; 16; 4]
  • since 3.1
val return : 'a -> 'a t

return x is x.

val take : int -> 'a t -> 'a t

take n l takes the n first elements of the list l, drop the rest.

val drop : int -> 'a t -> 'a t

drop n l drops the n first elements of the list l, keep the rest.

val hd_tl : 'a t -> 'a * 'a t

hd_tl (x :: l) returns x, l.

  • raises Failure

    if the list is empty.

  • since 0.16
val take_drop : int -> 'a t -> 'a t * 'a t

take_drop n l returns l1, l2 such that l1 @ l2 = l and length l1 = min (length l) n.

val take_while : f:('a -> bool) -> 'a t -> 'a t

take_while ~f l returns the longest prefix of l for which f is true.

  • since 0.13
val drop_while : f:('a -> bool) -> 'a t -> 'a t

drop_while ~f l drops the longest prefix of l for which f is true.

  • since 0.13
val take_drop_while : f:('a -> bool) -> 'a t -> 'a t * 'a t

take_drop_while ~f l = take_while ~f l, drop_while ~f l.

  • since 1.2, but only
  • since 2.2 with labels
val last : int -> 'a t -> 'a t

last n l takes the last n elements of l (or less if l doesn't have that many elements).

val head_opt : 'a t -> 'a option

head_opt l returns Some x (the first element of the list l) or None if the list l is empty.

  • since 0.20
val tail_opt : 'a t -> 'a t option

tail_opt l returns Some l' (the given list l without its first element) or None if the list l is empty.

  • since 2.0
val last_opt : 'a t -> 'a option

last_opt l returns Some x (the last element of l) or None if the list l is empty.

  • since 0.20
val find_pred : f:('a -> bool) -> 'a t -> 'a option

find_pred ~f l finds the first element of l that satisfies f, or returns None if no element satisfies f.

  • since 0.11
val find_opt : f:('a -> bool) -> 'a t -> 'a option

find_opt ~f l is the safe version of find.

  • since 1.5, but only
  • since 2.2 with labels
val find_pred_exn : f:('a -> bool) -> 'a t -> 'a

find_pred_exn ~f l is the unsafe version of find_pred.

  • raises Not_found

    if no such element is found.

  • since 0.11
val find_map : f:('a -> 'b option) -> 'a t -> 'b option

find_map ~f l traverses l, applying f to each element. If for some element x, f x = Some y, then Some y is returned. Otherwise the call returns None.

  • since 0.11
val find_mapi : f:(int -> 'a -> 'b option) -> 'a t -> 'b option

find_mapi ~f l is like find_map, but also pass the index to the predicate function.

  • since 0.11
val find_idx : f:('a -> bool) -> 'a t -> (int * 'a) option

find_idx ~f x returns Some (i,x) where x is the i-th element of l, and f x holds. Otherwise returns None.

val remove : eq:('a -> 'a -> bool) -> key:'a -> 'a t -> 'a t

remove ~eq ~key l removes every instance of key from l. Tail-recursive.

  • parameter eq

    equality function.

  • since 0.11
val filter_map : f:('a -> 'b option) -> 'a t -> 'b t

filter_map ~f l is the sublist of l containing only elements for which f returns Some e. Map and remove elements at the same time.

val keep_some : 'a option t -> 'a t

keep_some l retains only elements of the form Some x. Like filter_map CCFun.id.

  • since 1.3, but only
  • since 2.2 with labels
val keep_ok : ('a, _) result t -> 'a t

keep_ok l retains only elements of the form Ok x.

  • since 1.3, but only
  • since 2.2 with labels
val all_some : 'a option t -> 'a t option

all_some l returns Some l' if all elements of l are of the form Some x, or None otherwise.

  • since 1.3, but only
  • since 2.2 with labels
val all_ok : ('a, 'err) result t -> ('a t, 'err) result

all_ok l returns Ok l' if all elements of l are of the form Ok x, or Error e otherwise (with the first error met).

  • since 1.3, but only
  • since 2.2 with labels
val sorted_mem : cmp:('a -> 'a -> int) -> 'a -> 'a list -> bool

sorted_mem ~cmp x l and mem x l give the same result for any sorted list l, but potentially more efficiently.

  • since 3.5
val sorted_merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_merge ~cmp l1 l2 merges elements from both sorted list using the given comparison function cmp.

val sorted_diff : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_diff ~cmp l1 l2 returns the elements in l1 that are not in l2. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff ~cmp [1;1;1;2;2;3] [1;2;2] would be [1;1;3]. It is the left inverse of sorted_merge; that is, sorted_diff ~cmp (sorted_merge ~cmp l1 l2) l2 is always equal to l1 for sorted lists l1 and l2.

  • since 3.5
val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

sort_uniq ~cmp l sorts the list l using the given comparison function cmp and remove duplicate elements.

val sorted_merge_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_merge_uniq ~cmp l1 l2 merges the sorted lists l1 and l2 and removes duplicates.

  • since 0.10
val sorted_diff_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_diff_uniq ~cmp l1 l2 collects the elements in l1 that are not in l2 and then remove duplicates. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2] would be [1]. sorted_diff_uniq ~cmp l1 l2 and uniq_succ ~eq (sorted_diff ~cmp l1 l2) always give the same result for sorted l1 and l2 and compatible cmp and eq.

  • since 3.5
val is_sorted : cmp:('a -> 'a -> int) -> 'a list -> bool

is_sorted ~cmp l returns true iff l is sorted (according to given order).

  • parameter cmp

    the comparison function.

  • since 0.17
val sorted_insert : - cmp:('a -> 'a -> int) -> - ?uniq:bool -> +- : int list = [4; 16; 4]
  • since 3.1
val return : 'a -> 'a t

return x is x.

val take : int -> 'a t -> 'a t

take n l takes the n first elements of the list l, drop the rest.

val drop : int -> 'a t -> 'a t

drop n l drops the n first elements of the list l, keep the rest.

val hd_tl : 'a t -> 'a * 'a t

hd_tl (x :: l) returns x, l.

  • raises Failure

    if the list is empty.

  • since 0.16
val take_drop : int -> 'a t -> 'a t * 'a t

take_drop n l returns l1, l2 such that l1 @ l2 = l and length l1 = min (length l) n.

val take_while : f:('a -> bool) -> 'a t -> 'a t

take_while ~f l returns the longest prefix of l for which f is true.

  • since 0.13
val drop_while : f:('a -> bool) -> 'a t -> 'a t

drop_while ~f l drops the longest prefix of l for which f is true.

  • since 0.13
val take_drop_while : f:('a -> bool) -> 'a t -> 'a t * 'a t

take_drop_while ~f l = take_while ~f l, drop_while ~f l.

  • since 1.2, but only
  • since 2.2 with labels
val last : int -> 'a t -> 'a t

last n l takes the last n elements of l (or less if l doesn't have that many elements).

val head_opt : 'a t -> 'a option

head_opt l returns Some x (the first element of the list l) or None if the list l is empty.

  • since 0.20
val tail_opt : 'a t -> 'a t option

tail_opt l returns Some l' (the given list l without its first element) or None if the list l is empty.

  • since 2.0
val last_opt : 'a t -> 'a option

last_opt l returns Some x (the last element of l) or None if the list l is empty.

  • since 0.20
val find_pred : f:('a -> bool) -> 'a t -> 'a option

find_pred ~f l finds the first element of l that satisfies f, or returns None if no element satisfies f.

  • since 0.11
val find_opt : f:('a -> bool) -> 'a t -> 'a option

find_opt ~f l is the safe version of find.

  • since 1.5, but only
  • since 2.2 with labels
val find_pred_exn : f:('a -> bool) -> 'a t -> 'a

find_pred_exn ~f l is the unsafe version of find_pred.

  • raises Not_found

    if no such element is found.

  • since 0.11
val find_map : f:('a -> 'b option) -> 'a t -> 'b option

find_map ~f l traverses l, applying f to each element. If for some element x, f x = Some y, then Some y is returned. Otherwise the call returns None.

  • since 0.11
val find_mapi : f:(int -> 'a -> 'b option) -> 'a t -> 'b option

find_mapi ~f l is like find_map, but also pass the index to the predicate function.

  • since 0.11
val find_idx : f:('a -> bool) -> 'a t -> (int * 'a) option

find_idx ~f x returns Some (i,x) where x is the i-th element of l, and f x holds. Otherwise returns None.

val remove : eq:('a -> 'a -> bool) -> key:'a -> 'a t -> 'a t

remove ~eq ~key l removes every instance of key from l. Tail-recursive.

  • parameter eq

    equality function.

  • since 0.11
val filter_map : f:('a -> 'b option) -> 'a t -> 'b t

filter_map ~f l is the sublist of l containing only elements for which f returns Some e. Map and remove elements at the same time.

val keep_some : 'a option t -> 'a t

keep_some l retains only elements of the form Some x. Like filter_map CCFun.id.

  • since 1.3, but only
  • since 2.2 with labels
val keep_ok : ('a, _) result t -> 'a t

keep_ok l retains only elements of the form Ok x.

  • since 1.3, but only
  • since 2.2 with labels
val all_some : 'a option t -> 'a t option

all_some l returns Some l' if all elements of l are of the form Some x, or None otherwise.

  • since 1.3, but only
  • since 2.2 with labels
val all_ok : ('a, 'err) result t -> ('a t, 'err) result

all_ok l returns Ok l' if all elements of l are of the form Ok x, or Error e otherwise (with the first error met).

  • since 1.3, but only
  • since 2.2 with labels
val sorted_mem : cmp:('a -> 'a -> int) -> 'a -> 'a list -> bool

sorted_mem ~cmp x l and mem x l give the same result for any sorted list l, but potentially more efficiently.

  • since 3.5
val sorted_merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_merge ~cmp l1 l2 merges elements from both sorted list using the given comparison function cmp.

val sorted_diff : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_diff ~cmp l1 l2 returns the elements in l1 that are not in l2. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff ~cmp [1;1;1;2;2;3] [1;2;2] would be [1;1;3]. It is the left inverse of sorted_merge; that is, sorted_diff ~cmp (sorted_merge ~cmp l1 l2) l2 is always equal to l1 for sorted lists l1 and l2.

  • since 3.5
val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

sort_uniq ~cmp l sorts the list l using the given comparison function cmp and remove duplicate elements.

val sorted_merge_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_merge_uniq ~cmp l1 l2 merges the sorted lists l1 and l2 and removes duplicates.

  • since 0.10
val sorted_diff_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

sorted_diff_uniq ~cmp l1 l2 collects the elements in l1 that are not in l2 and then remove duplicates. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2] would be [1]. sorted_diff_uniq ~cmp l1 l2 and uniq_succ ~eq (sorted_diff ~cmp l1 l2) always give the same result for sorted l1 and l2 and compatible cmp and eq.

  • since 3.5
val is_sorted : cmp:('a -> 'a -> int) -> 'a list -> bool

is_sorted ~cmp l returns true iff l is sorted (according to given order).

  • parameter cmp

    the comparison function.

  • since 0.17
val sorted_insert : + cmp:('a -> 'a -> int) -> + ?uniq:bool -> 'a -> 'a list -> 'a list

sorted_insert ~cmp ?uniq x l inserts x into l such that, if l was sorted, then sorted_insert x l is sorted too.

  • parameter uniq

    if true and x is already in sorted position in l, then x is not duplicated. Default false (x will be inserted in any case).

  • since 0.17
val sorted_remove : - cmp:('a -> 'a -> int) -> - ?all:bool -> + cmp:('a -> 'a -> int) -> + ?all:bool -> 'a -> 'a list -> - 'a list

sorted_remove ~cmp x l removes x from a sorted list l such that the return value is sorted too. By default, it is the left inverse of sorted_insert; that is, sorted_remove ~cmp x (sorted_insert ~cmp x l) is equal to l for any sorted list l.

  • parameter all

    if true then all occurrences of x will be removed. Otherwise, only the first x will be removed (if any). Default false (only the first will be removed).

  • since 3.5
val uniq_succ : eq:('a -> 'a -> bool) -> 'a list -> 'a list

uniq_succ ~eq l removes duplicate elements that occur one next to the other. Examples: uniq_succ [1;2;1] = [1;2;1]. uniq_succ [1;1;2] = [1;2].

  • since 0.10
val group_succ : eq:('a -> 'a -> bool) -> 'a list -> 'a list list

group_succ ~eq l groups together consecutive elements that are equal according to eq.

  • since 0.11

Indices

val mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b t

mapi ~f l is like map, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

val iteri : f:(int -> 'a -> unit) -> 'a t -> unit

iteri ~f l is like iter, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

val iteri2 : f:(int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit

iteri2 ~f l1 l2 applies f to the two lists l1 and l2 simultaneously. The integer passed to f indicates the index of element.

  • raises Invalid_argument

    when lists do not have the same length.

  • since 2.0, but only
  • since 2.2 with labels
val foldi : f:('b -> int -> 'a -> 'b) -> init:'b -> 'a t -> 'b

foldi ~f ~init l is like fold but it also passes in the index of each element, from 0 to length l - 1 as additional argument to the folded function f. Tail-recursive.

val foldi2 : f:('c -> int -> 'a -> 'b -> 'c) -> init:'c -> 'a t -> 'b t -> 'c

foldi2 ~f ~init l1 l2 folds on the two lists l1 and l2, with index of each element passed to the function f. Computes f(โ€ฆ (f init i_0 l1_0 l2_0) โ€ฆ) i_n l1_n l2_n .

  • raises Invalid_argument

    when lists do not have the same length.

  • since 2.0, but only
  • since 2.2 with labels
val get_at_idx : int -> 'a t -> 'a option

get_at_idx i l returns Some i-th element of the given list l or None if the list l is too short. If the index is negative, it will get element starting from the end of the list l.

val nth_opt : 'a t -> int -> 'a option

nth_opt l n returns Some n-th element of l. Safe version of nth.

  • raises Invalid_argument

    if the int is negative.

  • since 1.5, but only
  • since 2.2 with labels
val get_at_idx_exn : int -> 'a t -> 'a

get_at_idx_exn i l gets the i-th element of l, or

  • raises Not_found

    if the index is invalid. The first element has index 0. If the index is negative, it will get element starting from the end of the list.

val set_at_idx : int -> 'a -> 'a t -> 'a t

set_at_idx i x l replaces the i-th element with x (removes the old one), or does nothing if index is too high. If the index is negative, it will set element starting from the end of the list.

val insert_at_idx : int -> 'a -> 'a t -> 'a t

insert_at_idx i x l inserts x at i-th position, between the two existing elements. If the index is too high, append at the end of the list. If the index is negative, it will insert element starting from the end of the list.

val remove_at_idx : int -> 'a t -> 'a t

remove_at_idx i l removes element at given index i. Does nothing if the index is too high. If the index is negative, it will remove element starting from the end of the list.

Set Operators

Those operations maintain the invariant that the list does not contain duplicates (if it already satisfies it).

val add_nodup : eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t

add_nodup ~eq x set adds x to set if it was not already present. Linear time.

  • since 0.11
val remove_one : eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t

remove_one ~eq x set removes one occurrence of x from set. Linear time.

  • since 0.11
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool

mem ?eq x l is true iff x is equal to an element of l. A comparator function eq can be provided. Linear time.

val subset : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

subset ~eq l1 l2 tests if all elements of the list l1 are contained in the list l2 by applying eq.

val uniq : eq:('a -> 'a -> bool) -> 'a t -> 'a t

uniq ~eq l removes duplicates in l w.r.t the equality predicate eq. Complexity is quadratic in the length of the list, but the order of elements is preserved. If you wish for a faster de-duplication but do not care about the order, use sort_uniq.

val union : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t

union ~eq l1 l2 is the union of the lists l1 and l2 w.r.t. the equality predicate eq. Complexity is product of length of inputs.

val inter : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t

inter ~eq l1 l2 is the intersection of the lists l1 and l2 w.r.t. the equality predicate eq. Complexity is product of length of inputs.

Other Constructors

val range_by : step:int -> int -> int -> int t

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 0.18
val range : int -> int -> int t

range i j iterates on integers from i to j included. It works both for decreasing and increasing ranges.

val range' : int -> int -> int t

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = [0;1;2;3;4].

val replicate : int -> 'a -> 'a t

replicate n x replicates the given element x n times.

val repeat : int -> 'a t -> 'a t

repeat n l concatenates the list l with itself n times.

Association Lists

module Assoc : sig ... end
val assoc : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> 'b

assoc ~eq k alist returns the value v associated with key k in alist. Like Assoc.get_exn.

  • since 2.0
val assoc_opt : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> 'b option

assoc_opt ~eq k alist returns Some v if the given key k is present into alist, or None if not present. Like Assoc.get.

  • since 1.5, but only
  • since 2.0 with labels
val assq_opt : 'a -> ('a * 'b) t -> 'b option

assq_opt k alist returns Some v if the given key k is present into alist. Like Assoc.assoc_opt but use physical equality instead of structural equality to compare keys. Safe version of assq.

  • since 1.5, but only
  • since 2.0 with labels
val mem_assoc : ?eq:('a -> 'a -> bool) -> 'a -> ('a * _) t -> bool

mem_assoc ?eq k alist returns true iff k is a key in alist. Like Assoc.mem.

  • since 2.0
val remove_assoc : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> ('a * 'b) t

remove_assoc ~eq k alist returns the alist without the first pair with key k, if any. Like Assoc.remove.

  • since 2.0

References on Lists

  • since 0.3.3
module Ref : sig ... end
module type MONAD = sig ... end
module Traverse (M : MONAD) : sig ... end

Conversions

val random : 'a random_gen -> 'a t random_gen
val random_non_empty : 'a random_gen -> 'a t random_gen
val random_len : int -> 'a random_gen -> 'a t random_gen
val random_choose : 'a t -> 'a random_gen

random_choose l randomly chooses an element in the list l.

  • raises Not_found

    if the list is empty.

val random_sequence : 'a random_gen t -> 'a t random_gen
val to_string : - ?start:string -> - ?stop:string -> - ?sep:string -> + 'a list

sorted_remove ~cmp x l removes x from a sorted list l such that the return value is sorted too. By default, it is the left inverse of sorted_insert; that is, sorted_remove ~cmp x (sorted_insert ~cmp x l) is equal to l for any sorted list l.

  • parameter all

    if true then all occurrences of x will be removed. Otherwise, only the first x will be removed (if any). Default false (only the first will be removed).

  • since 3.5
val uniq_succ : eq:('a -> 'a -> bool) -> 'a list -> 'a list

uniq_succ ~eq l removes duplicate elements that occur one next to the other. Examples: uniq_succ [1;2;1] = [1;2;1]. uniq_succ [1;1;2] = [1;2].

  • since 0.10
val group_succ : eq:('a -> 'a -> bool) -> 'a list -> 'a list list

group_succ ~eq l groups together consecutive elements that are equal according to eq.

  • since 0.11

Indices

val mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b t

mapi ~f l is like map, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

val iteri : f:(int -> 'a -> unit) -> 'a t -> unit

iteri ~f l is like iter, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

val iteri2 : f:(int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit

iteri2 ~f l1 l2 applies f to the two lists l1 and l2 simultaneously. The integer passed to f indicates the index of element.

  • raises Invalid_argument

    when lists do not have the same length.

  • since 2.0, but only
  • since 2.2 with labels
val foldi : f:('b -> int -> 'a -> 'b) -> init:'b -> 'a t -> 'b

foldi ~f ~init l is like fold but it also passes in the index of each element, from 0 to length l - 1 as additional argument to the folded function f. Tail-recursive.

val foldi2 : f:('c -> int -> 'a -> 'b -> 'c) -> init:'c -> 'a t -> 'b t -> 'c

foldi2 ~f ~init l1 l2 folds on the two lists l1 and l2, with index of each element passed to the function f. Computes f(โ€ฆ (f init i_0 l1_0 l2_0) โ€ฆ) i_n l1_n l2_n .

  • raises Invalid_argument

    when lists do not have the same length.

  • since 2.0, but only
  • since 2.2 with labels
val get_at_idx : int -> 'a t -> 'a option

get_at_idx i l returns Some i-th element of the given list l or None if the list l is too short. If the index is negative, it will get element starting from the end of the list l.

val nth_opt : 'a t -> int -> 'a option

nth_opt l n returns Some n-th element of l. Safe version of nth.

  • raises Invalid_argument

    if the int is negative.

  • since 1.5, but only
  • since 2.2 with labels
val get_at_idx_exn : int -> 'a t -> 'a

get_at_idx_exn i l gets the i-th element of l, or

  • raises Not_found

    if the index is invalid. The first element has index 0. If the index is negative, it will get element starting from the end of the list.

val set_at_idx : int -> 'a -> 'a t -> 'a t

set_at_idx i x l replaces the i-th element with x (removes the old one), or does nothing if index is too high. If the index is negative, it will set element starting from the end of the list.

val insert_at_idx : int -> 'a -> 'a t -> 'a t

insert_at_idx i x l inserts x at i-th position, between the two existing elements. If the index is too high, append at the end of the list. If the index is negative, it will insert element starting from the end of the list.

val remove_at_idx : int -> 'a t -> 'a t

remove_at_idx i l removes element at given index i. Does nothing if the index is too high. If the index is negative, it will remove element starting from the end of the list.

Set Operators

Those operations maintain the invariant that the list does not contain duplicates (if it already satisfies it).

val add_nodup : eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t

add_nodup ~eq x set adds x to set if it was not already present. Linear time.

  • since 0.11
val remove_one : eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t

remove_one ~eq x set removes one occurrence of x from set. Linear time.

  • since 0.11
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool

mem ?eq x l is true iff x is equal to an element of l. A comparator function eq can be provided. Linear time.

val subset : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

subset ~eq l1 l2 tests if all elements of the list l1 are contained in the list l2 by applying eq.

val uniq : eq:('a -> 'a -> bool) -> 'a t -> 'a t

uniq ~eq l removes duplicates in l w.r.t the equality predicate eq. Complexity is quadratic in the length of the list, but the order of elements is preserved. If you wish for a faster de-duplication but do not care about the order, use sort_uniq.

val union : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t

union ~eq l1 l2 is the union of the lists l1 and l2 w.r.t. the equality predicate eq. Complexity is product of length of inputs.

val inter : eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t

inter ~eq l1 l2 is the intersection of the lists l1 and l2 w.r.t. the equality predicate eq. Complexity is product of length of inputs.

Other Constructors

val range_by : step:int -> int -> int -> int t

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 0.18
val range : int -> int -> int t

range i j iterates on integers from i to j included. It works both for decreasing and increasing ranges.

val range' : int -> int -> int t

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = [0;1;2;3;4].

val replicate : int -> 'a -> 'a t

replicate n x replicates the given element x n times.

val repeat : int -> 'a t -> 'a t

repeat n l concatenates the list l with itself n times.

Association Lists

module Assoc : sig ... end
val assoc : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> 'b

assoc ~eq k alist returns the value v associated with key k in alist. Like Assoc.get_exn.

  • since 2.0
val assoc_opt : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> 'b option

assoc_opt ~eq k alist returns Some v if the given key k is present into alist, or None if not present. Like Assoc.get.

  • since 1.5, but only
  • since 2.0 with labels
val assq_opt : 'a -> ('a * 'b) t -> 'b option

assq_opt k alist returns Some v if the given key k is present into alist. Like Assoc.assoc_opt but use physical equality instead of structural equality to compare keys. Safe version of assq.

  • since 1.5, but only
  • since 2.0 with labels
val mem_assoc : ?eq:('a -> 'a -> bool) -> 'a -> ('a * _) t -> bool

mem_assoc ?eq k alist returns true iff k is a key in alist. Like Assoc.mem.

  • since 2.0
val remove_assoc : eq:('a -> 'a -> bool) -> 'a -> ('a * 'b) t -> ('a * 'b) t

remove_assoc ~eq k alist returns the alist without the first pair with key k, if any. Like Assoc.remove.

  • since 2.0

References on Lists

  • since 0.3.3
module Ref : sig ... end
module type MONAD = sig ... end
module Traverse (M : MONAD) : sig ... end

Conversions

val random : 'a random_gen -> 'a t random_gen
val random_non_empty : 'a random_gen -> 'a t random_gen
val random_len : int -> 'a random_gen -> 'a t random_gen
val random_choose : 'a t -> 'a random_gen

random_choose l randomly chooses an element in the list l.

  • raises Not_found

    if the list is empty.

val random_sequence : 'a random_gen t -> 'a t random_gen
val to_string : + ?start:string -> + ?stop:string -> + ?sep:string -> ('a -> string) -> 'a t -> string

to_string ?start ?stop ?sep item_to_string l print l to a string using sep as a separator between elements of l.

  • since 2.7
val to_iter : 'a t -> 'a iter

to_iter l returns a iter of the elements of the list l.

  • since 2.8
val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq l returns a Seq.t of the elements of the list l. Renamed from to_std_seq since 3.0.

  • since 3.0
val of_iter : 'a iter -> 'a t

of_iter iter builds a list from a given iter. In the result, elements appear in the same order as they did in the source iter.

  • since 2.8
val of_seq_rev : 'a Stdlib.Seq.t -> 'a t

of_seq_rev seq builds a list from a given Seq.t, in reverse order. Renamed from of_std_seq_rev since 3.0.

  • since 3.0
val of_seq : 'a Stdlib.Seq.t -> 'a t

of_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen l returns a gen of the elements of the list l.

val of_gen : 'a gen -> 'a t

of_gen gen builds a list from a given gen. In the result, elements appear in the same order as they did in the source gen.

Infix Operators

It is convenient to open CCList.Infix to access the infix operators without cluttering the scope too much.

  • since 0.16
module Infix : module type of CCList.Infix
include module type of Infix
val (>|=) : 'a CCList.t -> ('a -> 'b) -> 'b CCList.t

l >|= f is the infix version of map with reversed arguments.

val (@) : 'a CCList.t -> 'a CCList.t -> 'a CCList.t

l1 @ l2 concatenates two lists l1 and l2. As append.

val (<*>) : ('a -> 'b) CCList.t -> 'a CCList.t -> 'b CCList.t

funs <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a -> 'b) -> 'a CCList.t -> 'b CCList.t

f <$> l is like map.

val (>>=) : 'a CCList.t -> ('a -> 'b CCList.t) -> 'b CCList.t

l >>= f is flat_map f l.

val (--) : int -> int -> int CCList.t

i -- j is the infix alias for range. Bounds included.

val (--^) : int -> int -> int CCList.t

i --^ j is the infix alias for range'. Second bound j excluded.

  • since 0.17
val let+ : 'a CCList.t -> ('a -> 'b) -> 'b CCList.t
val and+ : 'a CCList.t -> 'b CCList.t -> ('a * 'b) CCList.t
val let* : 'a CCList.t -> ('a -> 'b CCList.t) -> 'b CCList.t
val and* : 'a CCList.t -> 'b CCList.t -> ('a * 'b) CCList.t
val and& : 'a list -> 'b list -> ('a * 'b) list

(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.

# let f xs ys zs =
@@ -121,8 +121,8 @@ val square_even : int list -> int list = <fun>
 val f : int list -> int list -> int list -> int list = <fun>
 # f [1;2] [5;6;7] [10;10];;
 - : int list = [16; 18]
  • since 3.1

IO

val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> 'a printer -> - 'a t printer

pp ?pp_start ?pp_stop ?pp_sep ppf l prints the contents of a list.

\ No newline at end of file + 'a t printer

pp ?pp_start ?pp_stop ?pp_sep ppf l prints the contents of a list.

diff --git a/dev/containers/CCListLabels/module-type-MONAD/index.html b/dev/containers/CCListLabels/module-type-MONAD/index.html index a09780d5..53414d80 100644 --- a/dev/containers/CCListLabels/module-type-MONAD/index.html +++ b/dev/containers/CCListLabels/module-type-MONAD/index.html @@ -1,2 +1,2 @@ -MONAD (containers.CCListLabels.MONAD)

Module type CCListLabels.MONAD

Monadic Operations

type 'a t
val return : 'a -> 'a t

return is the Monadic return.

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

(>>=) is the Monadic bind.

\ No newline at end of file +MONAD (containers.CCListLabels.MONAD)

Module type CCListLabels.MONAD

Monadic Operations

type 'a t
val return : 'a -> 'a t

return is the Monadic return.

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

(>>=) is the Monadic bind.

diff --git a/dev/containers/CCMap/Make/argument-1-O/index.html b/dev/containers/CCMap/Make/argument-1-O/index.html index 747d650b..23034bcb 100644 --- a/dev/containers/CCMap/Make/argument-1-O/index.html +++ b/dev/containers/CCMap/Make/argument-1-O/index.html @@ -1,2 +1,2 @@ -O (containers.CCMap.Make.O)

Parameter Make.O

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 +O (containers.CCMap.Make.O)

Parameter Make.O

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/dev/containers/CCMap/Make/index.html b/dev/containers/CCMap/Make/index.html index b8d288a8..2432f101 100644 --- a/dev/containers/CCMap/Make/index.html +++ b/dev/containers/CCMap/Make/index.html @@ -1,31 +1,31 @@ -Make (containers.CCMap.Make)

Module CCMap.Make

Parameters

Signature

include Map.S with type 'a t = 'a Map.Make(O).t with type key = O.t
type key = O.t

The type of the map keys.

type 'a t = 'a Stdlib.Map.Make(O).t

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

val empty : 'a t

The empty map.

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 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 singleton : key -> 'a -> 'a t

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

  • since 3.12.0
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 (containers.CCMap.Make)

Module CCMap.Make

Parameters

Signature

include Map.S with type 'a t = 'a Map.Make(O).t with type key = O.t
type key = O.t

The type of the map keys.

type 'a t = 'a Stdlib.Map.Make(O).t

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

val empty : 'a t

The empty map.

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 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 singleton : key -> 'a -> 'a t

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

  • since 3.12.0
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.0
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.0
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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

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.

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.0
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.0
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.0
  • 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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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.0
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_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
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.

Maps and Sequences

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 get : key -> 'a t -> 'a option

get k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.

val get_or : key -> 'a t -> default:'a -> 'a

get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).

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

update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is None k is removed from m, and if the result is Some v' then add k v' m is returned.

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

choose_opt m returns one binding of the given map m, or None if m is empty. Safe version of choose.

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

min_binding_opt m returns the smallest binding of the given map m, or None if m is empty. Safe version of min_binding.

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

max_binding_opt m returns the largest binding of the given map m, or None if m is empty. Safe version of max_binding.

  • since 1.5
val find_opt : key -> 'a t -> 'a option

find_opt k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.

  • since 1.5
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. See Map.S.find_first.

  • since 1.5
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. Safe version of find_first.

  • since 1.5
val merge_safe : - f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> + 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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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.0
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_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
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.

Maps and Sequences

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 get : key -> 'a t -> 'a option

get k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.

val get_or : key -> 'a t -> default:'a -> 'a

get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).

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

update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is None k is removed from m, and if the result is Some v' then add k v' m is returned.

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

choose_opt m returns one binding of the given map m, or None if m is empty. Safe version of choose.

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

min_binding_opt m returns the smallest binding of the given map m, or None if m is empty. Safe version of min_binding.

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

max_binding_opt m returns the largest binding of the given map m, or None if m is empty. Safe version of max_binding.

  • since 1.5
val find_opt : key -> 'a t -> 'a option

find_opt k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.

  • since 1.5
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. See Map.S.find_first.

  • since 1.5
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. Safe version of find_first.

  • since 1.5
val merge_safe : + f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> 'a t -> 'b t -> 'c t

merge_safe ~f a b merges the maps a and b together.

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

add_seq m seq adds the given Seq.t of bindings to the map m. Like add_list. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : - f:(key -> 'a -> 'a -> 'a) -> + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> - 'a t

add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

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

of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t

of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val add_iter : 'a t -> (key * 'a) iter -> 'a t

add_iter m iter adds the given iter of bindings to the map m. Like add_list.

  • since 2.8
val add_iter_with : - f:(key -> 'a -> 'a -> 'a) -> + 'a t

add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

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

of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t

of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val add_iter : 'a t -> (key * 'a) iter -> 'a t

add_iter m iter adds the given iter of bindings to the map m. Like add_list.

  • since 2.8
val add_iter_with : + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) iter -> - 'a t

add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val of_iter : (key * 'a) iter -> 'a t

of_iter iter builds a map from the given iter of bindings. Like of_list.

  • since 2.8
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) iter -> 'a t

of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.

  • since 3.3
val to_iter : 'a t -> (key * 'a) iter

to_iter m iterates on the whole map m, creating an iter of bindings. Like to_list.

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

of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.

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

of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.

  • since 3.3
val add_list : 'a t -> (key * 'a) list -> 'a t

add_list m l adds the given list l of bindings to the map m.

  • since 0.14
val add_list_with : - f:(key -> 'a -> 'a -> 'a) -> + 'a t

add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val of_iter : (key * 'a) iter -> 'a t

of_iter iter builds a map from the given iter of bindings. Like of_list.

  • since 2.8
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) iter -> 'a t

of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.

  • since 3.3
val to_iter : 'a t -> (key * 'a) iter

to_iter m iterates on the whole map m, creating an iter of bindings. Like to_list.

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

of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.

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

of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.

  • since 3.3
val add_list : 'a t -> (key * 'a) list -> 'a t

add_list m l adds the given list l of bindings to the map m.

  • since 0.14
val add_list_with : + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) list -> 'a t

add_list ~f m l adds the given list l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val keys : _ t -> key iter

keys m iterates on the keys of m only, creating an iter of keys.

  • since 0.15
val values : 'a t -> 'a iter

values m iterates on the values of m only, creating an iter of values.

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

to_list m builds a list of the bindings of the given map m. The order is unspecified.

val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_arrow:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_arrow:unit printer -> + ?pp_sep:unit printer -> key printer -> 'a printer -> - 'a t printer

pp ?pp_start ?pp_stop ?pp_arrow ?pp_sep pp_key pp_v m pretty-prints the contents of the map.

\ No newline at end of file + 'a t printer

pp ?pp_start ?pp_stop ?pp_arrow ?pp_sep pp_key pp_v m pretty-prints the contents of the map.

diff --git a/dev/containers/CCMap/index.html b/dev/containers/CCMap/index.html index 2cdbf55a..cfde6f10 100644 --- a/dev/containers/CCMap/index.html +++ b/dev/containers/CCMap/index.html @@ -1,4 +1,4 @@ -CCMap (containers.CCMap)

Module CCMap

Extensions of Standard Map

Provide useful functions and iterators on Map.S

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type OrderedType = Stdlib.Map.OrderedType
module type S = sig ... end
module Make +CCMap (containers.CCMap)

Module CCMap

Extensions of Standard Map

Provide useful functions and iterators on Map.S

  • since 0.5
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type OrderedType = Stdlib.Map.OrderedType
module type S = sig ... end
module Make (O : Stdlib.Map.OrderedType) : - S with type 'a t = 'a Stdlib.Map.Make(O).t and type key = O.t
\ No newline at end of file + S with type 'a t = 'a Stdlib.Map.Make(O).t and type key = O.t
diff --git a/dev/containers/CCMap/module-type-S/index.html b/dev/containers/CCMap/module-type-S/index.html index 11c6a458..1665676e 100644 --- a/dev/containers/CCMap/module-type-S/index.html +++ b/dev/containers/CCMap/module-type-S/index.html @@ -1,31 +1,31 @@ -S (containers.CCMap.S)

Module type CCMap.S

include Stdlib.Map.S
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 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 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 singleton : key -> 'a -> 'a t

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

  • since 3.12.0
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 (containers.CCMap.S)

Module type CCMap.S

include Stdlib.Map.S
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 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 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 singleton : key -> 'a -> 'a t

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

  • since 3.12.0
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.0
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.0
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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

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.

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.0
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.0
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.0
  • 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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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.0
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_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
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.

Maps and Sequences

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 get : key -> 'a t -> 'a option

get k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.

val get_or : key -> 'a t -> default:'a -> 'a

get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).

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

update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is None k is removed from m, and if the result is Some v' then add k v' m is returned.

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

choose_opt m returns one binding of the given map m, or None if m is empty. Safe version of choose.

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

min_binding_opt m returns the smallest binding of the given map m, or None if m is empty. Safe version of min_binding.

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

max_binding_opt m returns the largest binding of the given map m, or None if m is empty. Safe version of max_binding.

  • since 1.5
val find_opt : key -> 'a t -> 'a option

find_opt k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.

  • since 1.5
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. See Map.S.find_first.

  • since 1.5
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. Safe version of find_first.

  • since 1.5
val merge_safe : - f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> + 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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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.0
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_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
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.

Maps and Sequences

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 get : key -> 'a t -> 'a option

get k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.

val get_or : key -> 'a t -> default:'a -> 'a

get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).

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

update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is None k is removed from m, and if the result is Some v' then add k v' m is returned.

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

choose_opt m returns one binding of the given map m, or None if m is empty. Safe version of choose.

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

min_binding_opt m returns the smallest binding of the given map m, or None if m is empty. Safe version of min_binding.

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

max_binding_opt m returns the largest binding of the given map m, or None if m is empty. Safe version of max_binding.

  • since 1.5
val find_opt : key -> 'a t -> 'a option

find_opt k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.

  • since 1.5
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. See Map.S.find_first.

  • since 1.5
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. Safe version of find_first.

  • since 1.5
val merge_safe : + f:(key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option) -> 'a t -> 'b t -> 'c t

merge_safe ~f a b merges the maps a and b together.

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

add_seq m seq adds the given Seq.t of bindings to the map m. Like add_list. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : - f:(key -> 'a -> 'a -> 'a) -> + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> - 'a t

add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

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

of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t

of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val add_iter : 'a t -> (key * 'a) iter -> 'a t

add_iter m iter adds the given iter of bindings to the map m. Like add_list.

  • since 2.8
val add_iter_with : - f:(key -> 'a -> 'a -> 'a) -> + 'a t

add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

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

of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t

of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val add_iter : 'a t -> (key * 'a) iter -> 'a t

add_iter m iter adds the given iter of bindings to the map m. Like add_list.

  • since 2.8
val add_iter_with : + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) iter -> - 'a t

add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val of_iter : (key * 'a) iter -> 'a t

of_iter iter builds a map from the given iter of bindings. Like of_list.

  • since 2.8
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) iter -> 'a t

of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.

  • since 3.3
val to_iter : 'a t -> (key * 'a) iter

to_iter m iterates on the whole map m, creating an iter of bindings. Like to_list.

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

of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.

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

of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.

  • since 3.3
val add_list : 'a t -> (key * 'a) list -> 'a t

add_list m l adds the given list l of bindings to the map m.

  • since 0.14
val add_list_with : - f:(key -> 'a -> 'a -> 'a) -> + 'a t

add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val of_iter : (key * 'a) iter -> 'a t

of_iter iter builds a map from the given iter of bindings. Like of_list.

  • since 2.8
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) iter -> 'a t

of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.

  • since 3.3
val to_iter : 'a t -> (key * 'a) iter

to_iter m iterates on the whole map m, creating an iter of bindings. Like to_list.

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

of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.

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

of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.

  • since 3.3
val add_list : 'a t -> (key * 'a) list -> 'a t

add_list m l adds the given list l of bindings to the map m.

  • since 0.14
val add_list_with : + f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) list -> 'a t

add_list ~f m l adds the given list l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.

  • since 3.3
val keys : _ t -> key iter

keys m iterates on the keys of m only, creating an iter of keys.

  • since 0.15
val values : 'a t -> 'a iter

values m iterates on the values of m only, creating an iter of values.

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

to_list m builds a list of the bindings of the given map m. The order is unspecified.

val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_arrow:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_arrow:unit printer -> + ?pp_sep:unit printer -> key printer -> 'a printer -> - 'a t printer

pp ?pp_start ?pp_stop ?pp_arrow ?pp_sep pp_key pp_v m pretty-prints the contents of the map.

\ No newline at end of file + 'a t printer

pp ?pp_start ?pp_stop ?pp_arrow ?pp_sep pp_key pp_v m pretty-prints the contents of the map.

diff --git a/dev/containers/CCMonomorphic/index.html b/dev/containers/CCMonomorphic/index.html index 1f78167f..2b2a7db2 100644 --- a/dev/containers/CCMonomorphic/index.html +++ b/dev/containers/CCMonomorphic/index.html @@ -1,2 +1,2 @@ -CCMonomorphic (containers.CCMonomorphic)

Module CCMonomorphic

Shadow unsafe functions and operators from Stdlib

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
val min : int -> int -> int
val max : int -> int -> int

Infix operators for Floats

val (=.) : float -> float -> bool
  • since 2.1
val (<>.) : float -> float -> bool
  • since 2.1
val (<.) : float -> float -> bool
  • since 2.1
val (>.) : float -> float -> bool
  • since 2.1
val (<=.) : float -> float -> bool
  • since 2.1
val (>=.) : float -> float -> bool
  • since 2.1

Shadow Dangerous Operators

val (==) : [ `Consider_using_CCEqual_physical ]
  • deprecated Please use CCEqual.physical or Stdlib.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • since 2.1
  • deprecated Please use [not CCEqual.physical] or Stdlib.(!=) instead.
\ No newline at end of file +CCMonomorphic (containers.CCMonomorphic)

Module CCMonomorphic

Shadow unsafe functions and operators from Stdlib

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
val min : int -> int -> int
val max : int -> int -> int

Infix operators for Floats

val (=.) : float -> float -> bool
  • since 2.1
val (<>.) : float -> float -> bool
  • since 2.1
val (<.) : float -> float -> bool
  • since 2.1
val (>.) : float -> float -> bool
  • since 2.1
val (<=.) : float -> float -> bool
  • since 2.1
val (>=.) : float -> float -> bool
  • since 2.1

Shadow Dangerous Operators

val (==) : [ `Consider_using_CCEqual_physical ]
  • deprecated Please use CCEqual.physical or Stdlib.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • since 2.1
  • deprecated Please use [not CCEqual.physical] or Stdlib.(!=) instead.
diff --git a/dev/containers/CCNativeint/Infix/index.html b/dev/containers/CCNativeint/Infix/index.html index 5c606ef1..37e3f2b8 100644 --- a/dev/containers/CCNativeint/Infix/index.html +++ b/dev/containers/CCNativeint/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCNativeint.Infix)

Module CCNativeint.Infix

val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl 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 (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
\ No newline at end of file +Infix (containers.CCNativeint.Infix)

Module CCNativeint.Infix

val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl 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 (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
diff --git a/dev/containers/CCNativeint/index.html b/dev/containers/CCNativeint/index.html index 8266e6b1..107a12ae 100644 --- a/dev/containers/CCNativeint/index.html +++ b/dev/containers/CCNativeint/index.html @@ -1,3 +1,3 @@ -CCNativeint (containers.CCNativeint)

Module CCNativeint

Helpers for 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.

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.0
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.0
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

Return the absolute value of its argument.

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.0
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 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.0
val equal : t -> t -> bool

The equal function for native ints.

  • since 4.03.0
val min : t -> t -> t

min x y returns the minimum of the two integers x and y.

  • since 3.0
val max : t -> t -> t

max x y returns the maximum of the two integers x and y.

  • since 3.0
val hash : t -> int

hash x computes the hash of x. Like Stdlib.abs(to_intx).

val sign : t -> int

sign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x zero.

  • since 3.0
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.

  • since 0.11
val floor_div : t -> t -> t

floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.

  • since 3.0
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a iter = ('a -> unit) -> unit
val range_by : step:t -> t -> t -> t iter

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 3.0
val range : t -> t -> t iter

range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.

  • since 3.0
val range' : t -> t -> t iter

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].

  • since 3.0
val random : t -> t random_gen
val random_small : t random_gen
val random_range : t -> t -> t random_gen

Conversion

val of_string : string -> t option

of_string s is the safe version of of_string_exn. Like of_string_exn, but return None instead of raising.

val of_string_opt : string -> t option

of_string_opt s is an alias to of_string.

val of_string_exn : string -> t

of_string_exn s converts the given string s into a native integer. Alias to Nativeint.of_string. 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*CCNativeint.max_int+1]. If the input exceeds CCNativeint.max_int it is converted to the signed integer CCInt64.min_int + input - CCNativeint.max_int - 1.

Raise Failure "Nativeint.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_binary : t -> string

to_string_binary x returns the string representation of the integer x, in binary.

  • since 3.0

Printing

val pp : t printer

pp ppf x prints the integer x on ppf.

  • since 3.0
val pp_binary : t printer

pp_binary ppf x prints x on ppf. Print as "0b00101010".

  • since 3.0

Infix Operators

module Infix : sig ... end
include module type of Infix
val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl 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 (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
\ No newline at end of file +CCNativeint (containers.CCNativeint)

Module CCNativeint

Helpers for 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.

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.0
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.0
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

Return the absolute value of its argument.

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.0
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 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.0
val equal : t -> t -> bool

The equal function for native ints.

  • since 4.03.0
val min : t -> t -> t

min x y returns the minimum of the two integers x and y.

  • since 3.0
val max : t -> t -> t

max x y returns the maximum of the two integers x and y.

  • since 3.0
val hash : t -> int

hash x computes the hash of x. Like Stdlib.abs(to_intx).

val sign : t -> int

sign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x zero.

  • since 3.0
val pow : t -> t -> t

pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.

  • since 0.11
val floor_div : t -> t -> t

floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.

  • since 3.0
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
type 'a iter = ('a -> unit) -> unit
val range_by : step:t -> t -> t -> t iter

range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.

  • raises Invalid_argument

    if step=0.

  • since 3.0
val range : t -> t -> t iter

range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.

  • since 3.0
val range' : t -> t -> t iter

range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].

  • since 3.0
val random : t -> t random_gen
val random_small : t random_gen
val random_range : t -> t -> t random_gen

Conversion

val of_string : string -> t option

of_string s is the safe version of of_string_exn. Like of_string_exn, but return None instead of raising.

val of_string_opt : string -> t option

of_string_opt s is an alias to of_string.

val of_string_exn : string -> t

of_string_exn s converts the given string s into a native integer. Alias to Nativeint.of_string. 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*CCNativeint.max_int+1]. If the input exceeds CCNativeint.max_int it is converted to the signed integer CCInt64.min_int + input - CCNativeint.max_int - 1.

Raise Failure "Nativeint.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_binary : t -> string

to_string_binary x returns the string representation of the integer x, in binary.

  • since 3.0

Printing

val pp : t printer

pp ppf x prints the integer x on ppf.

  • since 3.0
val pp_binary : t printer

pp_binary ppf x prints x on ppf. Print as "0b00101010".

  • since 3.0

Infix Operators

module Infix : sig ... end
include module type of Infix
val (+) : t -> t -> t

x + y is the sum of x and y. Addition.

val (-) : t -> t -> t

x - y is the difference of x and y. Subtraction.

val (~-) : t -> t

~- x is the negation of x. Unary negation.

val (*) : t -> t -> t

x * y is the product of x and y. Multiplication.

val (/) : t -> t -> t

x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val (mod) : t -> t -> t

x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.

val (**) : t -> t -> t

Alias to pow

  • since 3.0
val (--) : t -> t -> t iter

Alias to range.

  • since 3.0
val (--^) : t -> t -> t iter

Alias to range'.

  • since 3.0
val (land) : t -> t -> t

x land y is the bitwise logical and of x and y.

val (lor) : t -> t -> t

x lor y is the bitwise logical or of x and y.

val (lxor) : t -> t -> t

x lxor y is the bitwise logical exclusive or of x and y.

val lnot : t -> t

lnot x is the bitwise logical negation of x (the bits of x are inverted).

val (lsl) : t -> int -> t

x lsl 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 (lsr) : t -> int -> t

x lsr 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 (asr) : t -> int -> t

x asr 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 (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (<) : t -> t -> bool
diff --git a/dev/containers/CCOpt/Infix/index.html b/dev/containers/CCOpt/Infix/index.html index 084a0b11..ef587c81 100644 --- a/dev/containers/CCOpt/Infix/index.html +++ b/dev/containers/CCOpt/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCOpt.Infix)

Module CCOpt.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

o >|= f is map f o.

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

o >>= f is the monadic bind.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> o returns Some (f x) if o is Some x and None if o is None.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> o is like map f o.

val (<+>) : 'a t -> 'a t -> 'a t

o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file +Infix (containers.CCOpt.Infix)

Module CCOpt.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

o >|= f is map f o.

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

o >>= f is the monadic bind.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> o returns Some (f x) if o is Some x and None if o is None.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> o is like map f o.

val (<+>) : 'a t -> 'a t -> 'a t

o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers/CCOpt/index.html b/dev/containers/CCOpt/index.html index 1fe3ca24..150fd12e 100644 --- a/dev/containers/CCOpt/index.html +++ b/dev/containers/CCOpt/index.html @@ -1,2 +1,2 @@ -CCOpt (containers.CCOpt)

Module CCOpt

Previous Option module

include module type of CCOption
type +'a t = 'a option
val map : ('a -> 'b) -> 'a t -> 'b t

map f o applies the function f to the element inside o, if any.

val map_or : default:'b -> ('a -> 'b) -> 'a t -> 'b

map_or ~default f o is f x if o = Some x, default otherwise.

  • since 0.16
val map_lazy : (unit -> 'b) -> ('a -> 'b) -> 'a t -> 'b

map_lazy default_fn f o is f x if o = Some x, default_fn () otherwise.

  • since 1.2
val is_some : _ t -> bool

is_some (Some x) returns true otherwise it returns false.

val is_none : _ t -> bool

is_none None returns true otherwise it returns false.

  • since 0.11
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare comp o1 o2 compares two options o1 and o2, using custom comparators comp for the value. None is always assumed to be less than Some _.

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

equal p o1 o2 tests for equality between option types o1 and o2, using a custom equality predicate p.

val return : 'a -> 'a t

return x is a monadic return, that is return x = Some x.

val some : 'a -> 'a t

Alias to return.

  • since 3.5
val none : 'a t

Alias to None.

  • since 3.5
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

flat_map f o is equivalent to map followed by flatten. Flip version of (>>=).

val flat_map_l : ('a -> 'b list) -> 'a t -> 'b list

flat_map_l f o is [] if o is None, or f x if o is Some x.

  • since 3.12
val bind : 'a t -> ('a -> 'b t) -> 'b t

bind o f is f v if o is Some v, None otherwise. Monadic bind.

  • since 3.0
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 f o1 o2 maps 'a option and 'b option to a 'c option using f.

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

iter f o applies f to o. Iterate on 0 or 1 element.

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

fold f init o is f init x if o is Some x, or init if o is None. Fold on 0 or 1 element.

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

filter f o returns Some x if o is Some x and f x is true, or None if f x is false or if o is None. Filter on 0 or 1 element.

  • since 0.5
val if_ : ('a -> bool) -> 'a -> 'a option

if_ f x is Some x if f x, None otherwise.

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

exists f o returns true iff there exists an element for which the provided function f evaluates to true.

  • since 0.17
val for_all : ('a -> bool) -> 'a t -> bool

for_all f o returns true iff the provided function f evaluates to true for all elements.

  • since 0.17
val get_or : default:'a -> 'a t -> 'a

get_or ~default o extracts the value from o, or returns default if o is None.

  • since 0.18
val value : 'a t -> default:'a -> 'a

value o ~default is similar to the Stdlib's Option.value and to get_or.

  • since 2.8
val get_exn : 'a t -> 'a

get_exn o returns x if o is Some x or fails if o is None.

  • raises Invalid_argument

    if the option is None.

val get_exn_or : string -> 'a t -> 'a

get_exn_or msg o returns x if o is Some x or fails with Invalid_argument msg if o is None.

  • raises Invalid_argument

    if the option is None.

  • since 3.4
val get_lazy : (unit -> 'a) -> 'a t -> 'a

get_lazy default_fn o unwraps o, but if o is None it returns default_fn () instead.

  • since 0.6.1
val sequence_l : 'a t list -> 'a list t

sequence_l [x1; x2; โ€ฆ; xn] returns Some [y1; y2; โ€ฆ; yn] if every xi is Some yi. Otherwise, if the list contains at least one None, the result is None.

val wrap : ?handler:(exn -> bool) -> ('a -> 'b) -> 'a -> 'b option

wrap ?handler f x calls f x and returns Some y if f x = y. If f x raises any exception, the result is None. This can be useful to wrap functions such as Map.S.find.

  • parameter handler

    the exception handler, which returns true if the exception is to be caught.

val wrap2 : ?handler:(exn -> bool) -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c option

wrap2 ?handler f x y is similar to wrap but for binary functions.

Applicative

val pure : 'a -> 'a t

pure x is an alias to return.

Alternatives

val or_ : else_:'a t -> 'a t -> 'a t

or_ ~else_ o is o if o is Some _, else_ if o is None.

  • since 1.2
val or_lazy : else_:(unit -> 'a t) -> 'a t -> 'a t

or_lazy ~else_ o is o if o is Some _, else_ () if o is None.

  • since 1.2
val choice : 'a t list -> 'a t

choice lo returns the first non-None element of the list lo, or None.

val flatten : 'a t t -> 'a t

flatten oo transforms Some x into x.

  • since 2.2
val return_if : bool -> 'a -> 'a t

return_if b x applies Some or None depending on the boolean b. More precisely, return_if false x is None, and return_if true x is Some x.

  • since 2.2

Infix Operators

  • since 0.16
module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

o >|= f is map f o.

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

o >>= f is the monadic bind.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> o returns Some (f x) if o is Some x and None if o is None.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> o is like map f o.

val (<+>) : 'a t -> 'a t -> 'a t

o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t

Conversion and IO

val to_list : 'a t -> 'a list

to_list o returns [x] if o is Some x or the empty list [] if o is None.

val of_list : 'a list -> 'a t

of_list l returns Some x (x being the head of the list l), or None if l is the empty list.

val to_result : 'e -> 'a t -> ('a, 'e) result

to_result e o returns Ok x if o is Some x, or Error e if o is None.

  • since 1.2
val to_result_lazy : (unit -> 'e) -> 'a t -> ('a, 'e) result

to_result_lazy f o returns Ok x if o is Some x or Error f if o is None.

  • since 1.2
val of_result : ('a, _) result -> 'a t

of_result result returns an option from a result.

  • since 1.2
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val random : 'a random_gen -> 'a t random_gen
val choice_iter : 'a t iter -> 'a t

choice_iter iter is similar to choice, but works on iter. It returns the first Some x occurring in iter, or None otherwise.

  • since 3.0
val choice_seq : 'a t Stdlib.Seq.t -> 'a t

choice_seq seq works on Seq.t. It returns the first Some x occurring in seq, or None otherwise.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen o is o as a gen. Some x is the singleton gen containing x and None is the empty gen.

val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter : 'a t -> 'a iter

to_iter o returns an internal iterator, like in the library Iter.

  • since 2.8
val pp : 'a printer -> 'a t printer

pp ppf o pretty-prints option o using ppf.

\ No newline at end of file +CCOpt (containers.CCOpt)

Module CCOpt

Previous Option module

include module type of CCOption
type +'a t = 'a option
val map : ('a -> 'b) -> 'a t -> 'b t

map f o applies the function f to the element inside o, if any.

val map_or : default:'b -> ('a -> 'b) -> 'a t -> 'b

map_or ~default f o is f x if o = Some x, default otherwise.

  • since 0.16
val map_lazy : (unit -> 'b) -> ('a -> 'b) -> 'a t -> 'b

map_lazy default_fn f o is f x if o = Some x, default_fn () otherwise.

  • since 1.2
val is_some : _ t -> bool

is_some (Some x) returns true otherwise it returns false.

val is_none : _ t -> bool

is_none None returns true otherwise it returns false.

  • since 0.11
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare comp o1 o2 compares two options o1 and o2, using custom comparators comp for the value. None is always assumed to be less than Some _.

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

equal p o1 o2 tests for equality between option types o1 and o2, using a custom equality predicate p.

val return : 'a -> 'a t

return x is a monadic return, that is return x = Some x.

val some : 'a -> 'a t

Alias to return.

  • since 3.5
val none : 'a t

Alias to None.

  • since 3.5
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

flat_map f o is equivalent to map followed by flatten. Flip version of (>>=).

val flat_map_l : ('a -> 'b list) -> 'a t -> 'b list

flat_map_l f o is [] if o is None, or f x if o is Some x.

  • since 3.12
val bind : 'a t -> ('a -> 'b t) -> 'b t

bind o f is f v if o is Some v, None otherwise. Monadic bind.

  • since 3.0
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 f o1 o2 maps 'a option and 'b option to a 'c option using f.

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

iter f o applies f to o. Iterate on 0 or 1 element.

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

fold f init o is f init x if o is Some x, or init if o is None. Fold on 0 or 1 element.

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

filter f o returns Some x if o is Some x and f x is true, or None if f x is false or if o is None. Filter on 0 or 1 element.

  • since 0.5
val if_ : ('a -> bool) -> 'a -> 'a option

if_ f x is Some x if f x, None otherwise.

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

exists f o returns true iff there exists an element for which the provided function f evaluates to true.

  • since 0.17
val for_all : ('a -> bool) -> 'a t -> bool

for_all f o returns true iff the provided function f evaluates to true for all elements.

  • since 0.17
val get_or : default:'a -> 'a t -> 'a

get_or ~default o extracts the value from o, or returns default if o is None.

  • since 0.18
val value : 'a t -> default:'a -> 'a

value o ~default is similar to the Stdlib's Option.value and to get_or.

  • since 2.8
val get_exn : 'a t -> 'a

get_exn o returns x if o is Some x or fails if o is None.

  • raises Invalid_argument

    if the option is None.

val get_exn_or : string -> 'a t -> 'a

get_exn_or msg o returns x if o is Some x or fails with Invalid_argument msg if o is None.

  • raises Invalid_argument

    if the option is None.

  • since 3.4
val get_lazy : (unit -> 'a) -> 'a t -> 'a

get_lazy default_fn o unwraps o, but if o is None it returns default_fn () instead.

  • since 0.6.1
val sequence_l : 'a t list -> 'a list t

sequence_l [x1; x2; โ€ฆ; xn] returns Some [y1; y2; โ€ฆ; yn] if every xi is Some yi. Otherwise, if the list contains at least one None, the result is None.

val wrap : ?handler:(exn -> bool) -> ('a -> 'b) -> 'a -> 'b option

wrap ?handler f x calls f x and returns Some y if f x = y. If f x raises any exception, the result is None. This can be useful to wrap functions such as Map.S.find.

  • parameter handler

    the exception handler, which returns true if the exception is to be caught.

val wrap2 : ?handler:(exn -> bool) -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c option

wrap2 ?handler f x y is similar to wrap but for binary functions.

Applicative

val pure : 'a -> 'a t

pure x is an alias to return.

Alternatives

val or_ : else_:'a t -> 'a t -> 'a t

or_ ~else_ o is o if o is Some _, else_ if o is None.

  • since 1.2
val or_lazy : else_:(unit -> 'a t) -> 'a t -> 'a t

or_lazy ~else_ o is o if o is Some _, else_ () if o is None.

  • since 1.2
val choice : 'a t list -> 'a t

choice lo returns the first non-None element of the list lo, or None.

val flatten : 'a t t -> 'a t

flatten oo transforms Some x into x.

  • since 2.2
val return_if : bool -> 'a -> 'a t

return_if b x applies Some or None depending on the boolean b. More precisely, return_if false x is None, and return_if true x is Some x.

  • since 2.2

Infix Operators

  • since 0.16
module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

o >|= f is map f o.

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

o >>= f is the monadic bind.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> o returns Some (f x) if o is Some x and None if o is None.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> o is like map f o.

val (<+>) : 'a t -> 'a t -> 'a t

o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t

Conversion and IO

val to_list : 'a t -> 'a list

to_list o returns [x] if o is Some x or the empty list [] if o is None.

val of_list : 'a list -> 'a t

of_list l returns Some x (x being the head of the list l), or None if l is the empty list.

val to_result : 'e -> 'a t -> ('a, 'e) result

to_result e o returns Ok x if o is Some x, or Error e if o is None.

  • since 1.2
val to_result_lazy : (unit -> 'e) -> 'a t -> ('a, 'e) result

to_result_lazy f o returns Ok x if o is Some x or Error f if o is None.

  • since 1.2
val of_result : ('a, _) result -> 'a t

of_result result returns an option from a result.

  • since 1.2
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val random : 'a random_gen -> 'a t random_gen
val choice_iter : 'a t iter -> 'a t

choice_iter iter is similar to choice, but works on iter. It returns the first Some x occurring in iter, or None otherwise.

  • since 3.0
val choice_seq : 'a t Stdlib.Seq.t -> 'a t

choice_seq seq works on Seq.t. It returns the first Some x occurring in seq, or None otherwise.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen o is o as a gen. Some x is the singleton gen containing x and None is the empty gen.

val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter : 'a t -> 'a iter

to_iter o returns an internal iterator, like in the library Iter.

  • since 2.8
val pp : 'a printer -> 'a t printer

pp ppf o pretty-prints option o using ppf.

diff --git a/dev/containers/CCOption/Infix/index.html b/dev/containers/CCOption/Infix/index.html index dbec2d97..b4b0c421 100644 --- a/dev/containers/CCOption/Infix/index.html +++ b/dev/containers/CCOption/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCOption.Infix)

Module CCOption.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

o >|= f is map f o.

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

o >>= f is the monadic bind.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> o returns Some (f x) if o is Some x and None if o is None.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> o is like map f o.

val (<+>) : 'a t -> 'a t -> 'a t

o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file +Infix (containers.CCOption.Infix)

Module CCOption.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

o >|= f is map f o.

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

o >>= f is the monadic bind.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> o returns Some (f x) if o is Some x and None if o is None.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> o is like map f o.

val (<+>) : 'a t -> 'a t -> 'a t

o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers/CCOption/index.html b/dev/containers/CCOption/index.html index e617f679..7d4b2058 100644 --- a/dev/containers/CCOption/index.html +++ b/dev/containers/CCOption/index.html @@ -1,2 +1,2 @@ -CCOption (containers.CCOption)

Module CCOption

Basic operations on the option type.

This module replaces `CCOpt`.

type +'a t = 'a option
val map : ('a -> 'b) -> 'a t -> 'b t

map f o applies the function f to the element inside o, if any.

val map_or : default:'b -> ('a -> 'b) -> 'a t -> 'b

map_or ~default f o is f x if o = Some x, default otherwise.

  • since 0.16
val map_lazy : (unit -> 'b) -> ('a -> 'b) -> 'a t -> 'b

map_lazy default_fn f o is f x if o = Some x, default_fn () otherwise.

  • since 1.2
val is_some : _ t -> bool

is_some (Some x) returns true otherwise it returns false.

val is_none : _ t -> bool

is_none None returns true otherwise it returns false.

  • since 0.11
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare comp o1 o2 compares two options o1 and o2, using custom comparators comp for the value. None is always assumed to be less than Some _.

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

equal p o1 o2 tests for equality between option types o1 and o2, using a custom equality predicate p.

val return : 'a -> 'a t

return x is a monadic return, that is return x = Some x.

val some : 'a -> 'a t

Alias to return.

  • since 3.5
val none : 'a t

Alias to None.

  • since 3.5
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

flat_map f o is equivalent to map followed by flatten. Flip version of (>>=).

val flat_map_l : ('a -> 'b list) -> 'a t -> 'b list

flat_map_l f o is [] if o is None, or f x if o is Some x.

  • since 3.12
val bind : 'a t -> ('a -> 'b t) -> 'b t

bind o f is f v if o is Some v, None otherwise. Monadic bind.

  • since 3.0
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 f o1 o2 maps 'a option and 'b option to a 'c option using f.

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

iter f o applies f to o. Iterate on 0 or 1 element.

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

fold f init o is f init x if o is Some x, or init if o is None. Fold on 0 or 1 element.

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

filter f o returns Some x if o is Some x and f x is true, or None if f x is false or if o is None. Filter on 0 or 1 element.

  • since 0.5
val if_ : ('a -> bool) -> 'a -> 'a option

if_ f x is Some x if f x, None otherwise.

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

exists f o returns true iff there exists an element for which the provided function f evaluates to true.

  • since 0.17
val for_all : ('a -> bool) -> 'a t -> bool

for_all f o returns true iff the provided function f evaluates to true for all elements.

  • since 0.17
val get_or : default:'a -> 'a t -> 'a

get_or ~default o extracts the value from o, or returns default if o is None.

  • since 0.18
val value : 'a t -> default:'a -> 'a

value o ~default is similar to the Stdlib's Option.value and to get_or.

  • since 2.8
val get_exn : 'a t -> 'a

get_exn o returns x if o is Some x or fails if o is None.

  • raises Invalid_argument

    if the option is None.

val get_exn_or : string -> 'a t -> 'a

get_exn_or msg o returns x if o is Some x or fails with Invalid_argument msg if o is None.

  • raises Invalid_argument

    if the option is None.

  • since 3.4
val get_lazy : (unit -> 'a) -> 'a t -> 'a

get_lazy default_fn o unwraps o, but if o is None it returns default_fn () instead.

  • since 0.6.1
val sequence_l : 'a t list -> 'a list t

sequence_l [x1; x2; โ€ฆ; xn] returns Some [y1; y2; โ€ฆ; yn] if every xi is Some yi. Otherwise, if the list contains at least one None, the result is None.

val wrap : ?handler:(exn -> bool) -> ('a -> 'b) -> 'a -> 'b option

wrap ?handler f x calls f x and returns Some y if f x = y. If f x raises any exception, the result is None. This can be useful to wrap functions such as Map.S.find.

  • parameter handler

    the exception handler, which returns true if the exception is to be caught.

val wrap2 : ?handler:(exn -> bool) -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c option

wrap2 ?handler f x y is similar to wrap but for binary functions.

Applicative

val pure : 'a -> 'a t

pure x is an alias to return.

Alternatives

val or_ : else_:'a t -> 'a t -> 'a t

or_ ~else_ o is o if o is Some _, else_ if o is None.

  • since 1.2
val or_lazy : else_:(unit -> 'a t) -> 'a t -> 'a t

or_lazy ~else_ o is o if o is Some _, else_ () if o is None.

  • since 1.2
val choice : 'a t list -> 'a t

choice lo returns the first non-None element of the list lo, or None.

val flatten : 'a t t -> 'a t

flatten oo transforms Some x into x.

  • since 2.2
val return_if : bool -> 'a -> 'a t

return_if b x applies Some or None depending on the boolean b. More precisely, return_if false x is None, and return_if true x is Some x.

  • since 2.2

Infix Operators

module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

o >|= f is map f o.

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

o >>= f is the monadic bind.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> o returns Some (f x) if o is Some x and None if o is None.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> o is like map f o.

val (<+>) : 'a t -> 'a t -> 'a t

o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t

Conversion and IO

val to_list : 'a t -> 'a list

to_list o returns [x] if o is Some x or the empty list [] if o is None.

val of_list : 'a list -> 'a t

of_list l returns Some x (x being the head of the list l), or None if l is the empty list.

val to_result : 'e -> 'a t -> ('a, 'e) result

to_result e o returns Ok x if o is Some x, or Error e if o is None.

  • since 1.2
val to_result_lazy : (unit -> 'e) -> 'a t -> ('a, 'e) result

to_result_lazy f o returns Ok x if o is Some x or Error f if o is None.

  • since 1.2
val of_result : ('a, _) result -> 'a t

of_result result returns an option from a result.

  • since 1.2
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val random : 'a random_gen -> 'a t random_gen
val choice_iter : 'a t iter -> 'a t

choice_iter iter is similar to choice, but works on iter. It returns the first Some x occurring in iter, or None otherwise.

  • since 3.0
val choice_seq : 'a t Stdlib.Seq.t -> 'a t

choice_seq seq works on Seq.t. It returns the first Some x occurring in seq, or None otherwise.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen o is o as a gen. Some x is the singleton gen containing x and None is the empty gen.

val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter : 'a t -> 'a iter

to_iter o returns an internal iterator, like in the library Iter.

  • since 2.8
val pp : 'a printer -> 'a t printer

pp ppf o pretty-prints option o using ppf.

\ No newline at end of file +CCOption (containers.CCOption)

Module CCOption

Basic operations on the option type.

This module replaces `CCOpt`.

type +'a t = 'a option
val map : ('a -> 'b) -> 'a t -> 'b t

map f o applies the function f to the element inside o, if any.

val map_or : default:'b -> ('a -> 'b) -> 'a t -> 'b

map_or ~default f o is f x if o = Some x, default otherwise.

  • since 0.16
val map_lazy : (unit -> 'b) -> ('a -> 'b) -> 'a t -> 'b

map_lazy default_fn f o is f x if o = Some x, default_fn () otherwise.

  • since 1.2
val is_some : _ t -> bool

is_some (Some x) returns true otherwise it returns false.

val is_none : _ t -> bool

is_none None returns true otherwise it returns false.

  • since 0.11
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

compare comp o1 o2 compares two options o1 and o2, using custom comparators comp for the value. None is always assumed to be less than Some _.

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

equal p o1 o2 tests for equality between option types o1 and o2, using a custom equality predicate p.

val return : 'a -> 'a t

return x is a monadic return, that is return x = Some x.

val some : 'a -> 'a t

Alias to return.

  • since 3.5
val none : 'a t

Alias to None.

  • since 3.5
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

flat_map f o is equivalent to map followed by flatten. Flip version of (>>=).

val flat_map_l : ('a -> 'b list) -> 'a t -> 'b list

flat_map_l f o is [] if o is None, or f x if o is Some x.

  • since 3.12
val bind : 'a t -> ('a -> 'b t) -> 'b t

bind o f is f v if o is Some v, None otherwise. Monadic bind.

  • since 3.0
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 f o1 o2 maps 'a option and 'b option to a 'c option using f.

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

iter f o applies f to o. Iterate on 0 or 1 element.

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

fold f init o is f init x if o is Some x, or init if o is None. Fold on 0 or 1 element.

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

filter f o returns Some x if o is Some x and f x is true, or None if f x is false or if o is None. Filter on 0 or 1 element.

  • since 0.5
val if_ : ('a -> bool) -> 'a -> 'a option

if_ f x is Some x if f x, None otherwise.

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

exists f o returns true iff there exists an element for which the provided function f evaluates to true.

  • since 0.17
val for_all : ('a -> bool) -> 'a t -> bool

for_all f o returns true iff the provided function f evaluates to true for all elements.

  • since 0.17
val get_or : default:'a -> 'a t -> 'a

get_or ~default o extracts the value from o, or returns default if o is None.

  • since 0.18
val value : 'a t -> default:'a -> 'a

value o ~default is similar to the Stdlib's Option.value and to get_or.

  • since 2.8
val get_exn : 'a t -> 'a

get_exn o returns x if o is Some x or fails if o is None.

  • raises Invalid_argument

    if the option is None.

val get_exn_or : string -> 'a t -> 'a

get_exn_or msg o returns x if o is Some x or fails with Invalid_argument msg if o is None.

  • raises Invalid_argument

    if the option is None.

  • since 3.4
val get_lazy : (unit -> 'a) -> 'a t -> 'a

get_lazy default_fn o unwraps o, but if o is None it returns default_fn () instead.

  • since 0.6.1
val sequence_l : 'a t list -> 'a list t

sequence_l [x1; x2; โ€ฆ; xn] returns Some [y1; y2; โ€ฆ; yn] if every xi is Some yi. Otherwise, if the list contains at least one None, the result is None.

val wrap : ?handler:(exn -> bool) -> ('a -> 'b) -> 'a -> 'b option

wrap ?handler f x calls f x and returns Some y if f x = y. If f x raises any exception, the result is None. This can be useful to wrap functions such as Map.S.find.

  • parameter handler

    the exception handler, which returns true if the exception is to be caught.

val wrap2 : ?handler:(exn -> bool) -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c option

wrap2 ?handler f x y is similar to wrap but for binary functions.

Applicative

val pure : 'a -> 'a t

pure x is an alias to return.

Alternatives

val or_ : else_:'a t -> 'a t -> 'a t

or_ ~else_ o is o if o is Some _, else_ if o is None.

  • since 1.2
val or_lazy : else_:(unit -> 'a t) -> 'a t -> 'a t

or_lazy ~else_ o is o if o is Some _, else_ () if o is None.

  • since 1.2
val choice : 'a t list -> 'a t

choice lo returns the first non-None element of the list lo, or None.

val flatten : 'a t t -> 'a t

flatten oo transforms Some x into x.

  • since 2.2
val return_if : bool -> 'a -> 'a t

return_if b x applies Some or None depending on the boolean b. More precisely, return_if false x is None, and return_if true x is Some x.

  • since 2.2

Infix Operators

module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

o >|= f is map f o.

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

o >>= f is the monadic bind.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> o returns Some (f x) if o is Some x and None if o is None.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> o is like map f o.

val (<+>) : 'a t -> 'a t -> 'a t

o1 <+> o2 is o1 if o1 is Some _, o2 if o1 is None.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t

Conversion and IO

val to_list : 'a t -> 'a list

to_list o returns [x] if o is Some x or the empty list [] if o is None.

val of_list : 'a list -> 'a t

of_list l returns Some x (x being the head of the list l), or None if l is the empty list.

val to_result : 'e -> 'a t -> ('a, 'e) result

to_result e o returns Ok x if o is Some x, or Error e if o is None.

  • since 1.2
val to_result_lazy : (unit -> 'e) -> 'a t -> ('a, 'e) result

to_result_lazy f o returns Ok x if o is Some x or Error f if o is None.

  • since 1.2
val of_result : ('a, _) result -> 'a t

of_result result returns an option from a result.

  • since 1.2
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a random_gen = Stdlib.Random.State.t -> 'a
val random : 'a random_gen -> 'a t random_gen
val choice_iter : 'a t iter -> 'a t

choice_iter iter is similar to choice, but works on iter. It returns the first Some x occurring in iter, or None otherwise.

  • since 3.0
val choice_seq : 'a t Stdlib.Seq.t -> 'a t

choice_seq seq works on Seq.t. It returns the first Some x occurring in seq, or None otherwise.

  • since 3.0
val to_gen : 'a t -> 'a gen

to_gen o is o as a gen. Some x is the singleton gen containing x and None is the empty gen.

val to_seq : 'a t -> 'a Stdlib.Seq.t

to_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.

  • since 3.0
val to_iter : 'a t -> 'a iter

to_iter o returns an internal iterator, like in the library Iter.

  • since 2.8
val pp : 'a printer -> 'a t printer

pp ppf o pretty-prints option o using ppf.

diff --git a/dev/containers/CCOrd/Infix/index.html b/dev/containers/CCOrd/Infix/index.html index 904c4ac3..692615c0 100644 --- a/dev/containers/CCOrd/Infix/index.html +++ b/dev/containers/CCOrd/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCOrd.Infix)

Module CCOrd.Infix

val (<?>) : int -> ('a t * 'a * 'a) -> int

c1 <?> (ord, x, y) returns the same as c1 if c1 is not 0; otherwise it uses ord to compare the two values x and y, of type 'a.

val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

\ No newline at end of file +Infix (containers.CCOrd.Infix)

Module CCOrd.Infix

val (<?>) : int -> ('a t * 'a * 'a) -> int

c1 <?> (ord, x, y) returns the same as c1 if c1 is not 0; otherwise it uses ord to compare the two values x and y, of type 'a.

val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

diff --git a/dev/containers/CCOrd/index.html b/dev/containers/CCOrd/index.html index 80146ce3..29bec009 100644 --- a/dev/containers/CCOrd/index.html +++ b/dev/containers/CCOrd/index.html @@ -1,6 +1,6 @@ -CCOrd (containers.CCOrd)

Module CCOrd

Order combinators

Comparisons

type 'a t = 'a -> 'a -> int

Comparison (total ordering) between two elements, that returns an int.

val poly : 'a t

Polymorphic "magic" comparison. Use with care, as it will fail on some types.

  • since 3.6
val compare : 'a t

Polymorphic "magic" comparison.

  • deprecated

    since 3.6 in favor of poly. The reason is that compare is easily shadowed, can shadow other comparators, and is just generally not very descriptive.

val opp : 'a t -> 'a t

Opposite order. For example, opp cmp a b < 0 iff cmp b a > 0. This can be used to sort values in the opposite order, among other things.

val equiv : int -> int -> bool

Returns true iff the two comparison results are the same.

val int : int t
val string : string t
val bool : bool t
val float : float t

Lexicographic Combination

val (<?>) : int -> ('a t * 'a * 'a) -> int

c1 <?> (ord, x, y) returns the same as c1 if c1 is not 0; otherwise it uses ord to compare the two values x and y, of type 'a.

Example:

CCInt.compare 1 3
+CCOrd (containers.CCOrd)

Module CCOrd

Order combinators

Comparisons

type 'a t = 'a -> 'a -> int

Comparison (total ordering) between two elements, that returns an int.

val poly : 'a t

Polymorphic "magic" comparison. Use with care, as it will fail on some types.

  • since 3.6
val compare : 'a t

Polymorphic "magic" comparison.

  • deprecated

    since 3.6 in favor of poly. The reason is that compare is easily shadowed, can shadow other comparators, and is just generally not very descriptive.

val opp : 'a t -> 'a t

Opposite order. For example, opp cmp a b < 0 iff cmp b a > 0. This can be used to sort values in the opposite order, among other things.

val equiv : int -> int -> bool

Returns true iff the two comparison results are the same.

val int : int t
val string : string t
val bool : bool t
val float : float t

Lexicographic Combination

val (<?>) : int -> ('a t * 'a * 'a) -> int

c1 <?> (ord, x, y) returns the same as c1 if c1 is not 0; otherwise it uses ord to compare the two values x and y, of type 'a.

Example:

CCInt.compare 1 3
 <?> (String.compare, "a", "b")
 <?> (CCBool.compare, true, false)

Same example, using only CCOrd::

CCOrd.(int 1 3
   <?> (string, "a", "b")
-  <?> (bool, true, false))
val option : 'a t -> 'a option t

Comparison of optional values. None is smaller than any Some _.

  • since 0.15
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val list : 'a t -> 'a list t

Lexicographic combination on lists.

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

map f ord is the comparison function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with ord. Example: map fst CCInt.compare compares values of type (int * 'a) by their first component.

val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

module Infix : sig ... end
\ No newline at end of file + <?> (bool, true, false))
val option : 'a t -> 'a option t

Comparison of optional values. None is smaller than any Some _.

  • since 0.15
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val list : 'a t -> 'a list t

Lexicographic combination on lists.

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

map f ord is the comparison function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with ord. Example: map fst CCInt.compare compares values of type (int * 'a) by their first component.

val (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

module Infix : sig ... end
diff --git a/dev/containers/CCPair/index.html b/dev/containers/CCPair/index.html index 5d2960e9..78f30f92 100644 --- a/dev/containers/CCPair/index.html +++ b/dev/containers/CCPair/index.html @@ -1,5 +1,5 @@ -CCPair (containers.CCPair)

Module CCPair

Tuple Functions

type ('a, 'b) t = 'a * 'b
val make : 'a -> 'b -> ('a, 'b) t

Make a tuple from its components.

  • since 0.16
val map_fst : ('a -> 'b) -> ('a * 'c) -> 'b * 'c

map_fst f (x, y) returns (f x, y). Renamed from map1 since 3.0.

val map_snd : ('a -> 'b) -> ('c * 'a) -> 'c * 'b

map_snd f (x, y) returns (x, f y). Renamed from map2 since 3.0.

val map : ('a -> 'c) -> ('b -> 'd) -> ('a * 'b) -> 'c * 'd

Synonym to (***). Map on both sides of a tuple.

val map_same : ('a -> 'b) -> ('a * 'a) -> 'b * 'b

Like map but specialized for pairs with elements of the same type.

val map2 : +CCPair (containers.CCPair)

Module CCPair

Tuple Functions

type ('a, 'b) t = 'a * 'b
val make : 'a -> 'b -> ('a, 'b) t

Make a tuple from its components.

  • since 0.16
val map_fst : ('a -> 'b) -> ('a * 'c) -> 'b * 'c

map_fst f (x, y) returns (f x, y). Renamed from map1 since 3.0.

val map_snd : ('a -> 'b) -> ('c * 'a) -> 'c * 'b

map_snd f (x, y) returns (x, f y). Renamed from map2 since 3.0.

val map : ('a -> 'c) -> ('b -> 'd) -> ('a * 'b) -> 'c * 'd

Synonym to (***). Map on both sides of a tuple.

val map_same : ('a -> 'b) -> ('a * 'a) -> 'b * 'b

Like map but specialized for pairs with elements of the same type.

val map2 : ('a1 -> 'b1 -> 'c1) -> ('a2 -> 'b2 -> 'c2) -> ('a1 * 'a2) -> @@ -15,14 +15,14 @@ ('a * 'b) -> ('a * 'b) -> int
val to_string : - ?sep:string -> + ?sep:string -> ('a -> string) -> ('b -> string) -> ('a * 'b) -> string

Print tuple in a string

  • since 2.7
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> 'a printer -> 'b printer -> - ('a * 'b) printer

Print a pair given an optional separator, an optional start and stop and a method for printing each of its elements.

\ No newline at end of file + ('a * 'b) printer

Print a pair given an optional separator, an optional start and stop and a method for printing each of its elements.

diff --git a/dev/containers/CCParse/Debug_/index.html b/dev/containers/CCParse/Debug_/index.html index e12dbb80..6a5e0468 100644 --- a/dev/containers/CCParse/Debug_/index.html +++ b/dev/containers/CCParse/Debug_/index.html @@ -1,2 +1,2 @@ -Debug_ (containers.CCParse.Debug_)

Module CCParse.Debug_

Debugging utils. EXPERIMENTAL

val trace_fail : string -> 'a t -> 'a t

trace_fail name p behaves like p, but prints the error message of p on stderr whenever p fails.

  • parameter name

    used as a prefix of all trace messages.

val trace_success : string -> print:('a -> string) -> 'a t -> 'a t

trace_success name ~print p behaves like p, but prints successful runs of p using print.

val trace_success_or_fail : string -> print:('a -> string) -> 'a t -> 'a t

Trace both error or success

\ No newline at end of file +Debug_ (containers.CCParse.Debug_)

Module CCParse.Debug_

Debugging utils. EXPERIMENTAL

val trace_fail : string -> 'a t -> 'a t

trace_fail name p behaves like p, but prints the error message of p on stderr whenever p fails.

  • parameter name

    used as a prefix of all trace messages.

val trace_success : string -> print:('a -> string) -> 'a t -> 'a t

trace_success name ~print p behaves like p, but prints successful runs of p using print.

val trace_success_or_fail : string -> print:('a -> string) -> 'a t -> 'a t

Trace both error or success

diff --git a/dev/containers/CCParse/Error/index.html b/dev/containers/CCParse/Error/index.html index 25c81bd6..a98005d0 100644 --- a/dev/containers/CCParse/Error/index.html +++ b/dev/containers/CCParse/Error/index.html @@ -1,2 +1,2 @@ -Error (containers.CCParse.Error)

Module CCParse.Error

Errors

type t

A parse error.

  • since 3.6
val position : t -> position

Returns position of the error

val line_and_column : t -> int * int

Line and column numbers of the error position.

val msg : t -> string
val to_string : t -> string

Prints the error

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

Pretty prints the error

\ No newline at end of file +Error (containers.CCParse.Error)

Module CCParse.Error

Errors

type t

A parse error.

  • since 3.6
val position : t -> position

Returns position of the error

val line_and_column : t -> int * int

Line and column numbers of the error position.

val msg : t -> string
val to_string : t -> string

Prints the error

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

Pretty prints the error

diff --git a/dev/containers/CCParse/Infix/index.html b/dev/containers/CCParse/Infix/index.html index 3c559454..0d6aa7ec 100644 --- a/dev/containers/CCParse/Infix/index.html +++ b/dev/containers/CCParse/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCParse.Infix)

Module CCParse.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map. p >|= f parses an item x using p, and returns f x.

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

Alias to bind. p >>= f results in a new parser which behaves as p then, in case of success, applies f to the result.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Applicative.

val (<*) : 'a t -> _ t -> 'a t

a <* b parses a into x, parses b and ignores its result, and returns x.

val (*>) : _ t -> 'a t -> 'a t

a *> b parses a, then parses b into x, and returns x. The result of a is ignored.

val (<|>) : 'a t -> 'a t -> 'a t

Alias to or_.

a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a.

val (<?>) : 'a t -> string -> 'a t

a <?> msg behaves like a, but if a fails, a <?> msg fails with msg instead. Useful as the last choice in a series of <|>. For example: a <|> b <|> c <?> "expected one of a, b, c".

val (|||) : 'a t -> 'b t -> ('a * 'b) t

Alias to both. a ||| b parses a, then b, then returns the pair of their results.

  • since 3.6
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
\ No newline at end of file +Infix (containers.CCParse.Infix)

Module CCParse.Infix

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map. p >|= f parses an item x using p, and returns f x.

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

Alias to bind. p >>= f results in a new parser which behaves as p then, in case of success, applies f to the result.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Applicative.

val (<*) : 'a t -> _ t -> 'a t

a <* b parses a into x, parses b and ignores its result, and returns x.

val (*>) : _ t -> 'a t -> 'a t

a *> b parses a, then parses b into x, and returns x. The result of a is ignored.

val (<|>) : 'a t -> 'a t -> 'a t

Alias to or_.

a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a.

val (<?>) : 'a t -> string -> 'a t

a <?> msg behaves like a, but if a fails, a <?> msg fails with msg instead. Useful as the last choice in a series of <|>. For example: a <|> b <|> c <?> "expected one of a, b, c".

val (|||) : 'a t -> 'b t -> ('a * 'b) t

Alias to both. a ||| b parses a, then b, then returns the pair of their results.

  • since 3.6
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
diff --git a/dev/containers/CCParse/Position/index.html b/dev/containers/CCParse/Position/index.html index 2b9af301..6d9bbf56 100644 --- a/dev/containers/CCParse/Position/index.html +++ b/dev/containers/CCParse/Position/index.html @@ -1,2 +1,2 @@ -Position (containers.CCParse.Position)

Module CCParse.Position

Positions in input

type t = position
val line : t -> int

Line number, 0 based

val column : t -> int

Column number, 0 based

val line_and_column : t -> int * int

Line and column number

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

Unspecified pretty-printed version of the position.

\ No newline at end of file +Position (containers.CCParse.Position)

Module CCParse.Position

Positions in input

type t = position
val line : t -> int

Line number, 0 based

val column : t -> int

Column number, 0 based

val line_and_column : t -> int * int

Line and column number

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

Unspecified pretty-printed version of the position.

diff --git a/dev/containers/CCParse/Slice/index.html b/dev/containers/CCParse/Slice/index.html index d2e9dd42..6dcd0f0e 100644 --- a/dev/containers/CCParse/Slice/index.html +++ b/dev/containers/CCParse/Slice/index.html @@ -1,2 +1,2 @@ -Slice (containers.CCParse.Slice)

Module CCParse.Slice

Functions on slices.

type t = slice
val is_empty : t -> bool

Is the slice empty?

val length : t -> int

Length of the slice

val to_string : t -> string

Convert the slice into a string. Linear time and memory in length slice

\ No newline at end of file +Slice (containers.CCParse.Slice)

Module CCParse.Slice

Functions on slices.

type t = slice
val is_empty : t -> bool

Is the slice empty?

val length : t -> int

Length of the slice

val to_string : t -> string

Convert the slice into a string. Linear time and memory in length slice

diff --git a/dev/containers/CCParse/U/index.html b/dev/containers/CCParse/U/index.html index 8e14f6b2..ab2769bf 100644 --- a/dev/containers/CCParse/U/index.html +++ b/dev/containers/CCParse/U/index.html @@ -1,15 +1,15 @@ -U (containers.CCParse.U)

Module CCParse.U

Utils

This is useful to parse OCaml-like values in a simple way. All the parsers are whitespace-insensitive (they skip whitespace).

val list : ?start:string -> ?stop:string -> ?sep:string -> 'a t -> 'a list t

list p parses a list of p, with the OCaml conventions for start token "[", stop token "]" and separator ";". Whitespace between items are skipped.

val int : int t

Parse an int in decimal representation.

val in_paren : 'a t -> 'a t

in_paren p parses an opening "(",p , and then ")".

  • since 3.6
val in_parens_opt : 'a t -> 'a t

in_parens_opt p parses p in an arbitrary number of nested parenthesis (possibly 0).

  • since 3.6
val option : 'a t -> 'a option t

option p parses "Some <x>" into Some x if p parses "<x>" into x, and parses "None" into None.

  • since 3.6
val hexa_int : int t

Parse an int int hexadecimal format. Accepts an optional 0x prefix, and ignores capitalization.

  • since 3.6
val word : string t

Non empty string of alpha num, start with alpha.

val bool : bool t

Accepts "true" or "false"

  • since 3.6
val pair : - ?start:string -> - ?stop:string -> - ?sep:string -> +U (containers.CCParse.U)

Module CCParse.U

Utils

This is useful to parse OCaml-like values in a simple way. All the parsers are whitespace-insensitive (they skip whitespace).

val list : ?start:string -> ?stop:string -> ?sep:string -> 'a t -> 'a list t

list p parses a list of p, with the OCaml conventions for start token "[", stop token "]" and separator ";". Whitespace between items are skipped.

val int : int t

Parse an int in decimal representation.

val in_paren : 'a t -> 'a t

in_paren p parses an opening "(",p , and then ")".

  • since 3.6
val in_parens_opt : 'a t -> 'a t

in_parens_opt p parses p in an arbitrary number of nested parenthesis (possibly 0).

  • since 3.6
val option : 'a t -> 'a option t

option p parses "Some <x>" into Some x if p parses "<x>" into x, and parses "None" into None.

  • since 3.6
val hexa_int : int t

Parse an int int hexadecimal format. Accepts an optional 0x prefix, and ignores capitalization.

  • since 3.6
val word : string t

Non empty string of alpha num, start with alpha.

val bool : bool t

Accepts "true" or "false"

  • since 3.6
val pair : + ?start:string -> + ?stop:string -> + ?sep:string -> 'a t -> 'b t -> ('a * 'b) t

Parse a pair using OCaml syntactic conventions. The default is "(a, b)".

val triple : - ?start:string -> - ?stop:string -> - ?sep:string -> + ?start:string -> + ?stop:string -> + ?sep:string -> 'a t -> 'b t -> 'c t -> - ('a * 'b * 'c) t

Parse a triple using OCaml syntactic conventions. The default is "(a, b, c)".

\ No newline at end of file + ('a * 'b * 'c) t

Parse a triple using OCaml syntactic conventions. The default is "(a, b, c)".

diff --git a/dev/containers/CCParse/index.html b/dev/containers/CCParse/index.html index fa9db9df..87cdf5bd 100644 --- a/dev/containers/CCParse/index.html +++ b/dev/containers/CCParse/index.html @@ -1,5 +1,5 @@ -CCParse (containers.CCParse)

Module CCParse

Very Simple Parser Combinators

These combinators can be used to write very simple parsers, for example to extract data from a line-oriented file, or as a replacement to Scanf.

A few examples

Some more advanced example(s) can be found in the /examples directory.

Parse a tree
open CCParse;;
+CCParse (containers.CCParse)

Module CCParse

Very Simple Parser Combinators

These combinators can be used to write very simple parsers, for example to extract data from a line-oriented file, or as a replacement to Scanf.

A few examples

Some more advanced example(s) can be found in the /examples directory.

Parse a tree
open CCParse;;
 
 type tree = L of int | N of tree * tree;;
 
@@ -24,8 +24,8 @@ let l_printed =
 
 let l' = CCParse.parse_string_exn p l_printed;;
 
-assert (l=l');;

Stability guarantees

Some functions are marked "experimental" and are still subject to change.

type position

A position in the input. Typically it'll point at the beginning of an error location.

module Position : sig ... end
module Error : sig ... end
type +'a or_error = ('a, Error.t) result

'a or_error is either Ok x for some result x : 'a, or an error Error.t.

See stringify_result and Error.to_string to print the error message.

exception ParseError of Error.t

Input

Combinators

type 'a t

The abstract type of parsers that return a value of type 'a (or fail).

  • raises ParseError

    in case of failure.

  • since 3.6 the type is private.
val return : 'a -> 'a t

Always succeeds, without consuming its input.

val pure : 'a -> 'a t

Synonym to return.

val map : ('a -> 'b) -> 'a t -> 'b t
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val map3 : ('a -> 'b -> 'c -> 'd) -> 'a t -> 'b t -> 'c t -> 'd t
val bind : ('a -> 'b t) -> 'a t -> 'b t

bind f p results in a new parser which behaves as p then, in case of success, applies f to the result.

  • since 3.6
val ap : ('a -> 'b) t -> 'a t -> 'b t

Applicative.

  • since 3.6
val eoi : unit t

Expect the end of input, fails otherwise.

val empty : unit t

Succeed with ().

  • since 3.6
val fail : string -> 'a t

fail msg fails with the given message. It can trigger a backtrack.

val failf : ('a, unit, string, 'b t) format4 -> 'a

Format.sprintf version of fail.

val fail_lazy : (unit -> string) -> 'a t

Like fail, but only produce an error message on demand.

  • since 3.6
val parsing : string -> 'a t -> 'a t

parsing s p behaves the same as p, with the information that we are parsing s, if p fails. The message s is added to the error, it does not replace it, not does the location change (the error still points to the same location as in p).

val set_error_message : string -> 'a t -> 'a t

set_error_message msg p behaves like p, but if p fails, set_error_message msg p fails with msg instead and at the current position. The internal error message of p is just discarded.

  • since 3.6
val pos : position t

pos returns the current position in the buffer.

EXPERIMENTAL

  • since 3.7
val with_pos : 'a t -> ('a * position) t

with_pos p behaves like p, but returns the (starting) position along with p's result.

EXPERIMENTAL

  • since 3.6
val any_char : char t

any_char parses any character. It still fails if the end of input was reached.

  • since 3.6
val any_char_n : int -> string t

any_char_n len parses exactly len characters from the input. Fails if the input doesn't contain at least len chars.

  • since 3.6
val char : char -> char t

char c parses the character c and nothing else.

type slice

A slice of the input, as returned by some combinators such as split_1 or split_list or take.

The idea is that one can use some parsers to cut the input into slices, e.g. split into lines, or split a line into fields (think CSV or TSV). Then a variety of parsers can be used on each slice to extract data from it using recurse.

Slices contain enough information to make it possible for recurse slice p to report failures (if p fails) using locations from the original input, not relative to the slice. Therefore, even after splitting the input into lines using, say, each_line, a failure to parse the 500th line will be reported at line 500 and not at line 1.

EXPERIMENTAL

  • since 3.6
module Slice : sig ... end

Functions on slices.

val recurse : slice -> 'a t -> 'a t

recurse slice p parses the slice (most likely obtained via another combinator, such as split_1 or split_list), using p.

The slice contains a position which is used to relocate error messages to their position in the whole input, not just relative to the slice.

EXPERIMENTAL

  • since 3.6
val set_current_slice : slice -> unit t

set_current_slice slice replaces the parser's state with slice.

EXPERIMENTAL

  • since 3.6
val chars_fold : - f: +assert (l=l');;

Stability guarantees

Some functions are marked "experimental" and are still subject to change.

type position

A position in the input. Typically it'll point at the beginning of an error location.

module Position : sig ... end
module Error : sig ... end
type +'a or_error = ('a, Error.t) result

'a or_error is either Ok x for some result x : 'a, or an error Error.t.

See stringify_result and Error.to_string to print the error message.

exception ParseError of Error.t

Input

Combinators

type 'a t

The abstract type of parsers that return a value of type 'a (or fail).

  • since 3.6 the type is private.
val return : 'a -> 'a t

Always succeeds, without consuming its input.

val pure : 'a -> 'a t

Synonym to return.

val map : ('a -> 'b) -> 'a t -> 'b t
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val map3 : ('a -> 'b -> 'c -> 'd) -> 'a t -> 'b t -> 'c t -> 'd t
val bind : ('a -> 'b t) -> 'a t -> 'b t

bind f p results in a new parser which behaves as p then, in case of success, applies f to the result.

  • since 3.6
val ap : ('a -> 'b) t -> 'a t -> 'b t

Applicative.

  • since 3.6
val eoi : unit t

Expect the end of input, fails otherwise.

val empty : unit t

Succeed with ().

  • since 3.6
val fail : string -> 'a t

fail msg fails with the given message. It can trigger a backtrack.

val failf : ('a, unit, string, 'b t) format4 -> 'a

Format.sprintf version of fail.

val fail_lazy : (unit -> string) -> 'a t

Like fail, but only produce an error message on demand.

  • since 3.6
val parsing : string -> 'a t -> 'a t

parsing s p behaves the same as p, with the information that we are parsing s, if p fails. The message s is added to the error, it does not replace it, not does the location change (the error still points to the same location as in p).

val set_error_message : string -> 'a t -> 'a t

set_error_message msg p behaves like p, but if p fails, set_error_message msg p fails with msg instead and at the current position. The internal error message of p is just discarded.

  • since 3.6
val pos : position t

pos returns the current position in the buffer.

EXPERIMENTAL

  • since 3.7
val with_pos : 'a t -> ('a * position) t

with_pos p behaves like p, but returns the (starting) position along with p's result.

EXPERIMENTAL

  • since 3.6
val any_char : char t

any_char parses any character. It still fails if the end of input was reached.

  • since 3.6
val any_char_n : int -> string t

any_char_n len parses exactly len characters from the input. Fails if the input doesn't contain at least len chars.

  • since 3.6
val char : char -> char t

char c parses the character c and nothing else.

type slice

A slice of the input, as returned by some combinators such as split_1 or split_list or take.

The idea is that one can use some parsers to cut the input into slices, e.g. split into lines, or split a line into fields (think CSV or TSV). Then a variety of parsers can be used on each slice to extract data from it using recurse.

Slices contain enough information to make it possible for recurse slice p to report failures (if p fails) using locations from the original input, not relative to the slice. Therefore, even after splitting the input into lines using, say, each_line, a failure to parse the 500th line will be reported at line 500 and not at line 1.

EXPERIMENTAL

  • since 3.6
module Slice : sig ... end

Functions on slices.

val recurse : slice -> 'a t -> 'a t

recurse slice p parses the slice (most likely obtained via another combinator, such as split_1 or split_list), using p.

The slice contains a position which is used to relocate error messages to their position in the whole input, not just relative to the slice.

EXPERIMENTAL

  • since 3.6
val set_current_slice : slice -> unit t

set_current_slice slice replaces the parser's state with slice.

EXPERIMENTAL

  • since 3.6
val chars_fold : + f: ('acc -> char -> [ `Continue of 'acc @@ -34,7 +34,7 @@ assert (l=l');;

-> 'acc -> ('acc * slice) t

chars_fold f acc0 folds over characters of the input. Each char c is passed, along with the current accumulator, to f; f can either:

  • stop, by returning `Stop acc. In this case the final accumulator acc is returned, and c is not consumed.
  • consume char and stop, by returning `Consume_and_stop acc.
  • fail, by returning `Fail msg. In this case the parser fails with the given message.
  • continue, by returning `Continue acc. The parser continues to the next char with the new accumulator.

This is a generalization of of chars_if that allows one to transform characters on the fly, skip some, handle escape sequences, etc. It can also be useful as a base component for a lexer.

  • returns

    a pair of the final accumular, and the slice matched by the fold.

  • since 3.6
val chars_fold_transduce : - f: + f: ('acc -> char -> [ `Continue of 'acc @@ -43,6 +43,6 @@ assert (l=l');;

-> 'acc -> - ('acc * string) t

Same as chars_fold but with the following differences:

  • returns a string along with the accumulator, rather than the slice of all the characters accepted by `Continue _. The string is built from characters returned by `Yield.
  • new case `Yield (acc, c) adds c to the returned string and continues parsing with acc.
  • since 3.6
val take_until_success : 'a t -> (slice * 'a) t

take_until_success p accumulates characters of the input into a slice, until p successfully parses a value x; then it returns slice, x.

NOTE performance wise, if p does a lot of work at each position, this can be costly (thing naive substring search if p is string "very long needle").

  • since 3.12
val take : int -> slice t

take len parses exactly len characters from the input. Fails if the input doesn't contain at least len chars.

  • since 3.6
val take_if : (char -> bool) -> slice t

take_if f takes characters as long as they satisfy the predicate f.

  • since 3.6
val take1_if : ?descr:string -> (char -> bool) -> slice t

take1_if f takes characters as long as they satisfy the predicate f. Fails if no character satisfies f.

  • parameter descr

    describes what kind of character was expected, in case of error

  • since 3.6
val char_if : ?descr:string -> (char -> bool) -> char t

char_if f parses a character c if f c = true. Fails if the next char does not satisfy f.

  • parameter descr

    describes what kind of character was expected, in case of error

val chars_if : (char -> bool) -> string t

chars_if f parses a string of chars that satisfy f. Cannot fail.

val chars1_if : ?descr:string -> (char -> bool) -> string t

Like chars_if, but accepts only non-empty strings. chars1_if p fails if the string accepted by chars_if p is empty. chars1_if p is equivalent to take1_if p >|= Slice.to_string.

  • parameter descr

    describes what kind of character was expected, in case of error

val endline : char t

Parse '\n'.

val space : char t

Tab or space.

val white : char t

Tab or space or newline.

val skip_chars : (char -> bool) -> unit t

Skip 0 or more chars satisfying the predicate.

val skip_space : unit t

Skip ' ' and '\t'.

val skip_white : unit t

Skip ' ' and '\t' and '\n'.

val is_alpha : char -> bool

Is the char a letter?

val is_num : char -> bool

Is the char a digit?

val is_alpha_num : char -> bool

Is the char a letter or a digit?

val is_space : char -> bool

True on ' ' and '\t'.

val is_white : char -> bool

True on ' ' and '\t' and '\n'.

val suspend : (unit -> 'a t) -> 'a t

suspend f is the same as f (), but evaluates f () only when needed.

A practical use case is to implement recursive parsers manually, as described in fix. The parser is let rec p () = โ€ฆ, and suspend p can be used in the definition to use p.

val string : string -> string t

string s parses exactly the string s, and nothing else.

val exact : string -> string t

Alias to string.

  • since 3.6
val many : 'a t -> 'a list t

many p parses p repeatedly, until p fails, and collects the results into a list.

val optional : _ t -> unit t

optional p tries to parse p, and return () whether it succeeded or failed. Cannot fail itself. It consumes input if p succeeded (as much as p consumed), but consumes not input if p failed.

  • since 3.6
val try_ : 'a t -> 'a t

try_ p is just like p (it used to play a role in backtracking semantics but no more).

  • deprecated

    since 3.6 it can just be removed. See try_opt if you want to detect failure.

val try_opt : 'a t -> 'a option t

try_opt p tries to parse using p, and return Some x if p succeeded with x (and consumes what p consumed). Otherwise it returns None and consumes nothing. This cannot fail.

  • since 3.6
val many_until : until:_ t -> 'a t -> 'a list t

many_until ~until p parses as many p as it can until the until parser successfully returns. If p fails before that then many_until ~until p fails as well. Typically until can be a closing ')' or another termination condition, and what is consumed by until is also consumed by many_until ~until p.

EXPERIMENTAL

  • since 3.6
val try_or : 'a t -> f:('a -> 'b t) -> else_:'b t -> 'b t

try_or p1 ~f ~else_:p2 attempts to parse x using p1, and then becomes f x. If p1 fails, then it becomes p2. This can be useful if f is expensive but only ever works if p1 matches (e.g. after an opening parenthesis or some sort of prefix).

  • since 3.6
val try_or_l : ?msg:string -> ?else_:'a t -> (unit t * 'a t) list -> 'a t

try_or_l ?else_ l tries each pair (test, p) in order. If the n-th test succeeds, then try_or_l l behaves like n-th p, whether p fails or not. If test consumes input, the state is restored before calling p. If they all fail, and else_ is defined, then it behaves like else_. If all fail, and else_ is None, then it fails as well.

This is a performance optimization compared to (<|>). We commit to a branch if the test succeeds, without backtracking at all. It can also provide better error messages, because failures in the parser will not be reported as failures in try_or_l.

See lookahead_ignore for a convenient way of writing the test conditions.

  • parameter msg

    error message if all options fail

    EXPERIMENTAL

  • since 3.6
val or_ : 'a t -> 'a t -> 'a t

or_ p1 p2 tries to parse p1, and if it fails, tries p2 from the same position.

  • since 3.6
val both : 'a t -> 'b t -> ('a * 'b) t

both a b parses a, then b, then returns the pair of their results.

  • since 3.6
val many1 : 'a t -> 'a list t

many1 p is like many p excepts it fails if the list is empty (i.e. it needs p to succeed at least once).

val skip : _ t -> unit t

skip p parses zero or more times p and ignores its result. It is eager, meaning it will continue as long as p succeeds. As soon as p fails, skip p stops consuming any input.

val sep : by:_ t -> 'a t -> 'a list t

sep ~by p parses a list of p separated by by.

val sep_until : until:_ t -> by:_ t -> 'a t -> 'a list t

Same as sep but stop when until parses successfully.

  • since 3.6
val sep1 : by:_ t -> 'a t -> 'a list t

sep1 ~by p parses a non empty list of p, separated by by.

val lookahead : 'a t -> 'a t

lookahead p behaves like p, except it doesn't consume any input.

EXPERIMENTAL

  • since 3.6
val lookahead_ignore : 'a t -> unit t

lookahead_ignore p tries to parse input with p, and succeeds if p succeeds. However it doesn't consume any input and returns (), so in effect its only use-case is to detect whether p succeeds, e.g. in try_or_l.

EXPERIMENTAL

  • since 3.6
val fix : ('a t -> 'a t) -> 'a t

Fixpoint combinator. fix (fun self -> p) is the parser p, in which self refers to the parser p itself (which is useful to parse recursive structures.

An alternative, manual implementation to let p = fix (fun self -> q) is:

let rec p () =
+  ('acc * string) t

Same as chars_fold but with the following differences:

  • returns a string along with the accumulator, rather than the slice of all the characters accepted by `Continue _. The string is built from characters returned by `Yield.
  • new case `Yield (acc, c) adds c to the returned string and continues parsing with acc.
  • since 3.6
val take_until_success : 'a t -> (slice * 'a) t

take_until_success p accumulates characters of the input into a slice, until p successfully parses a value x; then it returns slice, x.

NOTE performance wise, if p does a lot of work at each position, this can be costly (thing naive substring search if p is string "very long needle").

  • since 3.12
val take : int -> slice t

take len parses exactly len characters from the input. Fails if the input doesn't contain at least len chars.

  • since 3.6
val take_if : (char -> bool) -> slice t

take_if f takes characters as long as they satisfy the predicate f.

  • since 3.6
val take1_if : ?descr:string -> (char -> bool) -> slice t

take1_if f takes characters as long as they satisfy the predicate f. Fails if no character satisfies f.

  • parameter descr

    describes what kind of character was expected, in case of error

  • since 3.6
val char_if : ?descr:string -> (char -> bool) -> char t

char_if f parses a character c if f c = true. Fails if the next char does not satisfy f.

  • parameter descr

    describes what kind of character was expected, in case of error

val chars_if : (char -> bool) -> string t

chars_if f parses a string of chars that satisfy f. Cannot fail.

val chars1_if : ?descr:string -> (char -> bool) -> string t

Like chars_if, but accepts only non-empty strings. chars1_if p fails if the string accepted by chars_if p is empty. chars1_if p is equivalent to take1_if p >|= Slice.to_string.

  • parameter descr

    describes what kind of character was expected, in case of error

val endline : char t

Parse '\n'.

val space : char t

Tab or space.

val white : char t

Tab or space or newline.

val skip_chars : (char -> bool) -> unit t

Skip 0 or more chars satisfying the predicate.

val skip_space : unit t

Skip ' ' and '\t'.

val skip_white : unit t

Skip ' ' and '\t' and '\n'.

val is_alpha : char -> bool

Is the char a letter?

val is_num : char -> bool

Is the char a digit?

val is_alpha_num : char -> bool

Is the char a letter or a digit?

val is_space : char -> bool

True on ' ' and '\t'.

val is_white : char -> bool

True on ' ' and '\t' and '\n'.

val suspend : (unit -> 'a t) -> 'a t

suspend f is the same as f (), but evaluates f () only when needed.

A practical use case is to implement recursive parsers manually, as described in fix. The parser is let rec p () = โ€ฆ, and suspend p can be used in the definition to use p.

val string : string -> string t

string s parses exactly the string s, and nothing else.

val exact : string -> string t

Alias to string.

  • since 3.6
val many : 'a t -> 'a list t

many p parses p repeatedly, until p fails, and collects the results into a list.

val optional : _ t -> unit t

optional p tries to parse p, and return () whether it succeeded or failed. Cannot fail itself. It consumes input if p succeeded (as much as p consumed), but consumes not input if p failed.

  • since 3.6
val try_ : 'a t -> 'a t

try_ p is just like p (it used to play a role in backtracking semantics but no more).

  • deprecated

    since 3.6 it can just be removed. See try_opt if you want to detect failure.

val try_opt : 'a t -> 'a option t

try_opt p tries to parse using p, and return Some x if p succeeded with x (and consumes what p consumed). Otherwise it returns None and consumes nothing. This cannot fail.

  • since 3.6
val many_until : until:_ t -> 'a t -> 'a list t

many_until ~until p parses as many p as it can until the until parser successfully returns. If p fails before that then many_until ~until p fails as well. Typically until can be a closing ')' or another termination condition, and what is consumed by until is also consumed by many_until ~until p.

EXPERIMENTAL

  • since 3.6
val try_or : 'a t -> f:('a -> 'b t) -> else_:'b t -> 'b t

try_or p1 ~f ~else_:p2 attempts to parse x using p1, and then becomes f x. If p1 fails, then it becomes p2. This can be useful if f is expensive but only ever works if p1 matches (e.g. after an opening parenthesis or some sort of prefix).

  • since 3.6
val try_or_l : ?msg:string -> ?else_:'a t -> (unit t * 'a t) list -> 'a t

try_or_l ?else_ l tries each pair (test, p) in order. If the n-th test succeeds, then try_or_l l behaves like n-th p, whether p fails or not. If test consumes input, the state is restored before calling p. If they all fail, and else_ is defined, then it behaves like else_. If all fail, and else_ is None, then it fails as well.

This is a performance optimization compared to (<|>). We commit to a branch if the test succeeds, without backtracking at all. It can also provide better error messages, because failures in the parser will not be reported as failures in try_or_l.

See lookahead_ignore for a convenient way of writing the test conditions.

  • parameter msg

    error message if all options fail

    EXPERIMENTAL

  • since 3.6
val or_ : 'a t -> 'a t -> 'a t

or_ p1 p2 tries to parse p1, and if it fails, tries p2 from the same position.

  • since 3.6
val both : 'a t -> 'b t -> ('a * 'b) t

both a b parses a, then b, then returns the pair of their results.

  • since 3.6
val many1 : 'a t -> 'a list t

many1 p is like many p excepts it fails if the list is empty (i.e. it needs p to succeed at least once).

val skip : _ t -> unit t

skip p parses zero or more times p and ignores its result. It is eager, meaning it will continue as long as p succeeds. As soon as p fails, skip p stops consuming any input.

val sep : by:_ t -> 'a t -> 'a list t

sep ~by p parses a list of p separated by by.

val sep_until : until:_ t -> by:_ t -> 'a t -> 'a list t

Same as sep but stop when until parses successfully.

  • since 3.6
val sep1 : by:_ t -> 'a t -> 'a list t

sep1 ~by p parses a non empty list of p, separated by by.

val lookahead : 'a t -> 'a t

lookahead p behaves like p, except it doesn't consume any input.

EXPERIMENTAL

  • since 3.6
val lookahead_ignore : 'a t -> unit t

lookahead_ignore p tries to parse input with p, and succeeds if p succeeds. However it doesn't consume any input and returns (), so in effect its only use-case is to detect whether p succeeds, e.g. in try_or_l.

EXPERIMENTAL

  • since 3.6
val fix : ('a t -> 'a t) -> 'a t

Fixpoint combinator. fix (fun self -> p) is the parser p, in which self refers to the parser p itself (which is useful to parse recursive structures.

An alternative, manual implementation to let p = fix (fun self -> q) is:

let rec p () =
  let self = suspend p in
- q
val line : slice t

Parse a line, '\n' excluded, and position the cursor after the '\n'.

  • since 3.6
val line_str : string t

line_str is line >|= Slice.to_string. It parses the next line and turns the slice into a string. The state points to the character immediately after the '\n' character.

  • since 3.6
val each_line : 'a t -> 'a list t

each_line p runs p on each line of the input. EXPERIMENTAL

  • since 3.6
val split_1 : on_char:char -> (slice * slice option) t

split_1 ~on_char looks for on_char in the input, and returns a pair sl1, sl2, where:

  • sl1 is the slice of the input the precedes the first occurrence of on_char, or the whole input if on_char cannot be found. It does not contain on_char.
  • sl2 is the slice that comes after on_char, or None if on_char couldn't be found. It doesn't contain the first occurrence of on_char (if any).

The parser is now positioned at the end of the input.

EXPERIMENTAL

  • since 3.6
val split_list : on_char:char -> slice list t

split_list ~on_char splits the input on all occurrences of on_char, returning a list of slices.

EXPERIMENTAL

  • since 3.6
val split_list_at_most : on_char:char -> int -> slice list t

split_list_at_most ~on_char n applies split_1 ~on_char at most n times, to get a list of n+1 elements. The last element might contain on_char. This is useful to limit the amount of work done by split_list.

EXPERIMENTAL

  • since 3.6
val split_2 : on_char:char -> (slice * slice) t

split_2 ~on_char splits the input into exactly 2 fields, and fails if the split yields less or more than 2 items. EXPERIMENTAL

  • since 3.6
val split_3 : on_char:char -> (slice * slice * slice) t

See split_2 EXPERIMENTAL

  • since 3.6
val split_4 : on_char:char -> (slice * slice * slice * slice) t

See split_2 EXPERIMENTAL

  • since 3.6
val each_split : on_char:char -> 'a t -> 'a list t

split_list_map ~on_char p uses split_list ~on_char to split the input, then parses each chunk of the input thus obtained using p.

The difference with sep ~by:(char on_char) p is that sep calls p first, and only tries to find on_char after p returns. While it is more flexible, this technique also means p has to be careful not to consume on_char by error.

A useful specialization of this is each_line, which is basically each_split ~on_char:'\n' p.

EXPERIMENTAL

  • since 3.6
val all : slice t

all returns all the unconsumed input as a slice, and consumes it. Use Slice.to_string to turn it into a string.

Note that lookahead all can be used to peek at the rest of the input without consuming anything.

  • since 3.6
val all_str : string t

all_str accepts all the remaining chars and extracts them into a string. Similar to all but with a string.

EXPERIMENTAL

  • since 3.6
val memo : 'a t -> 'a t

Memoize the parser. memo p will behave like p, but when called in a state (read: position in input) it has already processed, memo p returns a result directly. The implementation uses an underlying hashtable. This can be costly in memory, but improve the run time a lot if there is a lot of backtracking involving p.

Do not call memo inside other functions, especially with (>>=), map, etc. being so prevalent. Instead the correct way to use it is in a toplevel definition:

let my_expensive_parser = memo (foo *> bar >>= fun i -> โ€ฆ)

This function is not thread-safe.

val fix_memo : ('a t -> 'a t) -> 'a t

Like fix, but the fixpoint is memoized.

Infix

module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map. p >|= f parses an item x using p, and returns f x.

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

Alias to bind. p >>= f results in a new parser which behaves as p then, in case of success, applies f to the result.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Applicative.

val (<*) : 'a t -> _ t -> 'a t

a <* b parses a into x, parses b and ignores its result, and returns x.

val (*>) : _ t -> 'a t -> 'a t

a *> b parses a, then parses b into x, and returns x. The result of a is ignored.

val (<|>) : 'a t -> 'a t -> 'a t

Alias to or_.

a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a.

val (<?>) : 'a t -> string -> 'a t

a <?> msg behaves like a, but if a fails, a <?> msg fails with msg instead. Useful as the last choice in a series of <|>. For example: a <|> b <|> c <?> "expected one of a, b, c".

val (|||) : 'a t -> 'b t -> ('a * 'b) t

Alias to both. a ||| b parses a, then b, then returns the pair of their results.

  • since 3.6
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t

Parse input

val stringify_result : 'a or_error -> ('a, string) result

Turn a Error.t-oriented result into a more basic string result.

  • since 3.6
val parse_string : 'a t -> string -> ('a, string) result

Parse a string using the parser.

val parse_string_e : 'a t -> string -> 'a or_error

Version of parse_string that returns a more detailed error.

val parse_string_exn : 'a t -> string -> 'a
  • raises ParseError

    if it fails.

val parse_file : 'a t -> string -> ('a, string) result

parse_file p filename parses file named filename with p by opening the file and reading it whole.

val parse_file_e : 'a t -> string -> 'a or_error

Version of parse_file that returns a more detailed error.

val parse_file_exn : 'a t -> string -> 'a

Same as parse_file, but

  • raises ParseError

    if it fails.

module U : sig ... end
module Debug_ : sig ... end

Debugging utils. EXPERIMENTAL

\ No newline at end of file + q
val line : slice t

Parse a line, '\n' excluded, and position the cursor after the '\n'.

  • since 3.6
val line_str : string t

line_str is line >|= Slice.to_string. It parses the next line and turns the slice into a string. The state points to the character immediately after the '\n' character.

  • since 3.6
val each_line : 'a t -> 'a list t

each_line p runs p on each line of the input. EXPERIMENTAL

  • since 3.6
val split_1 : on_char:char -> (slice * slice option) t

split_1 ~on_char looks for on_char in the input, and returns a pair sl1, sl2, where:

  • sl1 is the slice of the input the precedes the first occurrence of on_char, or the whole input if on_char cannot be found. It does not contain on_char.
  • sl2 is the slice that comes after on_char, or None if on_char couldn't be found. It doesn't contain the first occurrence of on_char (if any).

The parser is now positioned at the end of the input.

EXPERIMENTAL

  • since 3.6
val split_list : on_char:char -> slice list t

split_list ~on_char splits the input on all occurrences of on_char, returning a list of slices.

EXPERIMENTAL

  • since 3.6
val split_list_at_most : on_char:char -> int -> slice list t

split_list_at_most ~on_char n applies split_1 ~on_char at most n times, to get a list of n+1 elements. The last element might contain on_char. This is useful to limit the amount of work done by split_list.

EXPERIMENTAL

  • since 3.6
val split_2 : on_char:char -> (slice * slice) t

split_2 ~on_char splits the input into exactly 2 fields, and fails if the split yields less or more than 2 items. EXPERIMENTAL

  • since 3.6
val split_3 : on_char:char -> (slice * slice * slice) t

See split_2 EXPERIMENTAL

  • since 3.6
val split_4 : on_char:char -> (slice * slice * slice * slice) t

See split_2 EXPERIMENTAL

  • since 3.6
val each_split : on_char:char -> 'a t -> 'a list t

split_list_map ~on_char p uses split_list ~on_char to split the input, then parses each chunk of the input thus obtained using p.

The difference with sep ~by:(char on_char) p is that sep calls p first, and only tries to find on_char after p returns. While it is more flexible, this technique also means p has to be careful not to consume on_char by error.

A useful specialization of this is each_line, which is basically each_split ~on_char:'\n' p.

EXPERIMENTAL

  • since 3.6
val all : slice t

all returns all the unconsumed input as a slice, and consumes it. Use Slice.to_string to turn it into a string.

Note that lookahead all can be used to peek at the rest of the input without consuming anything.

  • since 3.6
val all_str : string t

all_str accepts all the remaining chars and extracts them into a string. Similar to all but with a string.

EXPERIMENTAL

  • since 3.6
val memo : 'a t -> 'a t

Memoize the parser. memo p will behave like p, but when called in a state (read: position in input) it has already processed, memo p returns a result directly. The implementation uses an underlying hashtable. This can be costly in memory, but improve the run time a lot if there is a lot of backtracking involving p.

Do not call memo inside other functions, especially with (>>=), map, etc. being so prevalent. Instead the correct way to use it is in a toplevel definition:

let my_expensive_parser = memo (foo *> bar >>= fun i -> โ€ฆ)

This function is not thread-safe.

val fix_memo : ('a t -> 'a t) -> 'a t

Like fix, but the fixpoint is memoized.

Infix

module Infix : sig ... end
include module type of Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b t

Alias to map. p >|= f parses an item x using p, and returns f x.

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

Alias to bind. p >>= f results in a new parser which behaves as p then, in case of success, applies f to the result.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Applicative.

val (<*) : 'a t -> _ t -> 'a t

a <* b parses a into x, parses b and ignores its result, and returns x.

val (*>) : _ t -> 'a t -> 'a t

a *> b parses a, then parses b into x, and returns x. The result of a is ignored.

val (<|>) : 'a t -> 'a t -> 'a t

Alias to or_.

a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a.

val (<?>) : 'a t -> string -> 'a t

a <?> msg behaves like a, but if a fails, a <?> msg fails with msg instead. Useful as the last choice in a series of <|>. For example: a <|> b <|> c <?> "expected one of a, b, c".

val (|||) : 'a t -> 'b t -> ('a * 'b) t

Alias to both. a ||| b parses a, then b, then returns the pair of their results.

  • since 3.6
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t

Parse input

val stringify_result : 'a or_error -> ('a, string) result

Turn a Error.t-oriented result into a more basic string result.

  • since 3.6
val parse_string : 'a t -> string -> ('a, string) result

Parse a string using the parser.

val parse_string_e : 'a t -> string -> 'a or_error

Version of parse_string that returns a more detailed error.

val parse_string_exn : 'a t -> string -> 'a
val parse_file : 'a t -> string -> ('a, string) result

parse_file p filename parses file named filename with p by opening the file and reading it whole.

val parse_file_e : 'a t -> string -> 'a or_error

Version of parse_file that returns a more detailed error.

val parse_file_exn : 'a t -> string -> 'a

Same as parse_file, but

module U : sig ... end
module Debug_ : sig ... end

Debugging utils. EXPERIMENTAL

diff --git a/dev/containers/CCRandom/index.html b/dev/containers/CCRandom/index.html index 5b15ecc0..6d08101f 100644 --- a/dev/containers/CCRandom/index.html +++ b/dev/containers/CCRandom/index.html @@ -1,17 +1,17 @@ -CCRandom (containers.CCRandom)

Module CCRandom

Random Generators

Basic functions

val init : int -> unit

Initialize the 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 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).

val bits : unit -> int

Return 30 random bits in a nonnegative integer.

  • before 3.12.0

    used a different algorithm (affects all the following functions)

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 Invalid_argument.

  • since 4.13.0

Random.int32 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

Random.nativeint bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

Random.int64 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val bool : unit -> bool

Random.bool () returns true or false with probability 0.5 each.

val bits32 : unit -> Stdlib.Int32.t

Random.bits32 () returns 32 random bits as an integer between Int32.min_int and Int32.max_int.

  • since 4.14.0
val bits64 : unit -> Stdlib.Int64.t

Random.bits64 () returns 64 random bits as an integer between Int64.min_int and Int64.max_int.

  • since 4.14.0
val nativebits : unit -> Stdlib.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.0

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 = Stdlib.Random.State
val get_state : unit -> State.t

Return the current state of the generator used by the basic functions.

val set_state : State.t -> unit

Set the state of the generator used by the basic functions.

type 'a t = state -> 'a

Random generator for values of type 'a.

type 'a random_gen = 'a t
val return : 'a -> 'a t

return x is the generator that always returns x. Example: let random_int = return 4 (* fair dice roll *).

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

flat_map f g st is f (g st) st.

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

Monadic bind.

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

map f g st is f (g st).

val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val delay : (unit -> 'a t) -> 'a t

Delay evaluation. Useful for side-effectful generators that need some code to run for every call. Example:

let gensym = let r = ref 0 in fun () -> incr r; !r ;;
+CCRandom (containers.CCRandom)

Module CCRandom

Random Generators

Basic functions

val init : int -> unit

Initialize the 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 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).

val bits : unit -> int

Return 30 random bits in a nonnegative integer.

  • before 3.12.0

    used a different algorithm (affects all the following functions)

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 Invalid_argument.

  • since 4.13.0

Random.int32 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

Random.nativeint bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

Random.int64 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val bool : unit -> bool

Random.bool () returns true or false with probability 0.5 each.

val bits32 : unit -> Stdlib.Int32.t

Random.bits32 () returns 32 random bits as an integer between Int32.min_int and Int32.max_int.

  • since 4.14.0
val bits64 : unit -> Stdlib.Int64.t

Random.bits64 () returns 64 random bits as an integer between Int64.min_int and Int64.max_int.

  • since 4.14.0
val nativebits : unit -> Stdlib.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.0

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 = Stdlib.Random.State
val get_state : unit -> State.t

Return the current state of the generator used by the basic functions.

val set_state : State.t -> unit

Set the state of the generator used by the basic functions.

type 'a t = state -> 'a

Random generator for values of type 'a.

type 'a random_gen = 'a t
val return : 'a -> 'a t

return x is the generator that always returns x. Example: let random_int = return 4 (* fair dice roll *).

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

flat_map f g st is f (g st) st.

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

Monadic bind.

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

map f g st is f (g st).

val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val delay : (unit -> 'a t) -> 'a t

Delay evaluation. Useful for side-effectful generators that need some code to run for every call. Example:

let gensym = let r = ref 0 in fun () -> incr r; !r ;;
 
 delay (fun () ->
   let name = gensym() in
   small_int >>= fun i -> return (name,i)
-)
  • since 0.4
val choose : 'a t list -> 'a option t

Choose a generator within the list.

val choose_exn : 'a t list -> 'a t

Like choose but without option.

  • raises Invalid_argument

    if the list is empty.

val choose_array : 'a t array -> 'a option t

Choose a generator within the array.

val choose_return : 'a list -> 'a t

Choose among the list.

  • raises Invalid_argument

    if the list is empty.

val replicate : int -> 'a t -> 'a list t

replicate n g makes a list of n elements which are all generated randomly using g.

val sample_without_duplicates : - cmp:('a -> 'a -> int) -> +)
  • since 0.4
val choose : 'a t list -> 'a option t

Choose a generator within the list.

val choose_exn : 'a t list -> 'a t

Like choose but without option.

  • raises Invalid_argument

    if the list is empty.

val choose_array : 'a t array -> 'a option t

Choose a generator within the array.

val choose_return : 'a list -> 'a t

Choose among the list.

  • raises Invalid_argument

    if the list is empty.

val replicate : int -> 'a t -> 'a list t

replicate n g makes a list of n elements which are all generated randomly using g.

val sample_without_duplicates : + cmp:('a -> 'a -> int) -> int -> 'a t -> - 'a list t

sample_without_replacement n g makes a list of n elements which are all generated randomly using g with the added constraint that none of the generated random values are equal.

  • raises Invalid_argument

    if n <= 0.

  • since 2.4
val list_seq : 'a t list -> 'a list t

Build random lists from lists of random generators.

  • since 0.4
exception Pick_from_empty
  • since 0.16
val pick_list : 'a list -> 'a t

Pick an element at random from the list.

  • raises Pick_from_empty

    if the list is empty.

  • since 0.16
val pick_array : 'a array -> 'a t

Pick an element at random from the array.

  • raises Pick_from_empty

    if the array is empty.

  • since 0.16
val small_int : int t

A small int (100).

val int : int -> int t

Random int within the given range.

val int_range : int -> int -> int t

Inclusive range.

val small_float : float t

A reasonably small float (100.0).

  • since 0.6.1
val float : float -> float t

Random float within the given range.

  • since 0.6.1
val float_range : float -> float -> float t

Inclusive range. float_range a b assumes a < b.

  • since 0.6.1
val split : int -> (int * int) option t

Split a positive value n into n1,n2 where n = n1 + n2.

  • returns

    None if the value is too small.

val split_list : int -> len:int -> int list option t

Split a value n into a list of values whose sum is n and whose length is length. The list is never empty and does not contain 0.

  • raises Invalid_argument

    if len <= 1.

  • returns

    None if the value is too small.

val retry : ?max:int -> 'a option t -> 'a option t

retry g calls g until it returns some value, or until the maximum number of retries was reached. If g fails, then it counts for one iteration, and the generator retries.

  • parameter max:

    maximum number of retries. Default 10.

val try_successively : 'a option t list -> 'a option t

try_successively l tries each generator of l, one after the other. If some generator succeeds its result is returned, else the next generator is tried.

val (<?>) : 'a option t -> 'a option t -> 'a option t

a <?> b is a choice operator. It first tries a, and returns its result if successful. If a fails, then b is returned.

val fix : - ?sub1:('a t -> 'a t) list -> - ?sub2:('a t -> 'a t -> 'a t) list -> - ?subn:(int t * ('a list t -> 'a t)) list -> - base:'a t -> + 'a list t

sample_without_replacement n g makes a list of n elements which are all generated randomly using g with the added constraint that none of the generated random values are equal.

  • raises Invalid_argument

    if n <= 0.

  • since 2.4
val list_seq : 'a t list -> 'a list t

Build random lists from lists of random generators.

  • since 0.4
exception Pick_from_empty
  • since 0.16
val pick_list : 'a list -> 'a t

Pick an element at random from the list.

  • since 0.16
val pick_array : 'a array -> 'a t

Pick an element at random from the array.

  • since 0.16
val small_int : int t

A small int (100).

val int : int -> int t

Random int within the given range.

val int_range : int -> int -> int t

Inclusive range.

val small_float : float t

A reasonably small float (100.0).

  • since 0.6.1
val float : float -> float t

Random float within the given range.

  • since 0.6.1
val float_range : float -> float -> float t

Inclusive range. float_range a b assumes a < b.

  • since 0.6.1
val split : int -> (int * int) option t

Split a positive value n into n1,n2 where n = n1 + n2.

  • returns

    None if the value is too small.

val split_list : int -> len:int -> int list option t

Split a value n into a list of values whose sum is n and whose length is length. The list is never empty and does not contain 0.

  • raises Invalid_argument

    if len <= 1.

  • returns

    None if the value is too small.

val retry : ?max:int -> 'a option t -> 'a option t

retry g calls g until it returns some value, or until the maximum number of retries was reached. If g fails, then it counts for one iteration, and the generator retries.

  • parameter max:

    maximum number of retries. Default 10.

val try_successively : 'a option t list -> 'a option t

try_successively l tries each generator of l, one after the other. If some generator succeeds its result is returned, else the next generator is tried.

val (<?>) : 'a option t -> 'a option t -> 'a option t

a <?> b is a choice operator. It first tries a, and returns its result if successful. If a fails, then b is returned.

val fix : + ?sub1:('a t -> 'a t) list -> + ?sub2:('a t -> 'a t -> 'a t) list -> + ?subn:(int t * ('a list t -> 'a t)) list -> + base:'a t -> int t -> - 'a t

Recursion combinators, for building recursive values. The integer generator is used to provide fuel. The sub_ generators should use their arguments only once!

  • parameter sub1

    cases that recurse on one value.

  • parameter sub2

    cases that use the recursive gen twice.

  • parameter subn

    cases that use a list of recursive cases.

Applicative
val pure : 'a -> 'a t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
Run a generator
val run : ?st:state -> 'a t -> 'a

Using a random state (possibly the one in argument) run a generator.

\ No newline at end of file + 'a t

Recursion combinators, for building recursive values. The integer generator is used to provide fuel. The sub_ generators should use their arguments only once!

Applicative
val pure : 'a -> 'a t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val let+ : 'a t -> ('a -> 'b) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t
Run a generator
val run : ?st:state -> 'a t -> 'a

Using a random state (possibly the one in argument) run a generator.

diff --git a/dev/containers/CCRef/index.html b/dev/containers/CCRef/index.html index 2a19862e..f62bd15b 100644 --- a/dev/containers/CCRef/index.html +++ b/dev/containers/CCRef/index.html @@ -1,2 +1,2 @@ -CCRef (containers.CCRef)

Module CCRef

Helpers for references

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a ord = 'a -> 'a -> int
type 'a eq = 'a -> 'a -> bool
type 'a iter = ('a -> unit) -> unit
type 'a t = 'a ref
val map : ('a -> 'b) -> 'a t -> 'b t

Transform the value.

val create : 'a -> 'a t

Alias to ref.

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

Call the function on the content of the reference.

val update : ('a -> 'a) -> 'a t -> unit

Update the reference's content with the given function.

val incr_then_get : int t -> int

incr_then_get r increments r and returns its new value, think ++r.

  • since 0.17
val get_then_incr : int t -> int

get_then_incr r increments r and returns its old value, think r++.

  • since 0.17
val swap : 'a t -> 'a t -> unit

swap t1 t2 puts !t2 in t1 and !t1 in t2.

  • since 1.4
val protect : 'a t -> 'a -> (unit -> 'b) -> 'b

protect r x f sets r := x; calls f(); restores r to its old value; and returns the result of f().

  • since 3.10
val compare : 'a ord -> 'a t ord
val equal : 'a eq -> 'a t eq
val to_list : 'a t -> 'a list
val to_iter : 'a t -> 'a iter
  • since 3.0
val pp : 'a printer -> 'a t printer
\ No newline at end of file +CCRef (containers.CCRef)

Module CCRef

Helpers for references

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
type 'a ord = 'a -> 'a -> int
type 'a eq = 'a -> 'a -> bool
type 'a iter = ('a -> unit) -> unit
type 'a t = 'a ref
val map : ('a -> 'b) -> 'a t -> 'b t

Transform the value.

val create : 'a -> 'a t

Alias to ref.

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

Call the function on the content of the reference.

val update : ('a -> 'a) -> 'a t -> unit

Update the reference's content with the given function.

val incr_then_get : int t -> int

incr_then_get r increments r and returns its new value, think ++r.

  • since 0.17
val get_then_incr : int t -> int

get_then_incr r increments r and returns its old value, think r++.

  • since 0.17
val swap : 'a t -> 'a t -> unit

swap t1 t2 puts !t2 in t1 and !t1 in t2.

  • since 1.4
val protect : 'a t -> 'a -> (unit -> 'b) -> 'b

protect r x f sets r := x; calls f(); restores r to its old value; and returns the result of f().

  • since 3.10
val compare : 'a ord -> 'a t ord
val equal : 'a eq -> 'a t eq
val to_list : 'a t -> 'a list
val to_iter : 'a t -> 'a iter
  • since 3.0
val pp : 'a printer -> 'a t printer
diff --git a/dev/containers/CCResult/Infix/index.html b/dev/containers/CCResult/Infix/index.html index 9d07f2e6..d03ba02a 100644 --- a/dev/containers/CCResult/Infix/index.html +++ b/dev/containers/CCResult/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCResult.Infix)

Module CCResult.Infix

val (<$>) : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t

Infix version of map.

  • since 3.0
val (>|=) : ('a, 'err) t -> ('a -> 'b) -> ('b, 'err) t

Infix version of map with reversed arguments.

val (>>=) : ('a, 'err) t -> ('a -> ('b, 'err) t) -> ('b, 'err) t

Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.

val (<*>) : ('a -> 'b, 'err) t -> ('a, 'err) t -> ('b, 'err) t

a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.

val let+ : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
  • since 2.8
val and+ : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
val let* : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
  • since 2.8
val and* : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
\ No newline at end of file +Infix (containers.CCResult.Infix)

Module CCResult.Infix

val (<$>) : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t

Infix version of map.

  • since 3.0
val (>|=) : ('a, 'err) t -> ('a -> 'b) -> ('b, 'err) t

Infix version of map with reversed arguments.

val (>>=) : ('a, 'err) t -> ('a -> ('b, 'err) t) -> ('b, 'err) t

Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.

val (<*>) : ('a -> 'b, 'err) t -> ('a, 'err) t -> ('b, 'err) t

a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.

val let+ : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
  • since 2.8
val and+ : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
val let* : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
  • since 2.8
val and* : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
diff --git a/dev/containers/CCResult/Traverse/argument-1-M/index.html b/dev/containers/CCResult/Traverse/argument-1-M/index.html index 62fd3f37..b76c5cd1 100644 --- a/dev/containers/CCResult/Traverse/argument-1-M/index.html +++ b/dev/containers/CCResult/Traverse/argument-1-M/index.html @@ -1,2 +1,2 @@ -M (containers.CCResult.Traverse.M)

Parameter Traverse.M

type 'a t
val return : 'a -> 'a t

Monadic return.

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

Monadic bind.

\ No newline at end of file +M (containers.CCResult.Traverse.M)

Parameter Traverse.M

type 'a t
val return : 'a -> 'a t

Monadic return.

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

Monadic bind.

diff --git a/dev/containers/CCResult/Traverse/index.html b/dev/containers/CCResult/Traverse/index.html index d1b4a067..09ad3d1c 100644 --- a/dev/containers/CCResult/Traverse/index.html +++ b/dev/containers/CCResult/Traverse/index.html @@ -1,2 +1,2 @@ -Traverse (containers.CCResult.Traverse)

Module CCResult.Traverse

Parameters

module M : MONAD

Signature

val sequence_m : ('a M.t, 'err) t -> ('a, 'err) t M.t
val fold_m : ('b -> 'a -> 'b M.t) -> 'b -> ('a, 'err) t -> 'b M.t
val map_m : ('a -> 'b M.t) -> ('a, 'err) t -> ('b, 'err) t M.t
val retry_m : int -> (unit -> ('a, 'err) t M.t) -> ('a, 'err list) t M.t
\ No newline at end of file +Traverse (containers.CCResult.Traverse)

Module CCResult.Traverse

Parameters

module M : MONAD

Signature

val sequence_m : ('a M.t, 'err) t -> ('a, 'err) t M.t
val fold_m : ('b -> 'a -> 'b M.t) -> 'b -> ('a, 'err) t -> 'b M.t
val map_m : ('a -> 'b M.t) -> ('a, 'err) t -> ('b, 'err) t M.t
val retry_m : int -> (unit -> ('a, 'err) t M.t) -> ('a, 'err list) t M.t
diff --git a/dev/containers/CCResult/index.html b/dev/containers/CCResult/index.html index 28973946..236b3285 100644 --- a/dev/containers/CCResult/index.html +++ b/dev/containers/CCResult/index.html @@ -1,6 +1,6 @@ -CCResult (containers.CCResult)

Module CCResult

Error Monad

Uses the new "result" type from OCaml 4.03.

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

type nonrec (+'good, +'bad) result = ('good, 'bad) result =
  1. | Ok of 'good
  2. | Error of 'bad
type (+'good, +'bad) t = ('good, 'bad) result =
  1. | Ok of 'good
  2. | Error of 'bad
val return : 'a -> ('a, 'err) t

Successfully return a value.

val fail : 'err -> ('a, 'err) t

Fail with an error.

val of_exn : exn -> ('a, string) t

of_exn e uses Printexc to print the exception as a string.

val of_exn_trace : exn -> ('a, string) t

of_exn_trace e is similar to of_exn e, but it adds the stacktrace to the error message.

Remember to call Printexc.record_backtrace true and compile with the debug flag for this to work.

val fail_printf : ('a, Stdlib.Buffer.t, unit, ('b, string) t) format4 -> 'a

fail_printf format uses format to obtain an error message and then returns Error msg.

val fail_fprintf : +CCResult (containers.CCResult)

Module CCResult

Error Monad

Uses the new "result" type from OCaml 4.03.

  • since 0.16
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

type nonrec (+'good, +'bad) result = ('good, 'bad) result =
  1. | Ok of 'good
  2. | Error of 'bad
type (+'good, +'bad) t = ('good, 'bad) result =
  1. | Ok of 'good
  2. | Error of 'bad
val return : 'a -> ('a, 'err) t

Successfully return a value.

val fail : 'err -> ('a, 'err) t

Fail with an error.

val of_exn : exn -> ('a, string) t

of_exn e uses Printexc to print the exception as a string.

val of_exn_trace : exn -> ('a, string) t

of_exn_trace e is similar to of_exn e, but it adds the stacktrace to the error message.

Remember to call Printexc.record_backtrace true and compile with the debug flag for this to work.

val fail_printf : ('a, Stdlib.Buffer.t, unit, ('b, string) t) format4 -> 'a

fail_printf format uses format to obtain an error message and then returns Error msg.

val fail_fprintf : ('a, Stdlib.Format.formatter, unit, ('b, string) t) format4 -> 'a

fail_fprintf format uses format to obtain an error message and then returns Error msg.

val add_ctx : string -> ('a, string) t -> ('a, string) t

add_ctx msg leaves Ok x untouched, but transforms Error s into Error s' where s' contains the additional context given by msg.

  • since 1.2
val add_ctxf : ('a, Stdlib.Format.formatter, unit, ('b, string) t -> ('b, string) t) format4 -> - 'a

add_ctxf format_message is similar to add_ctx but with Format for printing the message (eagerly). Example:

add_ctxf "message(number %d, foo: %B)" 42 true (Error "error)"
  • since 1.2
val opt_map : ('a -> ('b, 'c) t) -> 'a option -> ('b option, 'c) t

Map a fallible operation through an option.

  • since 3.7
val map : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t

Map on success.

val map_err : ('err1 -> 'err2) -> ('a, 'err1) t -> ('a, 'err2) t

Map on the error variant.

val map2 : ('a -> 'b) -> ('err1 -> 'err2) -> ('a, 'err1) t -> ('b, 'err2) t

Like map, but also with a function that can transform the error message in case of failure.

val iter : ('a -> unit) -> ('a, _) t -> unit

Apply the function only in case of Ok.

val iter_err : ('err -> unit) -> (_, 'err) t -> unit

Apply the function in case of Error.

  • since 2.4
exception Get_error
val get_exn : ('a, _) t -> 'a

Extract the value x from Ok x, fails otherwise. You should be careful with this function, and favor other combinators whenever possible.

  • raises Get_error

    if the value is an error.

val get_or : ('a, _) t -> default:'a -> 'a

get_or e ~default returns x if e = Ok x, default otherwise.

val get_or_failwith : ('a, string) t -> 'a

get_or_failwith e returns x if e = Ok x, fails otherwise.

  • raises Failure

    with msg if e = Error msg.

  • since 2.4
val get_lazy : ('b -> 'a) -> ('a, 'b) t -> 'a

get_lazy default_fn x unwraps x, but if x = Error e it returns default_fr e instead.

  • since 3.0
val map_or : ('a -> 'b) -> ('a, 'c) t -> default:'b -> 'b

map_or f e ~default returns f x if e = Ok x, default otherwise.

val catch : ('a, 'err) t -> ok:('a -> 'b) -> err:('err -> 'b) -> 'b

catch e ~ok ~err calls either ok or err depending on the value of e.

val flat_map : ('a -> ('b, 'err) t) -> ('a, 'err) t -> ('b, 'err) t
val equal : err:'err equal -> 'a equal -> ('a, 'err) t equal
val compare : err:'err ord -> 'a ord -> ('a, 'err) t ord
val fold : ok:('a -> 'b) -> error:('err -> 'b) -> ('a, 'err) t -> 'b

fold ~ok ~error e opens e and, if e = Ok x, returns ok x, otherwise e = Error s and it returns error s.

val fold_ok : ('a -> 'b -> 'a) -> 'a -> ('b, _) t -> 'a

fold_ok f acc r will compute f acc x if r=Ok x, and return acc otherwise, as if the result were a mere option.

  • since 1.2
val is_ok : ('a, 'err) t -> bool

Return true if Ok.

  • since 1.0
val is_error : ('a, 'err) t -> bool

Return true if Error.

  • since 1.0

Wrappers

val guard : (unit -> 'a) -> ('a, exn) t

guard f runs f () and returns its result wrapped in Ok. If f () raises some exception e, then it fails with Error e.

val guard_str : (unit -> 'a) -> ('a, string) t

Like guard but uses of_exn to print the exception.

val guard_str_trace : (unit -> 'a) -> ('a, string) t

Like guard_str but uses of_exn_trace instead of of_exn so that the stack trace is printed.

val wrap1 : ('a -> 'b) -> 'a -> ('b, exn) t

Like guard but gives the function one argument.

val wrap2 : ('a -> 'b -> 'c) -> 'a -> 'b -> ('c, exn) t

Like guard but gives the function two arguments.

val wrap3 : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> ('d, exn) t

Like guard but gives the function three arguments.

Applicative

val pure : 'a -> ('a, 'err) t

Synonym of return.

val join : (('a, 'err) t, 'err) t -> ('a, 'err) t

join t, in case of success, returns Ok o from Ok (Ok o). Otherwise, it fails with Error e where e is the unwrapped error of t.

val both : ('a, 'err) t -> ('b, 'err) t -> ('a * 'b, 'err) t

both a b, in case of success, returns Ok (o, o') with the ok values of a and b. Otherwise, it fails, and the error of a is chosen over the error of b if both fail.

Infix

module Infix : sig ... end
include module type of Infix
val (<$>) : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t

Infix version of map.

  • since 3.0
val (>|=) : ('a, 'err) t -> ('a -> 'b) -> ('b, 'err) t

Infix version of map with reversed arguments.

val (>>=) : ('a, 'err) t -> ('a -> ('b, 'err) t) -> ('b, 'err) t

Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.

val (<*>) : ('a -> 'b, 'err) t -> ('a, 'err) t -> ('b, 'err) t

a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.

val let+ : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
  • since 2.8
val and+ : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
val let* : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
  • since 2.8
val and* : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8

Collections

val flatten_l : ('a, 'err) t list -> ('a list, 'err) t

Same as map_l id: returns Ok [x1;โ€ฆ;xn] if l=[Ok x1; โ€ฆ; Ok xn], or the first error otherwise.

  • since 2.7
val map_l : ('a -> ('b, 'err) t) -> 'a list -> ('b list, 'err) t

map_l f [a1; โ€ฆ; an] applies the function f to a1, โ€ฆ, an ,and, in case of success for every element, returns the list of Ok-value. Otherwise, it fails and returns the first error encountered. Tail-recursive.

val fold_l : ('b -> 'a -> ('b, 'err) t) -> 'b -> 'a list -> ('b, 'err) t
val fold_iter : ('b -> 'a -> ('b, 'err) t) -> 'b -> 'a iter -> ('b, 'err) t
  • since 3.0

Misc

val choose : ('a, 'err) t list -> ('a, 'err list) t

choose l selects a member of l that is a Ok _ value, or returns Error l otherwise, where l is the list of errors.

val retry : int -> (unit -> ('a, 'err) t) -> ('a, 'err list) t

retry n f calls f at most n times, returning the first result of f () that doesn't fail. If f fails n times, retry n f fails with the list of successive errors.

module type MONAD = sig ... end
module Traverse (M : MONAD) : sig ... end

Conversions

val to_opt : ('a, _) t -> 'a option

Convert a result to an option.

val of_opt : 'a option -> ('a, string) t

of_opt opt converts Some v to Ok v and None to Error "of_opt".

val to_iter : ('a, _) t -> 'a iter
  • since 2.8
val to_seq : ('a, _) t -> 'a Stdlib.Seq.t

Renamed from to_std_seq since 3.0.

  • since 3.0
type ('a, 'b) error = [
  1. | `Ok of 'a
  2. | `Error of 'b
]
val of_err : ('a, 'b) error -> ('a, 'b) t
  • since 0.17
val to_err : ('a, 'b) t -> ('a, 'b) error
  • since 0.17

IO

val pp : 'a printer -> ('a, string) t printer
val pp' : 'a printer -> 'e printer -> ('a, 'e) t printer

Printer that is generic on the error type.

\ No newline at end of file + 'a

add_ctxf format_message is similar to add_ctx but with Format for printing the message (eagerly). Example:

add_ctxf "message(number %d, foo: %B)" 42 true (Error "error)"
  • since 1.2
val opt_map : ('a -> ('b, 'c) t) -> 'a option -> ('b option, 'c) t

Map a fallible operation through an option.

  • since 3.7
val map : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t

Map on success.

val map_err : ('err1 -> 'err2) -> ('a, 'err1) t -> ('a, 'err2) t

Map on the error variant.

val map2 : ('a -> 'b) -> ('err1 -> 'err2) -> ('a, 'err1) t -> ('b, 'err2) t

Like map, but also with a function that can transform the error message in case of failure.

val iter : ('a -> unit) -> ('a, _) t -> unit

Apply the function only in case of Ok.

val iter_err : ('err -> unit) -> (_, 'err) t -> unit

Apply the function in case of Error.

  • since 2.4
exception Get_error
val get_exn : ('a, _) t -> 'a

Extract the value x from Ok x, fails otherwise. You should be careful with this function, and favor other combinators whenever possible.

val get_or : ('a, _) t -> default:'a -> 'a

get_or e ~default returns x if e = Ok x, default otherwise.

val get_or_failwith : ('a, string) t -> 'a

get_or_failwith e returns x if e = Ok x, fails otherwise.

  • raises Failure

    with msg if e = Error msg.

  • since 2.4
val get_lazy : ('b -> 'a) -> ('a, 'b) t -> 'a

get_lazy default_fn x unwraps x, but if x = Error e it returns default_fr e instead.

  • since 3.0
val map_or : ('a -> 'b) -> ('a, 'c) t -> default:'b -> 'b

map_or f e ~default returns f x if e = Ok x, default otherwise.

val catch : ('a, 'err) t -> ok:('a -> 'b) -> err:('err -> 'b) -> 'b

catch e ~ok ~err calls either ok or err depending on the value of e.

val flat_map : ('a -> ('b, 'err) t) -> ('a, 'err) t -> ('b, 'err) t
val equal : err:'err equal -> 'a equal -> ('a, 'err) t equal
val compare : err:'err ord -> 'a ord -> ('a, 'err) t ord
val fold : ok:('a -> 'b) -> error:('err -> 'b) -> ('a, 'err) t -> 'b

fold ~ok ~error e opens e and, if e = Ok x, returns ok x, otherwise e = Error s and it returns error s.

val fold_ok : ('a -> 'b -> 'a) -> 'a -> ('b, _) t -> 'a

fold_ok f acc r will compute f acc x if r=Ok x, and return acc otherwise, as if the result were a mere option.

  • since 1.2
val is_ok : ('a, 'err) t -> bool

Return true if Ok.

  • since 1.0
val is_error : ('a, 'err) t -> bool

Return true if Error.

  • since 1.0

Wrappers

val guard : (unit -> 'a) -> ('a, exn) t

guard f runs f () and returns its result wrapped in Ok. If f () raises some exception e, then it fails with Error e.

val guard_str : (unit -> 'a) -> ('a, string) t

Like guard but uses of_exn to print the exception.

val guard_str_trace : (unit -> 'a) -> ('a, string) t

Like guard_str but uses of_exn_trace instead of of_exn so that the stack trace is printed.

val wrap1 : ('a -> 'b) -> 'a -> ('b, exn) t

Like guard but gives the function one argument.

val wrap2 : ('a -> 'b -> 'c) -> 'a -> 'b -> ('c, exn) t

Like guard but gives the function two arguments.

val wrap3 : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> ('d, exn) t

Like guard but gives the function three arguments.

Applicative

val pure : 'a -> ('a, 'err) t

Synonym of return.

val join : (('a, 'err) t, 'err) t -> ('a, 'err) t

join t, in case of success, returns Ok o from Ok (Ok o). Otherwise, it fails with Error e where e is the unwrapped error of t.

val both : ('a, 'err) t -> ('b, 'err) t -> ('a * 'b, 'err) t

both a b, in case of success, returns Ok (o, o') with the ok values of a and b. Otherwise, it fails, and the error of a is chosen over the error of b if both fail.

Infix

module Infix : sig ... end
include module type of Infix
val (<$>) : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t

Infix version of map.

  • since 3.0
val (>|=) : ('a, 'err) t -> ('a -> 'b) -> ('b, 'err) t

Infix version of map with reversed arguments.

val (>>=) : ('a, 'err) t -> ('a -> ('b, 'err) t) -> ('b, 'err) t

Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.

val (<*>) : ('a -> 'b, 'err) t -> ('a, 'err) t -> ('b, 'err) t

a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.

val let+ : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
  • since 2.8
val and+ : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
val let* : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
  • since 2.8
val and* : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8

Collections

val flatten_l : ('a, 'err) t list -> ('a list, 'err) t

Same as map_l id: returns Ok [x1;โ€ฆ;xn] if l=[Ok x1; โ€ฆ; Ok xn], or the first error otherwise.

  • since 2.7
val map_l : ('a -> ('b, 'err) t) -> 'a list -> ('b list, 'err) t

map_l f [a1; โ€ฆ; an] applies the function f to a1, โ€ฆ, an ,and, in case of success for every element, returns the list of Ok-value. Otherwise, it fails and returns the first error encountered. Tail-recursive.

val fold_l : ('b -> 'a -> ('b, 'err) t) -> 'b -> 'a list -> ('b, 'err) t
val fold_iter : ('b -> 'a -> ('b, 'err) t) -> 'b -> 'a iter -> ('b, 'err) t
  • since 3.0

Misc

val choose : ('a, 'err) t list -> ('a, 'err list) t

choose l selects a member of l that is a Ok _ value, or returns Error l otherwise, where l is the list of errors.

val retry : int -> (unit -> ('a, 'err) t) -> ('a, 'err list) t

retry n f calls f at most n times, returning the first result of f () that doesn't fail. If f fails n times, retry n f fails with the list of successive errors.

module type MONAD = sig ... end
module Traverse (M : MONAD) : sig ... end

Conversions

val to_opt : ('a, _) t -> 'a option

Convert a result to an option.

val of_opt : 'a option -> ('a, string) t

of_opt opt converts Some v to Ok v and None to Error "of_opt".

val to_iter : ('a, _) t -> 'a iter
  • since 2.8
val to_seq : ('a, _) t -> 'a Stdlib.Seq.t

Renamed from to_std_seq since 3.0.

  • since 3.0
type ('a, 'b) error = [
  1. | `Ok of 'a
  2. | `Error of 'b
]
val of_err : ('a, 'b) error -> ('a, 'b) t
  • since 0.17
val to_err : ('a, 'b) t -> ('a, 'b) error
  • since 0.17

IO

val pp : 'a printer -> ('a, string) t printer
val pp' : 'a printer -> 'e printer -> ('a, 'e) t printer

Printer that is generic on the error type.

diff --git a/dev/containers/CCResult/module-type-MONAD/index.html b/dev/containers/CCResult/module-type-MONAD/index.html index 94ef0a86..fb6fdfff 100644 --- a/dev/containers/CCResult/module-type-MONAD/index.html +++ b/dev/containers/CCResult/module-type-MONAD/index.html @@ -1,2 +1,2 @@ -MONAD (containers.CCResult.MONAD)

Module type CCResult.MONAD

Monadic Operations

type 'a t
val return : 'a -> 'a t

Monadic return.

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

Monadic bind.

\ No newline at end of file +MONAD (containers.CCResult.MONAD)

Module type CCResult.MONAD

Monadic Operations

type 'a t
val return : 'a -> 'a t

Monadic return.

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

Monadic bind.

diff --git a/dev/containers/CCSeq/Infix/index.html b/dev/containers/CCSeq/Infix/index.html index badb3491..55cfb1de 100644 --- a/dev/containers/CCSeq/Infix/index.html +++ b/dev/containers/CCSeq/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCSeq.Infix)

Module CCSeq.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val (>>-) : 'a t -> ('a -> 'b t) -> 'b t
val (<.>) : ('a -> 'b) t -> 'a t -> 'b t
val (--) : int -> int -> int t
val (--^) : int -> int -> int t
\ No newline at end of file +Infix (containers.CCSeq.Infix)

Module CCSeq.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val (>>-) : 'a t -> ('a -> 'b t) -> 'b t
val (<.>) : ('a -> 'b) t -> 'a t -> 'b t
val (--) : int -> int -> int t
val (--^) : int -> int -> int t
diff --git a/dev/containers/CCSeq/Traverse/argument-1-M/index.html b/dev/containers/CCSeq/Traverse/argument-1-M/index.html index 6063a4e8..76f1c738 100644 --- a/dev/containers/CCSeq/Traverse/argument-1-M/index.html +++ b/dev/containers/CCSeq/Traverse/argument-1-M/index.html @@ -1,2 +1,2 @@ -M (containers.CCSeq.Traverse.M)

Parameter Traverse.M

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
\ No newline at end of file +M (containers.CCSeq.Traverse.M)

Parameter Traverse.M

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
diff --git a/dev/containers/CCSeq/Traverse/index.html b/dev/containers/CCSeq/Traverse/index.html index 76a5dfec..6f021cf1 100644 --- a/dev/containers/CCSeq/Traverse/index.html +++ b/dev/containers/CCSeq/Traverse/index.html @@ -1,2 +1,2 @@ -Traverse (containers.CCSeq.Traverse)

Module CCSeq.Traverse

Parameters

module M : MONAD

Signature

val sequence_m : 'a M.t t -> 'a t M.t
val fold_m : ('b -> 'a -> 'b M.t) -> 'b -> 'a t -> 'b M.t
val map_m : ('a -> 'b M.t) -> 'a t -> 'b t M.t
\ No newline at end of file +Traverse (containers.CCSeq.Traverse)

Module CCSeq.Traverse

Parameters

module M : MONAD

Signature

val sequence_m : 'a M.t t -> 'a t M.t
val fold_m : ('b -> 'a -> 'b M.t) -> 'b -> 'a t -> 'b M.t
val map_m : ('a -> 'b M.t) -> 'a t -> 'b t M.t
diff --git a/dev/containers/CCSeq/index.html b/dev/containers/CCSeq/index.html index 3b74fa66..129731bd 100644 --- a/dev/containers/CCSeq/index.html +++ b/dev/containers/CCSeq/index.html @@ -1,7 +1,7 @@ -CCSeq (containers.CCSeq)

Module CCSeq

Helpers for the standard Seq type

See oseq for a richer API.

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

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:

Similarly, among the functions that consume two sequences, one can distinguish two groups:

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.

Constructing sequences

The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

Transforming sequences

The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

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

Splitting a sequence into two sequences

val partition_map : ('a -> ('b, 'c) Stdlib.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
val nil : 'a t
val empty : 'a t
val cons : 'a -> 'a t -> 'a t
val singleton : 'a -> 'a t
val init : int -> (int -> 'a) -> 'a t

init n f corresponds to the sequence f 0; f 1; ...; f (n-1).

  • raises Invalid_argument

    if n is negative.

  • since 3.10
val repeat : ?n:int -> 'a -> 'a t

repeat ~n x repeats x n times then stops. If n is omitted, then x is repeated forever.

val forever : (unit -> 'a) -> 'a t

forever f corresponds to the infinite sequence containing all the f ().

  • since 3.10
val cycle : 'a t -> 'a t

Cycle through the iterator infinitely. The iterator shouldn't be empty.

val iterate : ('a -> 'a) -> 'a -> 'a t

iterate f a corresponds to the infinite sequence containing a, f a, f (f a), ...

  • since 3.10
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

unfold f acc calls f acc and:

  • if f acc = Some (x, acc'), yield x, continue with unfold f acc'.
  • if f acc = None, stops.
val is_empty : 'a t -> bool

is_empty xs checks in the sequence xs is empty

val head : 'a t -> 'a option

Head of the list.

val head_exn : 'a t -> 'a

Unsafe version of head.

  • raises Not_found

    if the list is empty.

val tail : 'a t -> 'a t option

Tail of the list.

val tail_exn : 'a t -> 'a t

Unsafe version of tail.

  • raises Not_found

    if the list is empty.

val uncons : 'a t -> ('a * 'a t) option

uncons xs return None if xs is empty other

  • since 3.10
val equal : 'a equal -> 'a t equal

Equality step by step. Eager.

val compare : 'a ord -> 'a t ord

Lexicographic comparison. Eager.

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

Fold on values.

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

Alias for fold

val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a

fold_lefti f init xs applies f acc i x where acc is the result of the previous computation or init for the first one, i is the index in the sequence (starts at 0) and x is the element of the sequence.

  • since 3.10
val fold_lefti : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a

Alias of foldi.

  • since 3.10
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate with index (starts at 0).

val length : _ t -> int

Number of elements in the list. Will not terminate if the list if infinite: use (for instance) take to make the list finite if necessary.

val take : int -> 'a t -> 'a t
val take_while : ('a -> bool) -> 'a t -> 'a t
val drop : int -> 'a t -> 'a t
val drop_while : ('a -> bool) -> 'a t -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

Map with index (starts at 0).

val fmap : ('a -> 'b option) -> 'a t -> 'b t
val filter : ('a -> bool) -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val product_with : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

Fair product of two (possibly infinite) lists into a new list. Lazy. The first parameter is used to combine each pair of elements.

val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

Alias of product_with.

  • since 3.10
val product : 'a t -> 'b t -> ('a * 'b) t

Specialization of product_with producing tuples.

val group : 'a equal -> 'a t -> 'a t t

group eq l groups together consecutive elements that satisfy eq. Lazy. For instance group (=) [1;1;1;2;2;3;3;1] yields [1;1;1]; [2;2]; [3;3]; [1].

val uniq : 'a equal -> 'a t -> 'a t

uniq eq l returns l but removes consecutive duplicates. Lazy. In other words, if several values that are equal follow one another, only the first of them is kept.

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

for_all p [a1; ...; an] checks if all elements of the sequence satisfy the predicate p. That is, it returns (p a1) && ... && (p an) for a non-empty list and true if the sequence is empty. It consumes the sequence until it finds an element not satisfying the predicate.

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

exists p [a1; ...; an] checks if at least one element of the sequence satisfies the predicate p. That is, it returns (p a1) || ... || (p an) for a non-empty sequence and false if the list is empty. It consumes the sequence until it finds an element satisfying the predicate.

  • since 3.3
val find : ('a -> bool) -> 'a t -> 'a option

find p [a1; ...; an] return Some ai for the first ai satisfying the predicate p and return None otherwise.

  • since 3.10
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find f [a1; ...; an] return Some (f ai) for the first ai such that f ai = Some _ and return None otherwise.

  • since 3.10
val scan : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a t

scan f init xs is the sequence containing the intermediate result of fold f init xs.

  • since 3.10
val flat_map : ('a -> 'b t) -> 'a t -> 'b t
val concat_map : ('a -> 'b t) -> 'a t -> 'b t

Alias of flat_map

  • since 3.10
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
val flatten : 'a t t -> 'a t
val concat : 'a t t -> 'a t

Alias of flatten.

  • since 3.10
val range : int -> int -> int t
val (--) : int -> int -> int t

a -- b is the range of integers containing a and b (therefore, never empty).

val (--^) : int -> int -> int t

a -- b is the integer range from a to b, where b is excluded.

Operations on two Collections

val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

Fold on two collections at once. Stop as soon as one of them ends.

val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

Alias for fold2.

  • since 3.10
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

Map on two collections at once. Stop as soon as one of the arguments is exhausted.

val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

Iterate on two collections at once. Stop as soon as one of them ends.

val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
val merge : 'a ord -> 'a t -> 'a t -> 'a t

Merge two sorted iterators into a sorted iterator.

val sorted_merge : 'a ord -> 'a t -> 'a t -> 'a t

Alias of merge.

  • since 3.10
val zip : 'a t -> 'b t -> ('a * 'b) t

Combine elements pairwise. Stop as soon as one of the lists stops.

val unzip : ('a * 'b) t -> 'a t * 'b t

Split each tuple in the list.

val split : ('a * 'b) t -> 'a t * 'b t

Alias of unzip.

  • since 3.10
val zip_i : 'a t -> (int * 'a) t

zip_i seq zips the index of each element with the element itself.

  • since 3.8

Misc

val sort : cmp:'a ord -> 'a t -> 'a t

Eager sort. Require the iterator to be finite. O(n ln(n)) time and space.

val sort_uniq : cmp:'a ord -> 'a t -> 'a t

Eager sort that removes duplicate values. Require the iterator to be finite. O(n ln(n)) time and space.

val memoize : 'a t -> 'a t

Avoid recomputations by caching intermediate results.

Fair Combinations

val interleave : 'a t -> 'a t -> 'a t

Fair interleaving of both streams.

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

Fair version of flat_map.

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

Fair version of (<*>).

Implementations

val return : 'a -> 'a t
val pure : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val (>>-) : 'a t -> ('a -> 'b t) -> 'b t

Infix version of fair_flat_map.

val (<.>) : ('a -> 'b) t -> 'a t -> 'b t

Infix version of fair_app.

Infix operators

module Infix : sig ... end
module type MONAD = sig ... end
module Traverse (M : MONAD) : sig ... end

Conversions

val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list

Gather all values into a list.

val of_array : 'a array -> 'a t

Iterate on the array.

val to_array : 'a t -> 'a array

Convert into array.

val to_rev_list : 'a t -> 'a list

Convert to a list, in reverse order. More efficient than to_list.

val to_iter : 'a t -> 'a iter
val to_gen : 'a t -> 'a gen
val of_gen : 'a gen -> 'a t

of_gen g consumes the generator and caches intermediate results.

val of_string : string -> char t

Iterate on characters.

  • since 3.7

IO

val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> +CCSeq (containers.CCSeq)

Module CCSeq

Helpers for the standard Seq type

See oseq for a richer API.

  • since 3.0
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit

Basics

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.

Constructing sequences

The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

Transforming sequences

The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

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

Splitting a sequence into two sequences

val partition_map : ('a -> ('b, 'c) Stdlib.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
val nil : 'a t
val empty : 'a t
val cons : 'a -> 'a t -> 'a t
val singleton : 'a -> 'a t
val init : int -> (int -> 'a) -> 'a t

init n f corresponds to the sequence f 0; f 1; ...; f (n-1).

  • raises Invalid_argument

    if n is negative.

  • since 3.10
val repeat : ?n:int -> 'a -> 'a t

repeat ~n x repeats x n times then stops. If n is omitted, then x is repeated forever.

val forever : (unit -> 'a) -> 'a t

forever f corresponds to the infinite sequence containing all the f ().

  • since 3.10
val cycle : 'a t -> 'a t

Cycle through the iterator infinitely. The iterator shouldn't be empty.

val iterate : ('a -> 'a) -> 'a -> 'a t

iterate f a corresponds to the infinite sequence containing a, f a, f (f a), ...

  • since 3.10
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

unfold f acc calls f acc and:

  • if f acc = Some (x, acc'), yield x, continue with unfold f acc'.
  • if f acc = None, stops.
val is_empty : 'a t -> bool

is_empty xs checks in the sequence xs is empty

val head : 'a t -> 'a option

Head of the list.

val head_exn : 'a t -> 'a

Unsafe version of head.

  • raises Not_found

    if the list is empty.

val tail : 'a t -> 'a t option

Tail of the list.

val tail_exn : 'a t -> 'a t

Unsafe version of tail.

  • raises Not_found

    if the list is empty.

val uncons : 'a t -> ('a * 'a t) option

uncons xs return None if xs is empty other

  • since 3.10
val equal : 'a equal -> 'a t equal

Equality step by step. Eager.

val compare : 'a ord -> 'a t ord

Lexicographic comparison. Eager.

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

Fold on values.

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

Alias for fold

val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a

fold_lefti f init xs applies f acc i x where acc is the result of the previous computation or init for the first one, i is the index in the sequence (starts at 0) and x is the element of the sequence.

  • since 3.10
val fold_lefti : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a

Alias of foldi.

  • since 3.10
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate with index (starts at 0).

val length : _ t -> int

Number of elements in the list. Will not terminate if the list if infinite: use (for instance) take to make the list finite if necessary.

val take : int -> 'a t -> 'a t
val take_while : ('a -> bool) -> 'a t -> 'a t
val drop : int -> 'a t -> 'a t
val drop_while : ('a -> bool) -> 'a t -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

Map with index (starts at 0).

val fmap : ('a -> 'b option) -> 'a t -> 'b t
val filter : ('a -> bool) -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val product_with : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

Fair product of two (possibly infinite) lists into a new list. Lazy. The first parameter is used to combine each pair of elements.

val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

Alias of product_with.

  • since 3.10
val product : 'a t -> 'b t -> ('a * 'b) t

Specialization of product_with producing tuples.

val group : 'a equal -> 'a t -> 'a t t

group eq l groups together consecutive elements that satisfy eq. Lazy. For instance group (=) [1;1;1;2;2;3;3;1] yields [1;1;1]; [2;2]; [3;3]; [1].

val uniq : 'a equal -> 'a t -> 'a t

uniq eq l returns l but removes consecutive duplicates. Lazy. In other words, if several values that are equal follow one another, only the first of them is kept.

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

for_all p [a1; ...; an] checks if all elements of the sequence satisfy the predicate p. That is, it returns (p a1) && ... && (p an) for a non-empty list and true if the sequence is empty. It consumes the sequence until it finds an element not satisfying the predicate.

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

exists p [a1; ...; an] checks if at least one element of the sequence satisfies the predicate p. That is, it returns (p a1) || ... || (p an) for a non-empty sequence and false if the list is empty. It consumes the sequence until it finds an element satisfying the predicate.

  • since 3.3
val find : ('a -> bool) -> 'a t -> 'a option

find p [a1; ...; an] return Some ai for the first ai satisfying the predicate p and return None otherwise.

  • since 3.10
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find f [a1; ...; an] return Some (f ai) for the first ai such that f ai = Some _ and return None otherwise.

  • since 3.10
val scan : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a t

scan f init xs is the sequence containing the intermediate result of fold f init xs.

  • since 3.10
val flat_map : ('a -> 'b t) -> 'a t -> 'b t
val concat_map : ('a -> 'b t) -> 'a t -> 'b t

Alias of flat_map

  • since 3.10
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
val flatten : 'a t t -> 'a t
val concat : 'a t t -> 'a t

Alias of flatten.

  • since 3.10
val range : int -> int -> int t
val (--) : int -> int -> int t

a -- b is the range of integers containing a and b (therefore, never empty).

val (--^) : int -> int -> int t

a -- b is the integer range from a to b, where b is excluded.

Operations on two Collections

val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

Fold on two collections at once. Stop as soon as one of them ends.

val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

Alias for fold2.

  • since 3.10
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

Map on two collections at once. Stop as soon as one of the arguments is exhausted.

val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

Iterate on two collections at once. Stop as soon as one of them ends.

val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
val merge : 'a ord -> 'a t -> 'a t -> 'a t

Merge two sorted iterators into a sorted iterator.

val sorted_merge : 'a ord -> 'a t -> 'a t -> 'a t

Alias of merge.

  • since 3.10
val zip : 'a t -> 'b t -> ('a * 'b) t

Combine elements pairwise. Stop as soon as one of the lists stops.

val unzip : ('a * 'b) t -> 'a t * 'b t

Split each tuple in the list.

val split : ('a * 'b) t -> 'a t * 'b t

Alias of unzip.

  • since 3.10
val zip_i : 'a t -> (int * 'a) t

zip_i seq zips the index of each element with the element itself.

  • since 3.8

Misc

val sort : cmp:'a ord -> 'a t -> 'a t

Eager sort. Require the iterator to be finite. O(n ln(n)) time and space.

val sort_uniq : cmp:'a ord -> 'a t -> 'a t

Eager sort that removes duplicate values. Require the iterator to be finite. O(n ln(n)) time and space.

val memoize : 'a t -> 'a t

Avoid recomputations by caching intermediate results.

Fair Combinations

val interleave : 'a t -> 'a t -> 'a t

Fair interleaving of both streams.

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

Fair version of flat_map.

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

Fair version of (<*>).

Implementations

val return : 'a -> 'a t
val pure : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val (>>-) : 'a t -> ('a -> 'b t) -> 'b t

Infix version of fair_flat_map.

val (<.>) : ('a -> 'b) t -> 'a t -> 'b t

Infix version of fair_app.

Infix operators

module Infix : sig ... end
module type MONAD = sig ... end
module Traverse (M : MONAD) : sig ... end

Conversions

val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list

Gather all values into a list.

val of_array : 'a array -> 'a t

Iterate on the array.

val to_array : 'a t -> 'a array

Convert into array.

val to_rev_list : 'a t -> 'a list

Convert to a list, in reverse order. More efficient than to_list.

val to_iter : 'a t -> 'a iter
val to_gen : 'a t -> 'a gen
val of_gen : 'a gen -> 'a t

of_gen g consumes the generator and caches intermediate results.

val of_string : string -> char t

Iterate on characters.

  • since 3.7

IO

val pp : + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> 'a printer -> - 'a t printer

pp ~pp_start ~pp_stop ~pp_sep pp_item ppf s formats the sequence s on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

\ No newline at end of file + 'a t printer

pp ~pp_start ~pp_stop ~pp_sep pp_item ppf s formats the sequence s on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

diff --git a/dev/containers/CCSeq/module-type-MONAD/index.html b/dev/containers/CCSeq/module-type-MONAD/index.html index d2fb873f..9a4f1d80 100644 --- a/dev/containers/CCSeq/module-type-MONAD/index.html +++ b/dev/containers/CCSeq/module-type-MONAD/index.html @@ -1,2 +1,2 @@ -MONAD (containers.CCSeq.MONAD)

Module type CCSeq.MONAD

Monadic Operations

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
\ No newline at end of file +MONAD (containers.CCSeq.MONAD)

Module type CCSeq.MONAD

Monadic Operations

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
diff --git a/dev/containers/CCSet/Make/argument-1-O/index.html b/dev/containers/CCSet/Make/argument-1-O/index.html index 427cf7ae..b9edcf86 100644 --- a/dev/containers/CCSet/Make/argument-1-O/index.html +++ b/dev/containers/CCSet/Make/argument-1-O/index.html @@ -1,2 +1,2 @@ -O (containers.CCSet.Make.O)

Parameter Make.O

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 +O (containers.CCSet.Make.O)

Parameter Make.O

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/dev/containers/CCSet/Make/index.html b/dev/containers/CCSet/Make/index.html index d244e946..3ed3e17d 100644 --- a/dev/containers/CCSet/Make/index.html +++ b/dev/containers/CCSet/Make/index.html @@ -1,14 +1,14 @@ -Make (containers.CCSet.Make)

Module CCSet.Make

Parameters

Signature

include Set.S with type t = Set.Make(O).t with type elt = O.t
type elt = O.t

The type of the set elements.

The type of sets.

val empty : t

The empty set.

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 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.0
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

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 map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f +Make (containers.CCSet.Make)

Module CCSet.Make

Parameters

Signature

include Set.S with type t = Set.Make(O).t with type elt = O.t
type elt = O.t

The type of the set elements.

The type of sets.

val empty : t

The empty set.

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 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.0
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

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 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.0
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

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.

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.0
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 cardinal : t -> int

Return the number of elements of a set.

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 Stdlib.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 max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

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 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.

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.0
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.0

Iterators

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 min_elt_opt : t -> elt option

Safe version of min_elt.

  • since 1.5
val max_elt_opt : t -> elt option

Safe version of max_elt.

  • since 1.5
val choose_opt : t -> elt option

Safe version of choose.

  • since 1.5
val find_opt : elt -> t -> elt option

Safe version of find.

  • since 1.5
val find_first : (elt -> bool) -> t -> elt

Find minimum element satisfying predicate.

  • since 1.5
val find_first_opt : (elt -> bool) -> t -> elt option

Safe version of find_first.

  • since 1.5
val find_first_map : (elt -> 'a option) -> t -> 'a option

find_first_map f s find the minimum element x of s such that f x = Some y and return Some y. Otherwise returns None.

  • since 3.12
val find_last : (elt -> bool) -> t -> elt

Find maximum element satisfying predicate.

  • since 1.5
val find_last_opt : (elt -> bool) -> t -> elt option

Safe version of find_last.

  • since 1.5
val find_last_map : (elt -> 'a option) -> t -> 'a option

find_last_map f s find the maximum element x of s such that f x = Some y and return Some y. Otherwise returns None.

  • since 3.12
val of_iter : elt iter -> t

Build a set from the given iter of elements.

  • since 2.8
val of_seq : elt Stdlib.Seq.t -> t

Build a set from the given seq of elements.

  • since 3.0
val add_iter : t -> elt iter -> t
  • since 2.8
val add_seq : elt Stdlib.Seq.t -> t -> t
  • since 3.0
val to_iter : t -> elt iter

to_iter t converts the set t to a iter of the elements.

  • since 2.8
val add_list : t -> elt list -> t
  • since 0.14
val to_list : t -> elt list

to_list t converts the set t to a list of the elements.

val to_string : - ?start:string -> - ?stop:string -> - ?sep:string -> + ?start:string -> + ?stop:string -> + ?sep:string -> (elt -> string) -> t -> string

Print the set in a string

  • since 2.7
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> elt printer -> - t printer

Print the set.

\ No newline at end of file + t printer

Print the set.

diff --git a/dev/containers/CCSet/index.html b/dev/containers/CCSet/index.html index e9621342..66492c84 100644 --- a/dev/containers/CCSet/index.html +++ b/dev/containers/CCSet/index.html @@ -1,4 +1,4 @@ -CCSet (containers.CCSet)

Module CCSet

Wrapper around Set

  • since 0.9
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type OrderedType = Stdlib.Set.OrderedType
module type S = sig ... end
module Make +CCSet (containers.CCSet)

Module CCSet

Wrapper around Set

  • since 0.9
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type OrderedType = Stdlib.Set.OrderedType
module type S = sig ... end
module Make (O : Stdlib.Set.OrderedType) : - S with type t = Stdlib.Set.Make(O).t and type elt = O.t
\ No newline at end of file + S with type t = Stdlib.Set.Make(O).t and type elt = O.t
diff --git a/dev/containers/CCSet/module-type-S/index.html b/dev/containers/CCSet/module-type-S/index.html index b89e5c42..65c69acb 100644 --- a/dev/containers/CCSet/module-type-S/index.html +++ b/dev/containers/CCSet/module-type-S/index.html @@ -1,14 +1,14 @@ -S (containers.CCSet.S)

Module type CCSet.S

include Stdlib.Set.S
type elt

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

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 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.0
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

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 map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f +S (containers.CCSet.S)

Module type CCSet.S

include Stdlib.Set.S
type elt

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

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 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.0
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

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 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.0
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

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.

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.0
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 cardinal : t -> int

Return the number of elements of a set.

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 Stdlib.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 max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

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 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.

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.0
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.0

Iterators

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 min_elt_opt : t -> elt option

Safe version of min_elt.

  • since 1.5
val max_elt_opt : t -> elt option

Safe version of max_elt.

  • since 1.5
val choose_opt : t -> elt option

Safe version of choose.

  • since 1.5
val find_opt : elt -> t -> elt option

Safe version of find.

  • since 1.5
val find_first : (elt -> bool) -> t -> elt

Find minimum element satisfying predicate.

  • since 1.5
val find_first_opt : (elt -> bool) -> t -> elt option

Safe version of find_first.

  • since 1.5
val find_first_map : (elt -> 'a option) -> t -> 'a option

find_first_map f s find the minimum element x of s such that f x = Some y and return Some y. Otherwise returns None.

  • since 3.12
val find_last : (elt -> bool) -> t -> elt

Find maximum element satisfying predicate.

  • since 1.5
val find_last_opt : (elt -> bool) -> t -> elt option

Safe version of find_last.

  • since 1.5
val find_last_map : (elt -> 'a option) -> t -> 'a option

find_last_map f s find the maximum element x of s such that f x = Some y and return Some y. Otherwise returns None.

  • since 3.12
val of_iter : elt iter -> t

Build a set from the given iter of elements.

  • since 2.8
val of_seq : elt Stdlib.Seq.t -> t

Build a set from the given seq of elements.

  • since 3.0
val add_iter : t -> elt iter -> t
  • since 2.8
val add_seq : elt Stdlib.Seq.t -> t -> t
  • since 3.0
val to_iter : t -> elt iter

to_iter t converts the set t to a iter of the elements.

  • since 2.8
val add_list : t -> elt list -> t
  • since 0.14
val to_list : t -> elt list

to_list t converts the set t to a list of the elements.

val to_string : - ?start:string -> - ?stop:string -> - ?sep:string -> + ?start:string -> + ?stop:string -> + ?sep:string -> (elt -> string) -> t -> string

Print the set in a string

  • since 2.7
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> elt printer -> - t printer

Print the set.

\ No newline at end of file + t printer

Print the set.

diff --git a/dev/containers/CCSexp/Decoder/index.html b/dev/containers/CCSexp/Decoder/index.html index a1a59f8a..fc9d1b13 100644 --- a/dev/containers/CCSexp/Decoder/index.html +++ b/dev/containers/CCSexp/Decoder/index.html @@ -1,2 +1,2 @@ -Decoder (containers.CCSexp.Decoder)

Module CCSexp.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

  • since 2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

  • since 3.3
\ No newline at end of file +Decoder (containers.CCSexp.Decoder)

Module CCSexp.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

  • since 2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

  • since 3.3
diff --git a/dev/containers/CCSexp/Make/Decoder/index.html b/dev/containers/CCSexp/Make/Decoder/index.html index 7432994c..742587bc 100644 --- a/dev/containers/CCSexp/Make/Decoder/index.html +++ b/dev/containers/CCSexp/Make/Decoder/index.html @@ -1,2 +1,2 @@ -Decoder (containers.CCSexp.Make.Decoder)

Module Make.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

  • since 2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

  • since 3.3
\ No newline at end of file +Decoder (containers.CCSexp.Make.Decoder)

Module Make.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

  • since 2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

  • since 3.3
diff --git a/dev/containers/CCSexp/Make/argument-1-Sexp/index.html b/dev/containers/CCSexp/Make/argument-1-Sexp/index.html index 07aca3ed..8bed57bd 100644 --- a/dev/containers/CCSexp/Make/argument-1-Sexp/index.html +++ b/dev/containers/CCSexp/Make/argument-1-Sexp/index.html @@ -1,2 +1,2 @@ -Sexp (containers.CCSexp.Make.Sexp)

Parameter Make.Sexp

include CCSexp_intf.BASIC_SEXP
type t
val atom : string -> t
val list : t list -> t
val match_ : t -> atom:(string -> 'a) -> list:(t list -> 'a) -> 'a
type loc
val make_loc : ((int * int) -> (int * int) -> string -> loc) option

If provided, builds a location from a pair of (line,column) positions, and a (possibly dummy) filename

val atom_with_loc : loc:loc -> string -> t
val list_with_loc : loc:loc -> t list -> t
\ No newline at end of file +Sexp (containers.CCSexp.Make.Sexp)

Parameter Make.Sexp

include CCSexp_intf.BASIC_SEXP
type t
val atom : string -> t
val list : t list -> t
val match_ : t -> atom:(string -> 'a) -> list:(t list -> 'a) -> 'a
type loc
val make_loc : ((int * int) -> (int * int) -> string -> loc) option

If provided, builds a location from a pair of (line,column) positions, and a (possibly dummy) filename

val atom_with_loc : loc:loc -> string -> t
val list_with_loc : loc:loc -> t list -> t
diff --git a/dev/containers/CCSexp/Make/index.html b/dev/containers/CCSexp/Make/index.html index 7d62197b..921668ef 100644 --- a/dev/containers/CCSexp/Make/index.html +++ b/dev/containers/CCSexp/Make/index.html @@ -1,2 +1,2 @@ -Make (containers.CCSexp.Make)

Module CCSexp.Make

Functorized operations

This builds a parser and printer for S-expressions represented as in the Sexp argument.

  • since 2.7
  • since 3.4 re-bind [loc] to [Sexp.loc]

Parameters

module Sexp : SEXP

Signature

include CCSexp_intf.S0 with type t = Sexp.t
type t = Sexp.t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

  • since 2.8
val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

type loc = Sexp.loc

Locations for the S-expressions.

  • since 3.3

Parsing

type 'a parse_result =
  1. | Yield of 'a
  2. | Fail of string
  3. | End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
\ No newline at end of file +Make (containers.CCSexp.Make)

Module CCSexp.Make

Functorized operations

This builds a parser and printer for S-expressions represented as in the Sexp argument.

  • since 2.7
  • since 3.4 re-bind [loc] to [Sexp.loc]

Parameters

module Sexp : SEXP

Signature

include CCSexp_intf.S0 with type t = Sexp.t
type t = Sexp.t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

  • since 2.8
val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

type loc = Sexp.loc

Locations for the S-expressions.

  • since 3.3

Parsing

type 'a parse_result =
  1. | Yield of 'a
  2. | Fail of string
  3. | End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
diff --git a/dev/containers/CCSexp/index.html b/dev/containers/CCSexp/index.html index 16b22123..7b0d1ae1 100644 --- a/dev/containers/CCSexp/index.html +++ b/dev/containers/CCSexp/index.html @@ -1,2 +1,2 @@ -CCSexp (containers.CCSexp)

Module CCSexp

Handling S-expressions

  • since 3.0 moved into containers-core, previously in [containers.sexp]
type 'a or_error = ('a, string) result
type 'a gen = unit -> 'a option
module type SEXP = CCSexp_intf.SEXP
module type S = CCSexp_intf.S
module Make (Sexp : SEXP) : S with type t = Sexp.t and type loc = Sexp.loc

Basics

type t = [
  1. | `Atom of string
  2. | `List of t list
]

A simple, structural representation of S-expressions.

include S with type t := t
include CCSexp_intf.S0 with type t := t
type sexp = t

Re-exports

val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

type loc

Locations for the S-expressions.

  • since 3.3

Parsing

type 'a parse_result =
  1. | Yield of 'a
  2. | Fail of string
  3. | End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
val equal : t -> t -> bool
  • since 3.0
val compare : t -> t -> int
  • since 3.0
val atom : string -> t

Build an atom directly from a string.

\ No newline at end of file +CCSexp (containers.CCSexp)

Module CCSexp

Handling S-expressions

  • since 3.0 moved into containers-core, previously in [containers.sexp]
type 'a or_error = ('a, string) result
type 'a gen = unit -> 'a option
module type SEXP = CCSexp_intf.SEXP
module type S = CCSexp_intf.S
module Make (Sexp : SEXP) : S with type t = Sexp.t and type loc = Sexp.loc

Basics

type t = [
  1. | `Atom of string
  2. | `List of t list
]

A simple, structural representation of S-expressions.

include S with type t := t
include CCSexp_intf.S0 with type t := t
type sexp = t

Re-exports

val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

type loc

Locations for the S-expressions.

  • since 3.3

Parsing

type 'a parse_result =
  1. | Yield of 'a
  2. | Fail of string
  3. | End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
val equal : t -> t -> bool
  • since 3.0
val compare : t -> t -> int
  • since 3.0
val atom : string -> t

Build an atom directly from a string.

diff --git a/dev/containers/CCSexp_intf/index.html b/dev/containers/CCSexp_intf/index.html index 84a43b6f..1a7e932d 100644 --- a/dev/containers/CCSexp_intf/index.html +++ b/dev/containers/CCSexp_intf/index.html @@ -1,2 +1,2 @@ -CCSexp_intf (containers.CCSexp_intf)

Module CCSexp_intf

type 'a or_error = ('a, string) result
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module type BASIC_SEXP = sig ... end
module type SEXP = sig ... end
module type S0 = sig ... end
module type S = sig ... end
\ No newline at end of file +CCSexp_intf (containers.CCSexp_intf)

Module CCSexp_intf

type 'a or_error = ('a, string) result
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module type BASIC_SEXP = sig ... end
module type SEXP = sig ... end
module type S0 = sig ... end
module type S = sig ... end
diff --git a/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html b/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html index 7b9b30da..ee1d8556 100644 --- a/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html +++ b/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html @@ -1,2 +1,2 @@ -BASIC_SEXP (containers.CCSexp_intf.BASIC_SEXP)

Module type CCSexp_intf.BASIC_SEXP

Abstract representation of S-expressions

  • since 3.3
type t
val atom : string -> t
val list : t list -> t
val match_ : t -> atom:(string -> 'a) -> list:(t list -> 'a) -> 'a
\ No newline at end of file +BASIC_SEXP (containers.CCSexp_intf.BASIC_SEXP)

Module type CCSexp_intf.BASIC_SEXP

Abstract representation of S-expressions

  • since 3.3
type t
val atom : string -> t
val list : t list -> t
val match_ : t -> atom:(string -> 'a) -> list:(t list -> 'a) -> 'a
diff --git a/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html b/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html index 4ab610bf..b029a18d 100644 --- a/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html +++ b/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html @@ -1,2 +1,2 @@ -Decoder (containers.CCSexp_intf.S.Decoder)

Module S.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list or_error

Read all the values from this decoder.

  • since 2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

  • since 3.3
\ No newline at end of file +Decoder (containers.CCSexp_intf.S.Decoder)

Module S.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list or_error

Read all the values from this decoder.

  • since 2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

  • since 3.3
diff --git a/dev/containers/CCSexp_intf/module-type-S/index.html b/dev/containers/CCSexp_intf/module-type-S/index.html index 23cf54c7..3727b8c5 100644 --- a/dev/containers/CCSexp_intf/module-type-S/index.html +++ b/dev/containers/CCSexp_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers.CCSexp_intf.S)

Module type CCSexp_intf.S

Operations over S-expressions (extended)

  • since 2.7
include S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

  • since 2.8
val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t or_error

Parse a string.

val parse_string_list : string -> t list or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : in_channel -> t or_error gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list or_error
val parse_file : string -> t or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list or_error

Open the file and read a S-exp from it.

type loc

Locations for the S-expressions.

  • since 3.3

Parsing

type 'a parse_result =
  1. | Yield of 'a
  2. | Fail of string
  3. | End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
\ No newline at end of file +S (containers.CCSexp_intf.S)

Module type CCSexp_intf.S

Operations over S-expressions (extended)

  • since 2.7
include S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

  • since 2.8
val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t or_error

Parse a string.

val parse_string_list : string -> t list or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : in_channel -> t or_error gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list or_error
val parse_file : string -> t or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list or_error

Open the file and read a S-exp from it.

type loc

Locations for the S-expressions.

  • since 3.3

Parsing

type 'a parse_result =
  1. | Yield of 'a
  2. | Fail of string
  3. | End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
diff --git a/dev/containers/CCSexp_intf/module-type-S0/index.html b/dev/containers/CCSexp_intf/module-type-S0/index.html index 5d5a2731..68ac3141 100644 --- a/dev/containers/CCSexp_intf/module-type-S0/index.html +++ b/dev/containers/CCSexp_intf/module-type-S0/index.html @@ -1,2 +1,2 @@ -S0 (containers.CCSexp_intf.S0)

Module type CCSexp_intf.S0

Operations over S-expressions

  • since 2.7
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

  • since 2.8
val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t or_error

Parse a string.

val parse_string_list : string -> t list or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : in_channel -> t or_error gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list or_error
val parse_file : string -> t or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list or_error

Open the file and read a S-exp from it.

\ No newline at end of file +S0 (containers.CCSexp_intf.S0)

Module type CCSexp_intf.S0

Operations over S-expressions

  • since 2.7
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

  • since 2.8
val list : t list -> t

Make a Sexpr of this list.

  • since 2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t iter -> unit

Print the given iter of expressions to a file.

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

Pretty-printer nice on human eyes (including indentation).

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

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t or_error

Parse a string.

val parse_string_list : string -> t list or_error

Parse a string into a list of S-exprs.

  • since 2.8
val parse_chan : in_channel -> t or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : in_channel -> t or_error gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : in_channel -> t list or_error
val parse_file : string -> t or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list or_error

Open the file and read a S-exp from it.

diff --git a/dev/containers/CCSexp_intf/module-type-SEXP/index.html b/dev/containers/CCSexp_intf/module-type-SEXP/index.html index c41b69d5..e0ae9082 100644 --- a/dev/containers/CCSexp_intf/module-type-SEXP/index.html +++ b/dev/containers/CCSexp_intf/module-type-SEXP/index.html @@ -1,2 +1,2 @@ -SEXP (containers.CCSexp_intf.SEXP)

Module type CCSexp_intf.SEXP

Abstract representation of S-expressions (extended)

  • since 2.7
include BASIC_SEXP
type t
val atom : string -> t
val list : t list -> t
val match_ : t -> atom:(string -> 'a) -> list:(t list -> 'a) -> 'a
type loc
val make_loc : ((int * int) -> (int * int) -> string -> loc) option

If provided, builds a location from a pair of (line,column) positions, and a (possibly dummy) filename

val atom_with_loc : loc:loc -> string -> t
val list_with_loc : loc:loc -> t list -> t
\ No newline at end of file +SEXP (containers.CCSexp_intf.SEXP)

Module type CCSexp_intf.SEXP

Abstract representation of S-expressions (extended)

  • since 2.7
include BASIC_SEXP
type t
val atom : string -> t
val list : t list -> t
val match_ : t -> atom:(string -> 'a) -> list:(t list -> 'a) -> 'a
type loc
val make_loc : ((int * int) -> (int * int) -> string -> loc) option

If provided, builds a location from a pair of (line,column) positions, and a (possibly dummy) filename

val atom_with_loc : loc:loc -> string -> t
val list_with_loc : loc:loc -> t list -> t
diff --git a/dev/containers/CCSexp_lex/index.html b/dev/containers/CCSexp_lex/index.html index 339ad57e..9dc3d6d3 100644 --- a/dev/containers/CCSexp_lex/index.html +++ b/dev/containers/CCSexp_lex/index.html @@ -1,2 +1,2 @@ -CCSexp_lex (containers.CCSexp_lex)

Module CCSexp_lex

type token =
  1. | ATOM of string
  2. | LIST_OPEN
  3. | LIST_CLOSE
  4. | SEXP_COMMENT
  5. | EOI
exception Error of int * int * string
val error : Stdlib.Lexing.lexbuf -> string -> 'a
type unescape_state =
  1. | Not_escaped
  2. | Escaped
  3. | Escaped_int_1 of int
  4. | Escaped_int_2 of int
val char_equal : char -> char -> bool
val remove_quotes : Stdlib.Lexing.lexbuf -> string -> string
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file +CCSexp_lex (containers.CCSexp_lex)

Module CCSexp_lex

type token =
  1. | ATOM of string
  2. | LIST_OPEN
  3. | LIST_CLOSE
  4. | SEXP_COMMENT
  5. | EOI
exception Error of int * int * string
val error : Stdlib.Lexing.lexbuf -> string -> 'a
type unescape_state =
  1. | Not_escaped
  2. | Escaped
  3. | Escaped_int_1 of int
  4. | Escaped_int_2 of int
val char_equal : char -> char -> bool
val remove_quotes : Stdlib.Lexing.lexbuf -> string -> string
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
diff --git a/dev/containers/CCString/Find/index.html b/dev/containers/CCString/Find/index.html index 9054d95f..526236df 100644 --- a/dev/containers/CCString/Find/index.html +++ b/dev/containers/CCString/Find/index.html @@ -1,2 +1,2 @@ -Find (containers.CCString.Find)

Module CCString.Find

type _ pattern
val compile : string -> [ `Direct ] pattern
val rcompile : string -> [ `Reverse ] pattern
val find : ?start:int -> pattern:[ `Direct ] pattern -> string -> int

find ~start ~pattern s searches for pattern in the string s, left-to-right.

  • returns

    the offset of the first match, -1 otherwise.

  • parameter start

    offset in string at which we start.

val rfind : ?start:int -> pattern:[ `Reverse ] pattern -> string -> int

rfind ~start ~pattern s searches for pattern in the string s, right-to-left.

  • returns

    the offset of the start of the first match from the right, -1 otherwise.

  • parameter start

    right-offset in string at which we start.

\ No newline at end of file +Find (containers.CCString.Find)

Module CCString.Find

type _ pattern
val compile : string -> [ `Direct ] pattern
val rcompile : string -> [ `Reverse ] pattern
val find : ?start:int -> pattern:[ `Direct ] pattern -> string -> int

find ~start ~pattern s searches for pattern in the string s, left-to-right.

  • returns

    the offset of the first match, -1 otherwise.

  • parameter start

    offset in string at which we start.

val rfind : ?start:int -> pattern:[ `Reverse ] pattern -> string -> int

rfind ~start ~pattern s searches for pattern in the string s, right-to-left.

  • returns

    the offset of the start of the first match from the right, -1 otherwise.

  • parameter start

    right-offset in string at which we start.

diff --git a/dev/containers/CCString/Infix/index.html b/dev/containers/CCString/Infix/index.html index 0e67e216..911e803e 100644 --- a/dev/containers/CCString/Infix/index.html +++ b/dev/containers/CCString/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCString.Infix)

Module CCString.Infix

val (=) : t -> t -> bool
  • since 3.0
val (<>) : t -> t -> bool
  • since 3.0
val (<) : t -> t -> bool
  • since 3.0
val (<=) : t -> t -> bool
  • since 3.0
val (>=) : t -> t -> bool
  • since 3.0
val (>) : t -> t -> bool
  • since 3.0
\ No newline at end of file +Infix (containers.CCString.Infix)

Module CCString.Infix

val (=) : t -> t -> bool
  • since 3.0
val (<>) : t -> t -> bool
  • since 3.0
val (<) : t -> t -> bool
  • since 3.0
val (<=) : t -> t -> bool
  • since 3.0
val (>=) : t -> t -> bool
  • since 3.0
val (>) : t -> t -> bool
  • since 3.0
diff --git a/dev/containers/CCString/Split/index.html b/dev/containers/CCString/Split/index.html index 1c4411ad..e53af1bc 100644 --- a/dev/containers/CCString/Split/index.html +++ b/dev/containers/CCString/Split/index.html @@ -1,18 +1,18 @@ -Split (containers.CCString.Split)

Module CCString.Split

type drop_if_empty = {
  1. first : bool;
  2. last : bool;
}

Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".

  • {first=false; last=false} will return ""; "a"; "b"; ""
  • {first=true; last=false} will return "a"; "b" ""
  • {first=false; last=true} will return ""; "a"; "b"
  • {first=true; last=true} will return "a"; "b"

The default value of all remaining functions is Drop_none.

  • since 1.5
val no_drop : drop_if_empty

no_drop does not drop any group, even empty and on borders.

  • since 1.5
val list_ : - ?drop:drop_if_empty -> - by:string -> +Split (containers.CCString.Split)

Module CCString.Split

type drop_if_empty = {
  1. first : bool;
  2. last : bool;
}

Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".

  • {first=false; last=false} will return ""; "a"; "b"; ""
  • {first=true; last=false} will return "a"; "b" ""
  • {first=false; last=true} will return ""; "a"; "b"
  • {first=true; last=true} will return "a"; "b"

The default value of all remaining functions is Drop_none.

  • since 1.5
val no_drop : drop_if_empty

no_drop does not drop any group, even empty and on borders.

  • since 1.5
val list_ : + ?drop:drop_if_empty -> + by:string -> string -> - (string * int * int) list

list_ ~drop ~by s splits the given string s along the given separator by. Should only be used with very small separators.

  • returns

    a list of slices (s,index,length) that are separated by by. String.sub can then be used to actually extract a string from the slice.

  • raises Failure

    if by = "".

val gen : - ?drop:drop_if_empty -> - by:string -> + (string * int * int) list

list_ ~drop ~by s splits the given string s along the given separator by. Should only be used with very small separators.

  • returns

    a list of slices (s,index,length) that are separated by by. String.sub can then be used to actually extract a string from the slice.

  • raises Failure

    if by = "".

val gen : + ?drop:drop_if_empty -> + by:string -> string -> (string * int * int) gen

gen ~drop ~by s splits the given string s along the given separator by. Returns a gen of slices.

val iter : - ?drop:drop_if_empty -> - by:string -> + ?drop:drop_if_empty -> + by:string -> string -> (string * int * int) iter

iter ~drop ~by s splits the given string s along the given separator by. Returns an iter of slices.

  • since 2.8
val seq : - ?drop:drop_if_empty -> - by:string -> + ?drop:drop_if_empty -> + by:string -> string -> - (string * int * int) Stdlib.Seq.t

seq ~drop ~by s splits the given string s along the given separator by. Returns a Seq.t of slices. Renamed from std_seq since 3.0.

  • since 3.0
Copying functions

Those split functions actually copy the substrings, which can be more convenient but less efficient in general.

val list_cpy : ?drop:drop_if_empty -> by:string -> string -> string list

list_cpy ~drop ~by s splits the given string s along the given separator by. Returns a list of strings.

val gen_cpy : ?drop:drop_if_empty -> by:string -> string -> string gen

gen_cpy ~drop ~by s splits the given string s along the given separator by. Returns a gen of strings.

val iter_cpy : ?drop:drop_if_empty -> by:string -> string -> string iter

iter_cpy ~drop ~by s splits the given string s along the given separator by. Returns an iter of strings.

  • since 2.8
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Stdlib.Seq.t

seq_cpy ~drop ~by s splits the given string s along the given separator by. Returns a Seq.t of strings. Renamed from std_seq_cpy since 3.0.

  • since 3.0
val left : by:string -> string -> (string * string) option

left ~by s splits on the first occurrence of by from the leftmost part of the string s.

  • since 0.12
val left_exn : by:string -> string -> string * string

left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.

  • raises Not_found

    if by is not part of the string s.

  • since 0.16
val right : by:string -> string -> (string * string) option

right ~by s splits on the first occurrence of by from the rightmost part of the string s.

  • since 0.12
val right_exn : by:string -> string -> string * string

right_exn ~by s splits on the first occurrence of by from the rightmost part of the string s.

  • raises Not_found

    if by is not part of the string s.

  • since 0.16
\ No newline at end of file + (string * int * int) Stdlib.Seq.t

seq ~drop ~by s splits the given string s along the given separator by. Returns a Seq.t of slices. Renamed from std_seq since 3.0.

  • since 3.0
Copying functions

Those split functions actually copy the substrings, which can be more convenient but less efficient in general.

val list_cpy : ?drop:drop_if_empty -> by:string -> string -> string list

list_cpy ~drop ~by s splits the given string s along the given separator by. Returns a list of strings.

val gen_cpy : ?drop:drop_if_empty -> by:string -> string -> string gen

gen_cpy ~drop ~by s splits the given string s along the given separator by. Returns a gen of strings.

val iter_cpy : ?drop:drop_if_empty -> by:string -> string -> string iter

iter_cpy ~drop ~by s splits the given string s along the given separator by. Returns an iter of strings.

  • since 2.8
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Stdlib.Seq.t

seq_cpy ~drop ~by s splits the given string s along the given separator by. Returns a Seq.t of strings. Renamed from std_seq_cpy since 3.0.

  • since 3.0
val left : by:string -> string -> (string * string) option

left ~by s splits on the first occurrence of by from the leftmost part of the string s.

  • since 0.12
val left_exn : by:string -> string -> string * string

left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.

  • raises Not_found

    if by is not part of the string s.

  • since 0.16
val right : by:string -> string -> (string * string) option

right ~by s splits on the first occurrence of by from the rightmost part of the string s.

  • since 0.12
val right_exn : by:string -> string -> string * string

right_exn ~by s splits on the first occurrence of by from the rightmost part of the string s.

  • raises Not_found

    if by is not part of the string s.

  • since 0.16
diff --git a/dev/containers/CCString/index.html b/dev/containers/CCString/index.html index 620d9d49..92024114 100644 --- a/dev/containers/CCString/index.html +++ b/dev/containers/CCString/index.html @@ -1,7 +1,7 @@ -CCString (containers.CCString)

Module CCString

Basic String Utils

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option

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.0
val empty : string

The empty string.

  • since 4.13.0
val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13.0
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13.0
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.

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.0

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.0 (4.05.0 in StringLabels)
val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13.0
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13.0
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.

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.0
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.0
val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a

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.0
val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a

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.0
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.0
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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 in StringLabels)

Traversing

val iteri : (int -> char -> unit) -> string -> unit

iteri is like iter, but the function is also given the corresponding character index.

  • since 4.00.0

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_seqi : t -> (int * char) Stdlib.Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • 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.

Deprecated functions

val create : int -> bytes

create n returns a fresh 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.

  • deprecated

    This is a deprecated alias of Bytes.create/BytesLabels.create.

val copy : string -> string

Return a copy of the given string.

  • deprecated

    Because strings are immutable, it doesn't make much sense to make identical copies of them.

val fill : bytes -> int -> int -> char -> unit

fill s pos len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

  • raises Invalid_argument

    if pos and len do not designate a valid substring of s.

  • deprecated

    This is a deprecated alias of Bytes.fill/BytesLabels.fill.

val uppercase : string -> string

Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val lowercase : string -> string

Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val capitalize : string -> string

Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val uncapitalize : string -> string

Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.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.0
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.0
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.0
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.0
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.0
val length : t -> int

length s returns the length (number of characters) of the given string s.

val blit : t -> int -> Stdlib.Bytes.t -> int -> int -> unit

blit src src_pos dst dst_pos len copies len characters from string src starting at character indice src_pos, to the Bytes sequence dst starting at character indice dst_pos. Like String.blit. Compatible with the -safe-string option.

  • raises Invalid_argument

    if indices are not valid.

val fold : ('a -> char -> 'a) -> 'a -> t -> 'a

fold f init s folds on chars by increasing index. Computes f(โ€ฆ (f (f init s.[0]) s.[1]) โ€ฆ) s.[n-1].

  • since 0.7
val foldi : ('a -> int -> char -> 'a) -> 'a -> t -> 'a

foldi f init s is just like fold, but it also passes in the index of each chars as second argument to the folded function f.

  • since 3.3

Conversions

val to_gen : t -> char gen

to_gen s returns the gen of characters contained in the string s.

val to_iter : t -> char iter

to_iter s returns the iter of characters contained in the string s.

  • since 2.8
val to_seq : t -> char Stdlib.Seq.t

to_seq s returns the Seq.t of characters contained in the string s. Renamed from to std_seq since 3.0.

  • since 3.0
val to_list : t -> char list

to_list s returns the list of characters contained in the string s.

val pp_buf : Stdlib.Buffer.t -> t -> unit

pp_buf buf s prints s to the buffer buf. Renamed from pp since 2.0.

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

pp f s prints the string s within quotes to the formatter f. Renamed from print since 2.0.

val compare : string -> string -> int

compare s1 s2 compares the strings s1 and s2 and returns an integer that indicates their relative position in the sort order.

val is_empty : string -> bool

is_empty s returns true iff s is empty (i.e. its length is 0).

  • since 1.5
val hash : string -> int

hash s returns the hash value of s.

val rev : string -> string

rev s returns the reverse of s.

  • since 0.17
val pad : ?side:[ `Left | `Right ] -> ?c:char -> int -> string -> string

pad ~side ~c n s ensures that the string s is at least n bytes long, and pads it on the side with c if it's not the case.

  • parameter side

    determines where padding occurs (default: `Left).

  • parameter c

    the char used to pad (default: ' ').

  • since 0.17
val of_char : char -> string

of_char 'a' is "a".

  • since 0.19
val of_gen : char gen -> string

of_gen gen converts a gen of characters to a string.

val of_iter : char iter -> string

of_iter iter converts an iter of characters to a string.

  • since 2.8
val of_seq : char Stdlib.Seq.t -> string

of_seq seq converts a seq of characters to a string. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_list : char list -> string

of_list lc converts a list of characters lc to a string.

val of_array : char array -> string

of_array ac converts an array of characters ac to a string.

val to_array : string -> char array

to_array s returns the array of characters contained in the string s.

val find : ?start:int -> sub:string -> string -> int

find ~start ~sub s returns the starting index of the first occurrence of sub within s or -1.

  • parameter start

    starting position in s.

val find_all : ?start:int -> sub:string -> string -> int gen

find_all ~start ~sub s finds all occurrences of sub in s, even overlapping instances and returns them in a generator gen.

  • parameter start

    starting position in s.

  • since 0.17
val find_all_l : ?start:int -> sub:string -> string -> int list

find_all_l ~sub s finds all occurrences of sub in s and returns them in a list.

  • parameter start

    starting position in s.

  • since 0.17
val mem : ?start:int -> sub:string -> string -> bool

mem ~start ~sub s is true iff sub is a substring of s.

  • since 0.12
val rfind : sub:string -> string -> int

rfind ~sub s finds sub in string s from the right, returns its first index or -1. Should only be used with very small sub.

  • since 0.12
val replace : - ?which:[ `Left | `Right | `All ] -> - sub:string -> - by:string -> +CCString (containers.CCString)

Module CCString

Basic String Utils

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option

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.0
val empty : string

The empty string.

  • since 4.13.0
val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13.0
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13.0
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.

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.0

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.0 (4.05.0 in StringLabels)
val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13.0
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13.0
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.

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.0
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.0
val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a

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.0
val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a

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.0
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.0
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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 in StringLabels)

Traversing

val iteri : (int -> char -> unit) -> string -> unit

iteri is like iter, but the function is also given the corresponding character index.

  • since 4.00.0

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_seqi : t -> (int * char) Stdlib.Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • 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.

Deprecated functions

val create : int -> bytes

create n returns a fresh 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.

  • deprecated

    This is a deprecated alias of Bytes.create/BytesLabels.create.

val copy : string -> string

Return a copy of the given string.

  • deprecated

    Because strings are immutable, it doesn't make much sense to make identical copies of them.

val fill : bytes -> int -> int -> char -> unit

fill s pos len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

  • raises Invalid_argument

    if pos and len do not designate a valid substring of s.

  • deprecated

    This is a deprecated alias of Bytes.fill/BytesLabels.fill.

val uppercase : string -> string

Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val lowercase : string -> string

Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val capitalize : string -> string

Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val uncapitalize : string -> string

Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.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.0
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.0
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.0
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.0
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.0
val length : t -> int

length s returns the length (number of characters) of the given string s.

val blit : t -> int -> Stdlib.Bytes.t -> int -> int -> unit

blit src src_pos dst dst_pos len copies len characters from string src starting at character indice src_pos, to the Bytes sequence dst starting at character indice dst_pos. Like String.blit. Compatible with the -safe-string option.

  • raises Invalid_argument

    if indices are not valid.

val fold : ('a -> char -> 'a) -> 'a -> t -> 'a

fold f init s folds on chars by increasing index. Computes f(โ€ฆ (f (f init s.[0]) s.[1]) โ€ฆ) s.[n-1].

  • since 0.7
val foldi : ('a -> int -> char -> 'a) -> 'a -> t -> 'a

foldi f init s is just like fold, but it also passes in the index of each chars as second argument to the folded function f.

  • since 3.3

Conversions

val to_gen : t -> char gen

to_gen s returns the gen of characters contained in the string s.

val to_iter : t -> char iter

to_iter s returns the iter of characters contained in the string s.

  • since 2.8
val to_seq : t -> char Stdlib.Seq.t

to_seq s returns the Seq.t of characters contained in the string s. Renamed from to std_seq since 3.0.

  • since 3.0
val to_list : t -> char list

to_list s returns the list of characters contained in the string s.

val pp_buf : Stdlib.Buffer.t -> t -> unit

pp_buf buf s prints s to the buffer buf. Renamed from pp since 2.0.

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

pp f s prints the string s within quotes to the formatter f. Renamed from print since 2.0.

val compare : string -> string -> int

compare s1 s2 compares the strings s1 and s2 and returns an integer that indicates their relative position in the sort order.

val is_empty : string -> bool

is_empty s returns true iff s is empty (i.e. its length is 0).

  • since 1.5
val hash : string -> int

hash s returns the hash value of s.

val rev : string -> string

rev s returns the reverse of s.

  • since 0.17
val pad : ?side:[ `Left | `Right ] -> ?c:char -> int -> string -> string

pad ~side ~c n s ensures that the string s is at least n bytes long, and pads it on the side with c if it's not the case.

  • parameter side

    determines where padding occurs (default: `Left).

  • parameter c

    the char used to pad (default: ' ').

  • since 0.17
val of_char : char -> string

of_char 'a' is "a".

  • since 0.19
val of_gen : char gen -> string

of_gen gen converts a gen of characters to a string.

val of_iter : char iter -> string

of_iter iter converts an iter of characters to a string.

  • since 2.8
val of_seq : char Stdlib.Seq.t -> string

of_seq seq converts a seq of characters to a string. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_list : char list -> string

of_list lc converts a list of characters lc to a string.

val of_array : char array -> string

of_array ac converts an array of characters ac to a string.

val to_array : string -> char array

to_array s returns the array of characters contained in the string s.

val find : ?start:int -> sub:string -> string -> int

find ~start ~sub s returns the starting index of the first occurrence of sub within s or -1.

  • parameter start

    starting position in s.

val find_all : ?start:int -> sub:string -> string -> int gen

find_all ~start ~sub s finds all occurrences of sub in s, even overlapping instances and returns them in a generator gen.

  • parameter start

    starting position in s.

  • since 0.17
val find_all_l : ?start:int -> sub:string -> string -> int list

find_all_l ~sub s finds all occurrences of sub in s and returns them in a list.

  • parameter start

    starting position in s.

  • since 0.17
val mem : ?start:int -> sub:string -> string -> bool

mem ~start ~sub s is true iff sub is a substring of s.

  • since 0.12
val rfind : sub:string -> string -> int

rfind ~sub s finds sub in string s from the right, returns its first index or -1. Should only be used with very small sub.

  • since 0.12
val replace : + ?which:[ `Left | `Right | `All ] -> + sub:string -> + by:string -> string -> - string

replace ~which ~sub ~by s replaces some occurrences of sub by by in s.

  • parameter which

    decides whether the occurrences to replace are:

    • `Left first occurrence from the left (beginning).
    • `Right first occurrence from the right (end).
    • `All all occurrences (default).
  • raises Invalid_argument

    if sub = "".

  • since 0.14
val is_sub : sub:string -> int -> string -> int -> sub_len:int -> bool

is_sub ~sub ~sub_pos s ~pos ~sub_len returns true iff the substring of sub starting at position sub_pos and of length sub_len is a substring of s starting at position pos.

val repeat : string -> int -> string

repeat s n creates a string by repeating the string s n times.

val prefix : pre:string -> string -> bool

prefix ~pre s returns true iff pre is a prefix of s.

val suffix : suf:string -> string -> bool

suffix ~suf s returns true iff suf is a suffix of s.

  • since 0.7
val chop_prefix : pre:string -> string -> string option

chop_prefix ~pre s removes pre from s if pre really is a prefix of s, returns None otherwise.

  • since 0.17
val chop_suffix : suf:string -> string -> string option

chop_suffix ~suf s removes suf from s if suf really is a suffix of s, returns None otherwise.

  • since 0.17
val take : int -> string -> string

take n s keeps only the n first chars of s.

  • since 0.17
val drop : int -> string -> string

drop n s removes the n first chars of s.

  • since 0.17
val take_drop : int -> string -> string * string

take_drop n s is take n s, drop n s.

  • since 0.17
val lines : string -> string list

lines s returns a list of the lines of s (splits along '\n').

  • since 0.10
val lines_gen : string -> string gen

lines_gen s returns the gen of the lines of s (splits along '\n').

  • since 0.10
val lines_iter : string -> string iter

lines_iter s returns the iter of the lines of s (splits along '\n').

  • since 3.2
val lines_seq : string -> string Stdlib.Seq.t

lines_seq s returns the Seq.t of the lines of s (splits along '\n').

  • since 3.2
val concat_gen : sep:string -> string gen -> string

concat_gen ~sep gen concatenates all strings of gen, separated with sep.

  • since 0.10
val concat_seq : sep:string -> string Stdlib.Seq.t -> string

concat_seq ~sep seq concatenates all strings of seq, separated with sep.

  • since 3.2
val concat_iter : sep:string -> string iter -> string

concat_iter ~sep iter concatenates all strings of iter, separated with sep.

  • since 3.2
val unlines : string list -> string

unlines ls concatenates all strings of ls, separated with '\n'.

  • since 0.10
val unlines_gen : string gen -> string

unlines_gen gen concatenates all strings of gen, separated with '\n'.

  • since 0.10
val unlines_iter : string iter -> string

unlines_iter iter concatenates all strings of iter, separated with '\n'.

  • since 3.2
val unlines_seq : string Stdlib.Seq.t -> string

unlines_seq seq concatenates all strings of seq, separated with '\n'.

  • since 3.2
val set : string -> int -> char -> string

set s i c creates a new string which is a copy of s, except for index i, which becomes c.

  • raises Invalid_argument

    if i is an invalid index.

  • since 0.12
val iter : (char -> unit) -> string -> unit

iter f s applies function f on each character of s. Alias to String.iter.

  • since 0.12
val filter_map : (char -> char option) -> string -> string

filter_map f s calls (f a0) (f a1) โ€ฆ (f an) where a0 โ€ฆ an are the characters of s. It returns the string of characters ci such as f ai = Some ci (when f returns None, the corresponding element of s is discarded).

  • since 0.17
val filter : (char -> bool) -> string -> string

filter f s discards characters of s not satisfying f.

  • since 0.17
val uniq : (char -> char -> bool) -> string -> string

uniq eq s remove consecutive duplicate characters in s.

  • since 3.4
val flat_map : ?sep:string -> (char -> string) -> string -> string

flat_map ~sep f s maps each chars of s to a string, then concatenates them all.

  • parameter sep

    optional separator between each generated string.

  • since 0.12
val for_all : (char -> bool) -> string -> bool

for_all f s is true iff all characters of s satisfy the predicate f.

  • since 0.12
val exists : (char -> bool) -> string -> bool

exists f s is true iff some character of s satisfy the predicate f.

  • since 0.12
val drop_while : (char -> bool) -> t -> t

drop_while f s discards any characters of s starting from the left, up to the first character c not satisfying f c.

  • since 2.2
val rdrop_while : (char -> bool) -> t -> t

rdrop_while f s discards any characters of s starting from the right, up to the first character c not satisfying f c.

  • since 2.2
val ltrim : t -> t

ltrim s trims space on the left (see String.trim for more details).

  • since 1.2
val rtrim : t -> t

rtrim s trims space on the right (see String.trim for more details).

  • since 1.2

Operations on 2 strings

val map2 : (char -> char -> char) -> string -> string -> string

map2 f s1 s2 maps pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val iter2 : (char -> char -> unit) -> string -> string -> unit

iter2 f s1 s2 iterates on pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val iteri2 : (int -> char -> char -> unit) -> string -> string -> unit

iteri2 f s1 s2 iterates on pairs of chars with their index.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val fold2 : ('a -> char -> char -> 'a) -> 'a -> string -> string -> 'a

fold2 f init s1 s2 folds on pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val for_all2 : (char -> char -> bool) -> string -> string -> bool

for_all2 f s1 s2 returns true iff all pairs of chars satisfy the predicate f.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val exists2 : (char -> char -> bool) -> string -> string -> bool

exists2 f s1 s2 returns true iff a pair of chars satisfy the predicate f.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12

Ascii functions

Those functions are deprecated in String since 4.03, so we provide a stable alias for them even in older versions.

val equal_caseless : string -> string -> bool

equal_caseless s1 s2 compares s1 and s2 without respect to ascii lowercase.

  • since 1.2
val to_hex : string -> string

Convert a string with arbitrary content into a hexadecimal string.

  • since 3.8
val of_hex : string -> string option

Convert a string in hex into a string with arbitrary content.

  • since 3.8
val of_hex_exn : string -> string

Same as of_hex but fails harder.

  • raises Invalid_argument

    if the input is not valid hex.

  • since 3.8

Finding

A relatively efficient algorithm for finding sub-strings.

  • since 1.0
module Find : sig ... end

Splitting

module Split : sig ... end
val split_on_char : char -> string -> string list

split_on_char by s splits the string s along the given char by.

  • since 1.2
val split : by:string -> string -> string list

split ~by s splits the string s along the given string by. Alias to Split.list_cpy.

  • since 1.2

Utils

val compare_versions : string -> string -> int

compare_versions s1 s2 compares version strings s1 and s2, considering that numbers are above text.

  • since 0.13
val compare_natural : string -> string -> int

compare_natural s1 s2 is the Natural Sort Order, comparing chunks of digits as natural numbers. https://en.wikipedia.org/wiki/Natural_sort_order

  • since 1.3
val edit_distance : ?cutoff:int -> string -> string -> int

edit_distance ~cutoff s1 s2 is the edition distance between the two strings s1 and s2. This satisfies the classical distance axioms: it is always positive, symmetric, and satisfies the formula distance s1 s2 + distance s2 s3 >= distance s1 s3.

  • parameter cutoff

    if provided, it's a cap on the number of iterations. (since 3.0). This is useful if you just want to check whether the edit distance is less or equal than 2 without (use edit_distance s1 s2 ~cutoff:3 <= 2). note that contrary to what was previously documented here, the result can still be higher than cutoff if it's reached in <cutoff iterations. However if the result is < cutoff then it is accurate.

Infix operators

  • since 3.0
module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 3.0
val (<>) : t -> t -> bool
  • since 3.0
val (<) : t -> t -> bool
  • since 3.0
val (<=) : t -> t -> bool
  • since 3.0
val (>=) : t -> t -> bool
  • since 3.0
val (>) : t -> t -> bool
  • since 3.0
\ No newline at end of file + string

replace ~which ~sub ~by s replaces some occurrences of sub by by in s.

  • parameter which

    decides whether the occurrences to replace are:

    • `Left first occurrence from the left (beginning).
    • `Right first occurrence from the right (end).
    • `All all occurrences (default).
  • raises Invalid_argument

    if sub = "".

  • since 0.14
val is_sub : sub:string -> int -> string -> int -> sub_len:int -> bool

is_sub ~sub ~sub_pos s ~pos ~sub_len returns true iff the substring of sub starting at position sub_pos and of length sub_len is a substring of s starting at position pos.

val repeat : string -> int -> string

repeat s n creates a string by repeating the string s n times.

val prefix : pre:string -> string -> bool

prefix ~pre s returns true iff pre is a prefix of s.

val suffix : suf:string -> string -> bool

suffix ~suf s returns true iff suf is a suffix of s.

  • since 0.7
val chop_prefix : pre:string -> string -> string option

chop_prefix ~pre s removes pre from s if pre really is a prefix of s, returns None otherwise.

  • since 0.17
val chop_suffix : suf:string -> string -> string option

chop_suffix ~suf s removes suf from s if suf really is a suffix of s, returns None otherwise.

  • since 0.17
val take : int -> string -> string

take n s keeps only the n first chars of s.

  • since 0.17
val drop : int -> string -> string

drop n s removes the n first chars of s.

  • since 0.17
val take_drop : int -> string -> string * string

take_drop n s is take n s, drop n s.

  • since 0.17
val lines : string -> string list

lines s returns a list of the lines of s (splits along '\n').

  • since 0.10
val lines_gen : string -> string gen

lines_gen s returns the gen of the lines of s (splits along '\n').

  • since 0.10
val lines_iter : string -> string iter

lines_iter s returns the iter of the lines of s (splits along '\n').

  • since 3.2
val lines_seq : string -> string Stdlib.Seq.t

lines_seq s returns the Seq.t of the lines of s (splits along '\n').

  • since 3.2
val concat_gen : sep:string -> string gen -> string

concat_gen ~sep gen concatenates all strings of gen, separated with sep.

  • since 0.10
val concat_seq : sep:string -> string Stdlib.Seq.t -> string

concat_seq ~sep seq concatenates all strings of seq, separated with sep.

  • since 3.2
val concat_iter : sep:string -> string iter -> string

concat_iter ~sep iter concatenates all strings of iter, separated with sep.

  • since 3.2
val unlines : string list -> string

unlines ls concatenates all strings of ls, separated with '\n'.

  • since 0.10
val unlines_gen : string gen -> string

unlines_gen gen concatenates all strings of gen, separated with '\n'.

  • since 0.10
val unlines_iter : string iter -> string

unlines_iter iter concatenates all strings of iter, separated with '\n'.

  • since 3.2
val unlines_seq : string Stdlib.Seq.t -> string

unlines_seq seq concatenates all strings of seq, separated with '\n'.

  • since 3.2
val set : string -> int -> char -> string

set s i c creates a new string which is a copy of s, except for index i, which becomes c.

  • raises Invalid_argument

    if i is an invalid index.

  • since 0.12
val iter : (char -> unit) -> string -> unit

iter f s applies function f on each character of s. Alias to String.iter.

  • since 0.12
val filter_map : (char -> char option) -> string -> string

filter_map f s calls (f a0) (f a1) โ€ฆ (f an) where a0 โ€ฆ an are the characters of s. It returns the string of characters ci such as f ai = Some ci (when f returns None, the corresponding element of s is discarded).

  • since 0.17
val filter : (char -> bool) -> string -> string

filter f s discards characters of s not satisfying f.

  • since 0.17
val uniq : (char -> char -> bool) -> string -> string

uniq eq s remove consecutive duplicate characters in s.

  • since 3.4
val flat_map : ?sep:string -> (char -> string) -> string -> string

flat_map ~sep f s maps each chars of s to a string, then concatenates them all.

  • parameter sep

    optional separator between each generated string.

  • since 0.12
val for_all : (char -> bool) -> string -> bool

for_all f s is true iff all characters of s satisfy the predicate f.

  • since 0.12
val exists : (char -> bool) -> string -> bool

exists f s is true iff some character of s satisfy the predicate f.

  • since 0.12
val drop_while : (char -> bool) -> t -> t

drop_while f s discards any characters of s starting from the left, up to the first character c not satisfying f c.

  • since 2.2
val rdrop_while : (char -> bool) -> t -> t

rdrop_while f s discards any characters of s starting from the right, up to the first character c not satisfying f c.

  • since 2.2
val ltrim : t -> t

ltrim s trims space on the left (see String.trim for more details).

  • since 1.2
val rtrim : t -> t

rtrim s trims space on the right (see String.trim for more details).

  • since 1.2

Operations on 2 strings

val map2 : (char -> char -> char) -> string -> string -> string

map2 f s1 s2 maps pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val iter2 : (char -> char -> unit) -> string -> string -> unit

iter2 f s1 s2 iterates on pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val iteri2 : (int -> char -> char -> unit) -> string -> string -> unit

iteri2 f s1 s2 iterates on pairs of chars with their index.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val fold2 : ('a -> char -> char -> 'a) -> 'a -> string -> string -> 'a

fold2 f init s1 s2 folds on pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val for_all2 : (char -> char -> bool) -> string -> string -> bool

for_all2 f s1 s2 returns true iff all pairs of chars satisfy the predicate f.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val exists2 : (char -> char -> bool) -> string -> string -> bool

exists2 f s1 s2 returns true iff a pair of chars satisfy the predicate f.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12

Ascii functions

Those functions are deprecated in String since 4.03, so we provide a stable alias for them even in older versions.

val equal_caseless : string -> string -> bool

equal_caseless s1 s2 compares s1 and s2 without respect to ascii lowercase.

  • since 1.2
val to_hex : string -> string

Convert a string with arbitrary content into a hexadecimal string.

  • since 3.8
val of_hex : string -> string option

Convert a string in hex into a string with arbitrary content.

  • since 3.8
val of_hex_exn : string -> string

Same as of_hex but fails harder.

  • raises Invalid_argument

    if the input is not valid hex.

  • since 3.8

Finding

A relatively efficient algorithm for finding sub-strings.

  • since 1.0
module Find : sig ... end

Splitting

module Split : sig ... end
val split_on_char : char -> string -> string list

split_on_char by s splits the string s along the given char by.

  • since 1.2
val split : by:string -> string -> string list

split ~by s splits the string s along the given string by. Alias to Split.list_cpy.

  • since 1.2

Utils

val compare_versions : string -> string -> int

compare_versions s1 s2 compares version strings s1 and s2, considering that numbers are above text.

  • since 0.13
val compare_natural : string -> string -> int

compare_natural s1 s2 is the Natural Sort Order, comparing chunks of digits as natural numbers. https://en.wikipedia.org/wiki/Natural_sort_order

  • since 1.3
val edit_distance : ?cutoff:int -> string -> string -> int

edit_distance ~cutoff s1 s2 is the edition distance between the two strings s1 and s2. This satisfies the classical distance axioms: it is always positive, symmetric, and satisfies the formula distance s1 s2 + distance s2 s3 >= distance s1 s3.

  • parameter cutoff

    if provided, it's a cap on the number of iterations. (since 3.0). This is useful if you just want to check whether the edit distance is less or equal than 2 without (use edit_distance s1 s2 ~cutoff:3 <= 2). note that contrary to what was previously documented here, the result can still be higher than cutoff if it's reached in <cutoff iterations. However if the result is < cutoff then it is accurate.

Infix operators

  • since 3.0
module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 3.0
val (<>) : t -> t -> bool
  • since 3.0
val (<) : t -> t -> bool
  • since 3.0
val (<=) : t -> t -> bool
  • since 3.0
val (>=) : t -> t -> bool
  • since 3.0
val (>) : t -> t -> bool
  • since 3.0
diff --git a/dev/containers/CCStringLabels/Find/index.html b/dev/containers/CCStringLabels/Find/index.html index c86bb217..8aabc0c9 100644 --- a/dev/containers/CCStringLabels/Find/index.html +++ b/dev/containers/CCStringLabels/Find/index.html @@ -1,2 +1,2 @@ -Find (containers.CCStringLabels.Find)

Module CCStringLabels.Find

type _ pattern
val compile : string -> [ `Direct ] pattern
val rcompile : string -> [ `Reverse ] pattern
val find : ?start:int -> pattern:[ `Direct ] pattern -> string -> int

find ?start ~pattern s searches for pattern in the string s, left-to-right.

  • returns

    the offset of the first match, -1 otherwise.

  • parameter start

    offset in string at which we start.

val rfind : ?start:int -> pattern:[ `Reverse ] pattern -> string -> int

rfind ?start ~pattern s searches for pattern in the string s, right-to-left.

  • returns

    the offset of the start of the first match from the right, -1 otherwise.

  • parameter start

    right-offset in string at which we start.

\ No newline at end of file +Find (containers.CCStringLabels.Find)

Module CCStringLabels.Find

type _ pattern
val compile : string -> [ `Direct ] pattern
val rcompile : string -> [ `Reverse ] pattern
val find : ?start:int -> pattern:[ `Direct ] pattern -> string -> int

find ?start ~pattern s searches for pattern in the string s, left-to-right.

  • returns

    the offset of the first match, -1 otherwise.

  • parameter start

    offset in string at which we start.

val rfind : ?start:int -> pattern:[ `Reverse ] pattern -> string -> int

rfind ?start ~pattern s searches for pattern in the string s, right-to-left.

  • returns

    the offset of the start of the first match from the right, -1 otherwise.

  • parameter start

    right-offset in string at which we start.

diff --git a/dev/containers/CCStringLabels/Infix/index.html b/dev/containers/CCStringLabels/Infix/index.html index 8f941d98..c2f9b21d 100644 --- a/dev/containers/CCStringLabels/Infix/index.html +++ b/dev/containers/CCStringLabels/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCStringLabels.Infix)

Module CCStringLabels.Infix

val (=) : t -> t -> bool
  • since 3.0
val (<>) : t -> t -> bool
  • since 3.0
val (<) : t -> t -> bool
  • since 3.0
val (<=) : t -> t -> bool
  • since 3.0
val (>=) : t -> t -> bool
  • since 3.0
val (>) : t -> t -> bool
  • since 3.0
\ No newline at end of file +Infix (containers.CCStringLabels.Infix)

Module CCStringLabels.Infix

val (=) : t -> t -> bool
  • since 3.0
val (<>) : t -> t -> bool
  • since 3.0
val (<) : t -> t -> bool
  • since 3.0
val (<=) : t -> t -> bool
  • since 3.0
val (>=) : t -> t -> bool
  • since 3.0
val (>) : t -> t -> bool
  • since 3.0
diff --git a/dev/containers/CCStringLabels/Split/index.html b/dev/containers/CCStringLabels/Split/index.html index c2196c95..f8fb242b 100644 --- a/dev/containers/CCStringLabels/Split/index.html +++ b/dev/containers/CCStringLabels/Split/index.html @@ -1,18 +1,18 @@ -Split (containers.CCStringLabels.Split)

Module CCStringLabels.Split

type drop_if_empty = {
  1. first : bool;
  2. last : bool;
}

Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".

  • {first=false; last=false} will return ""; "a"; "b"; ""
  • {first=true; last=false} will return "a"; "b" ""
  • {first=false; last=true} will return ""; "a"; "b"
  • {first=true; last=true} will return "a"; "b"

The default value of all remaining functions is Drop_none.

  • since 1.5
val no_drop : drop_if_empty

no_drop does not drop any group, even empty and on borders.

  • since 1.5
val list_ : - ?drop:drop_if_empty -> - by:string -> +Split (containers.CCStringLabels.Split)

Module CCStringLabels.Split

type drop_if_empty = {
  1. first : bool;
  2. last : bool;
}

Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".

  • {first=false; last=false} will return ""; "a"; "b"; ""
  • {first=true; last=false} will return "a"; "b" ""
  • {first=false; last=true} will return ""; "a"; "b"
  • {first=true; last=true} will return "a"; "b"

The default value of all remaining functions is Drop_none.

  • since 1.5
val no_drop : drop_if_empty

no_drop does not drop any group, even empty and on borders.

  • since 1.5
val list_ : + ?drop:drop_if_empty -> + by:string -> string -> - (string * int * int) list

list_ ?drop ~by s splits the given string s along the given separator by. Should only be used with very small separators.

  • returns

    a list of slices (s,index,length) that are separated by by. String.sub can then be used to actually extract a string from the slice.

  • raises Failure

    if by = "".

val gen : - ?drop:drop_if_empty -> - by:string -> + (string * int * int) list

list_ ?drop ~by s splits the given string s along the given separator by. Should only be used with very small separators.

  • returns

    a list of slices (s,index,length) that are separated by by. String.sub can then be used to actually extract a string from the slice.

  • raises Failure

    if by = "".

val gen : + ?drop:drop_if_empty -> + by:string -> string -> (string * int * int) gen

gen ?drop ~by s splits the given string s along the given separator by. Returns a gen of slices.

val iter : - ?drop:drop_if_empty -> - by:string -> + ?drop:drop_if_empty -> + by:string -> string -> (string * int * int) iter

iter ?drop ~by s splits the given string s along the given separator by. Returns an iter of slices.

  • since 2.8
val seq : - ?drop:drop_if_empty -> - by:string -> + ?drop:drop_if_empty -> + by:string -> string -> - (string * int * int) Stdlib.Seq.t

seq ?drop ~by s splits the given string s along the given separator by. Returns a Seq.t of slices. Renamed from std_seq since 3.0.

  • since 3.0
Copying functions

Those split functions actually copy the substrings, which can be more convenient but less efficient in general.

val list_cpy : ?drop:drop_if_empty -> by:string -> string -> string list

list_cpy ?drop ~by s splits the given string s along the given separator by. Returns a list of strings.

val gen_cpy : ?drop:drop_if_empty -> by:string -> string -> string gen

gen_cpy ?drop ~by s splits the given string s along the given separator by. Returns a gen of strings.

val iter_cpy : ?drop:drop_if_empty -> by:string -> string -> string iter

iter_cpy ?drop ~by s splits the given string s along the given separator by. Returns an iter of strings.

  • since 2.8
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Stdlib.Seq.t

seq_cpy ?drop ~by s splits the given string s along the given separator by. Returns a Seq.t of strings. Renamed from std_seq_cpy since 3.0.

  • since 3.0
val left : by:string -> string -> (string * string) option

left ~by s splits on the first occurrence of by from the leftmost part of the string s.

  • since 0.12
val left_exn : by:string -> string -> string * string

left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.

  • raises Not_found

    if by is not part of the string s.

  • since 0.16
val right : by:string -> string -> (string * string) option

right ~by s splits on the first occurrence of by from the rightmost part of the string s.

  • since 0.12
val right_exn : by:string -> string -> string * string

right_exn ~by s splits on the first occurrence of by from the rightmost part of the string s.

  • raises Not_found

    if by is not part of the string s.

  • since 0.16
\ No newline at end of file + (string * int * int) Stdlib.Seq.t

seq ?drop ~by s splits the given string s along the given separator by. Returns a Seq.t of slices. Renamed from std_seq since 3.0.

  • since 3.0
Copying functions

Those split functions actually copy the substrings, which can be more convenient but less efficient in general.

val list_cpy : ?drop:drop_if_empty -> by:string -> string -> string list

list_cpy ?drop ~by s splits the given string s along the given separator by. Returns a list of strings.

val gen_cpy : ?drop:drop_if_empty -> by:string -> string -> string gen

gen_cpy ?drop ~by s splits the given string s along the given separator by. Returns a gen of strings.

val iter_cpy : ?drop:drop_if_empty -> by:string -> string -> string iter

iter_cpy ?drop ~by s splits the given string s along the given separator by. Returns an iter of strings.

  • since 2.8
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Stdlib.Seq.t

seq_cpy ?drop ~by s splits the given string s along the given separator by. Returns a Seq.t of strings. Renamed from std_seq_cpy since 3.0.

  • since 3.0
val left : by:string -> string -> (string * string) option

left ~by s splits on the first occurrence of by from the leftmost part of the string s.

  • since 0.12
val left_exn : by:string -> string -> string * string

left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.

  • raises Not_found

    if by is not part of the string s.

  • since 0.16
val right : by:string -> string -> (string * string) option

right ~by s splits on the first occurrence of by from the rightmost part of the string s.

  • since 0.12
val right_exn : by:string -> string -> string * string

right_exn ~by s splits on the first occurrence of by from the rightmost part of the string s.

  • raises Not_found

    if by is not part of the string s.

  • since 0.16
diff --git a/dev/containers/CCStringLabels/index.html b/dev/containers/CCStringLabels/index.html index fd91aeb7..1aaa3793 100644 --- a/dev/containers/CCStringLabels/index.html +++ b/dev/containers/CCStringLabels/index.html @@ -1,19 +1,19 @@ -CCStringLabels (containers.CCStringLabels)

Module CCStringLabels

Basic String Utils (Labeled version of CCString)

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option

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.0
val empty : string

The empty string.

  • since 4.13.0
val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13.0
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13.0
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.

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.0

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.0
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13.0
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.0
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.0
val fold_left : f:('a -> char -> 'a) -> init:'a -> string -> 'a

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.0
val fold_right : f:(char -> 'a -> 'a) -> string -> init:'a -> 'a

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.0
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.0
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.

Traversing

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.0

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_seqi : t -> (int * char) Stdlib.Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • 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.

Deprecated functions

val create : int -> bytes

create n returns a fresh 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.

  • deprecated

    This is a deprecated alias of Bytes.create/BytesLabels.create.

val copy : string -> string

Return a copy of the given string.

  • deprecated

    Because strings are immutable, it doesn't make much sense to make identical copies of them.

val fill : bytes -> pos:int -> len:int -> char -> unit

fill s ~pos ~len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

  • raises Invalid_argument

    if pos and len do not designate a valid substring of s.

  • deprecated

    This is a deprecated alias of Bytes.fill/BytesLabels.fill.

val uppercase : string -> string

Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val lowercase : string -> string

Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val capitalize : string -> string

Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val uncapitalize : string -> string

Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.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.0
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.0
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.0
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.0
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.0
val length : t -> int

length s returns the length (number of characters) of the given string s.

val blit : - src:t -> - src_pos:int -> - dst:Stdlib.Bytes.t -> - dst_pos:int -> - len:int -> - unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len characters from string src starting at character indice src_pos, to the Bytes sequence dst starting at character indice dst_pos. Like String.blit. Compatible with the -safe-string option.

  • raises Invalid_argument

    if indices are not valid.

val fold : f:('a -> char -> 'a) -> init:'a -> t -> 'a

fold ~f ~init s folds on chars by increasing index. Computes f(โ€ฆ (f (f init s.[0]) s.[1]) โ€ฆ) s.[n-1].

  • since 0.7
val foldi : f:('a -> int -> char -> 'a) -> 'a -> t -> 'a

foldi ~f init s is just like fold, but it also passes in the index of each chars as second argument to the folded function f.

  • since 3.3

Conversions

val to_gen : t -> char gen

to_gen s returns the gen of characters contained in the string s.

val to_iter : t -> char iter

to_iter s returns the iter of characters contained in the string s.

  • since 2.8
val to_seq : t -> char Stdlib.Seq.t

to_seq s returns the Seq.t of characters contained in the string s. Renamed from to std_seq since 3.0.

  • since 3.0
val to_list : t -> char list

to_list s returns the list of characters contained in the string s.

val pp_buf : Stdlib.Buffer.t -> t -> unit

pp_buf buf s prints s to the buffer buf. Renamed from pp since 2.0.

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

pp f s prints the string s within quotes to the formatter f. Renamed from print since 2.0.

Strings

val equal : string -> string -> bool

equal s1 s2 returns true iff the strings s1 and s2 are equal.

val compare : string -> string -> int

compare s1 s2 compares the strings s1 and s2 and returns an integer that indicates their relative position in the sort order.

val is_empty : string -> bool

is_empty s returns true iff s is empty (i.e. its length is 0).

  • since 1.5
val hash : string -> int

hash s returns the hash value of s.

val rev : string -> string

rev s returns the reverse of s.

  • since 0.17
val pad : ?side:[ `Left | `Right ] -> ?c:char -> int -> string -> string

pad ?side ?c n s ensures that the string s is at least n bytes long, and pads it on the side with c if it's not the case.

  • parameter side

    determines where padding occurs (default: `Left).

  • parameter c

    the char used to pad (default: ' ').

  • since 0.17
val of_char : char -> string

of_char 'a' is "a".

  • since 0.19
val of_gen : char gen -> string

of_gen gen converts a gen of characters to a string.

val of_iter : char iter -> string

of_iter iter converts an iter of characters to a string.

  • since 2.8
val of_seq : char Stdlib.Seq.t -> string

of_seq seq converts a seq of characters to a string. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_list : char list -> string

of_list lc converts a list of characters lc to a string.

val of_array : char array -> string

of_array ac converts an array of characters ac to a string.

val to_array : string -> char array

to_array s returns the array of characters contained in the string s.

val find : ?start:int -> sub:string -> string -> int

find ?start ~sub s returns the starting index of the first occurrence of sub within s or -1.

  • parameter start

    starting position in s.

val find_all : ?start:int -> sub:string -> string -> int gen

find_all ?start ~sub s finds all occurrences of sub in s, even overlapping instances and returns them in a generator gen.

  • parameter start

    starting position in s.

  • since 0.17
val find_all_l : ?start:int -> sub:string -> string -> int list

find_all_l ?start ~sub s finds all occurrences of sub in s and returns them in a list.

  • parameter start

    starting position in s.

  • since 0.17
val mem : ?start:int -> sub:string -> string -> bool

mem ?start ~sub s is true iff sub is a substring of s.

  • since 0.12
val rfind : sub:string -> string -> int

rfind ~sub s finds sub in string s from the right, returns its first index or -1. Should only be used with very small sub.

  • since 0.12
val replace : - ?which:[ `Left | `Right | `All ] -> - sub:string -> - by:string -> +CCStringLabels (containers.CCStringLabels)

Module CCStringLabels

Basic String Utils (Labeled version of CCString)

type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option

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.0
val empty : string

The empty string.

  • since 4.13.0
val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13.0
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13.0
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.

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.0

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.0
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13.0
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.0
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.0
val fold_left : f:('a -> char -> 'a) -> init:'a -> string -> 'a

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.0
val fold_right : f:(char -> 'a -> 'a) -> string -> init:'a -> 'a

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.0
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.0
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.

Traversing

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.0

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_seqi : t -> (int * char) Stdlib.Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • 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.

Deprecated functions

val create : int -> bytes

create n returns a fresh 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.

  • deprecated

    This is a deprecated alias of Bytes.create/BytesLabels.create.

val copy : string -> string

Return a copy of the given string.

  • deprecated

    Because strings are immutable, it doesn't make much sense to make identical copies of them.

val fill : bytes -> pos:int -> len:int -> char -> unit

fill s ~pos ~len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

  • raises Invalid_argument

    if pos and len do not designate a valid substring of s.

  • deprecated

    This is a deprecated alias of Bytes.fill/BytesLabels.fill.

val uppercase : string -> string

Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val lowercase : string -> string

Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val capitalize : string -> string

Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

val uncapitalize : string -> string

Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

  • deprecated

    Functions operating on Latin-1 character set are deprecated.

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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.0
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.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.0
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.0
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.0
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.0
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.0
val length : t -> int

length s returns the length (number of characters) of the given string s.

val blit : + src:t -> + src_pos:int -> + dst:Stdlib.Bytes.t -> + dst_pos:int -> + len:int -> + unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len characters from string src starting at character indice src_pos, to the Bytes sequence dst starting at character indice dst_pos. Like String.blit. Compatible with the -safe-string option.

  • raises Invalid_argument

    if indices are not valid.

val fold : f:('a -> char -> 'a) -> init:'a -> t -> 'a

fold ~f ~init s folds on chars by increasing index. Computes f(โ€ฆ (f (f init s.[0]) s.[1]) โ€ฆ) s.[n-1].

  • since 0.7
val foldi : f:('a -> int -> char -> 'a) -> 'a -> t -> 'a

foldi ~f init s is just like fold, but it also passes in the index of each chars as second argument to the folded function f.

  • since 3.3

Conversions

val to_gen : t -> char gen

to_gen s returns the gen of characters contained in the string s.

val to_iter : t -> char iter

to_iter s returns the iter of characters contained in the string s.

  • since 2.8
val to_seq : t -> char Stdlib.Seq.t

to_seq s returns the Seq.t of characters contained in the string s. Renamed from to std_seq since 3.0.

  • since 3.0
val to_list : t -> char list

to_list s returns the list of characters contained in the string s.

val pp_buf : Stdlib.Buffer.t -> t -> unit

pp_buf buf s prints s to the buffer buf. Renamed from pp since 2.0.

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

pp f s prints the string s within quotes to the formatter f. Renamed from print since 2.0.

Strings

val equal : string -> string -> bool

equal s1 s2 returns true iff the strings s1 and s2 are equal.

val compare : string -> string -> int

compare s1 s2 compares the strings s1 and s2 and returns an integer that indicates their relative position in the sort order.

val is_empty : string -> bool

is_empty s returns true iff s is empty (i.e. its length is 0).

  • since 1.5
val hash : string -> int

hash s returns the hash value of s.

val rev : string -> string

rev s returns the reverse of s.

  • since 0.17
val pad : ?side:[ `Left | `Right ] -> ?c:char -> int -> string -> string

pad ?side ?c n s ensures that the string s is at least n bytes long, and pads it on the side with c if it's not the case.

  • parameter side

    determines where padding occurs (default: `Left).

  • parameter c

    the char used to pad (default: ' ').

  • since 0.17
val of_char : char -> string

of_char 'a' is "a".

  • since 0.19
val of_gen : char gen -> string

of_gen gen converts a gen of characters to a string.

val of_iter : char iter -> string

of_iter iter converts an iter of characters to a string.

  • since 2.8
val of_seq : char Stdlib.Seq.t -> string

of_seq seq converts a seq of characters to a string. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_list : char list -> string

of_list lc converts a list of characters lc to a string.

val of_array : char array -> string

of_array ac converts an array of characters ac to a string.

val to_array : string -> char array

to_array s returns the array of characters contained in the string s.

val find : ?start:int -> sub:string -> string -> int

find ?start ~sub s returns the starting index of the first occurrence of sub within s or -1.

  • parameter start

    starting position in s.

val find_all : ?start:int -> sub:string -> string -> int gen

find_all ?start ~sub s finds all occurrences of sub in s, even overlapping instances and returns them in a generator gen.

  • parameter start

    starting position in s.

  • since 0.17
val find_all_l : ?start:int -> sub:string -> string -> int list

find_all_l ?start ~sub s finds all occurrences of sub in s and returns them in a list.

  • parameter start

    starting position in s.

  • since 0.17
val mem : ?start:int -> sub:string -> string -> bool

mem ?start ~sub s is true iff sub is a substring of s.

  • since 0.12
val rfind : sub:string -> string -> int

rfind ~sub s finds sub in string s from the right, returns its first index or -1. Should only be used with very small sub.

  • since 0.12
val replace : + ?which:[ `Left | `Right | `All ] -> + sub:string -> + by:string -> string -> - string

replace ?which ~sub ~by s replaces some occurrences of sub by by in s.

  • parameter which

    decides whether the occurrences to replace are:

    • `Left first occurrence from the left (beginning).
    • `Right first occurrence from the right (end).
    • `All all occurrences (default).
  • raises Invalid_argument

    if sub = "".

  • since 0.14
val is_sub : - sub:string -> - sub_pos:int -> + string

replace ?which ~sub ~by s replaces some occurrences of sub by by in s.

  • parameter which

    decides whether the occurrences to replace are:

    • `Left first occurrence from the left (beginning).
    • `Right first occurrence from the right (end).
    • `All all occurrences (default).
  • raises Invalid_argument

    if sub = "".

  • since 0.14
val is_sub : + sub:string -> + sub_pos:int -> string -> - pos:int -> - sub_len:int -> - bool

is_sub ~sub ~sub_pos s ~pos ~sub_len returns true iff the substring of sub starting at position sub_pos and of length sub_len is a substring of s starting at position pos.

val repeat : string -> int -> string

repeat s n creates a string by repeating the string s n times.

val prefix : pre:string -> string -> bool

prefix ~pre s returns true iff pre is a prefix of s.

val suffix : suf:string -> string -> bool

suffix ~suf s returns true iff suf is a suffix of s.

  • since 0.7
val chop_prefix : pre:string -> string -> string option

chop_prefix ~pre s removes pre from s if pre really is a prefix of s, returns None otherwise.

  • since 0.17
val chop_suffix : suf:string -> string -> string option

chop_suffix ~suf s removes suf from s if suf really is a suffix of s, returns None otherwise.

  • since 0.17
val take : int -> string -> string

take n s keeps only the n first chars of s.

  • since 0.17
val drop : int -> string -> string

drop n s removes the n first chars of s.

  • since 0.17
val take_drop : int -> string -> string * string

take_drop n s is take n s, drop n s.

  • since 0.17
val lines : string -> string list

lines s returns a list of the lines of s (splits along '\n').

  • since 0.10
val lines_gen : string -> string gen

lines_gen s returns a generator gen of the lines of s (splits along '\n').

  • since 0.10
val lines_iter : string -> string iter

lines_iter s returns the iter of the lines of s (splits along '\n').

  • since 3.2
val lines_seq : string -> string Stdlib.Seq.t

lines_seq s returns the Seq.t of the lines of s (splits along '\n').

  • since 3.2
val concat_iter : sep:string -> string iter -> string

concat_iter ~sep iter concatenates all strings of iter, separated with sep.

  • since 3.2
val concat_gen : sep:string -> string gen -> string

concat_gen ~sep gen concatenates all strings of gen, separated with sep.

  • since 0.10
val concat_seq : sep:string -> string Stdlib.Seq.t -> string

concat_seq ~sep seq concatenates all strings of seq, separated with sep.

  • since 3.2
val unlines : string list -> string

unlines ls concatenates all strings of ls, separated with '\n'.

  • since 0.10
val unlines_gen : string gen -> string

unlines_gen gen concatenates all strings of gen, separated with '\n'.

  • since 0.10
val unlines_iter : string iter -> string

unlines_iter iter concatenates all strings of iter, separated with '\n'.

  • since 3.2
val unlines_seq : string Stdlib.Seq.t -> string

unlines_seq seq concatenates all strings of seq, separated with '\n'.

  • since 3.2
val set : string -> int -> char -> string

set s i c creates a new string which is a copy of s, except for index i, which becomes c.

  • raises Invalid_argument

    if i is an invalid index.

  • since 0.12
val iter : f:(char -> unit) -> string -> unit

iter ~f s applies function f on each character of s. Alias to String.iter.

  • since 0.12
val filter_map : f:(char -> char option) -> string -> string

filter_map ~f s calls (f a0) (f a1) โ€ฆ (f an) where a0 โ€ฆ an are the characters of s. It returns the string of characters ci such as f ai = Some ci (when f returns None, the corresponding element of s is discarded).

  • since 0.17
val filter : f:(char -> bool) -> string -> string

filter ~f s discards characters of s not satisfying f.

  • since 0.17
val uniq : eq:(char -> char -> bool) -> string -> string

uniq ~eq s remove consecutive duplicate characters in s.

  • since 3.4
val flat_map : ?sep:string -> f:(char -> string) -> string -> string

flat_map ?sep ~f s maps each chars of s to a string, then concatenates them all.

  • parameter sep

    optional separator between each generated string.

  • since 0.12
val for_all : f:(char -> bool) -> string -> bool

for_all ~f s is true iff all characters of s satisfy the predicate f.

  • since 0.12
val exists : f:(char -> bool) -> string -> bool

exists ~f s is true iff some character of s satisfy the predicate f.

  • since 0.12
val drop_while : f:(char -> bool) -> t -> t

drop_while ~f s discards any characters of s starting from the left, up to the first character c not satisfying f c.

  • since 2.2
val rdrop_while : f:(char -> bool) -> t -> t

rdrop_while ~f s discards any characters of s starting from the right, up to the first character c not satisfying f c.

  • since 2.2
val ltrim : t -> t

ltrim s trims space on the left (see String.trim for more details).

  • since 1.2
val rtrim : t -> t

rtrim s trims space on the right (see String.trim for more details).

  • since 1.2

Operations on 2 strings

val map2 : f:(char -> char -> char) -> string -> string -> string

map2 ~f s1 s2 maps pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val iter2 : f:(char -> char -> unit) -> string -> string -> unit

iter2 ~f s1 s2 iterates on pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val iteri2 : f:(int -> char -> char -> unit) -> string -> string -> unit

iteri2 ~f s1 s2 iterates on pairs of chars with their index.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val fold2 : f:('a -> char -> char -> 'a) -> init:'a -> string -> string -> 'a

fold2 ~f ~init s1 s2 folds on pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val for_all2 : f:(char -> char -> bool) -> string -> string -> bool

for_all2 ~f s1 s2 returns true iff all pairs of chars satisfy the predicate f.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val exists2 : f:(char -> char -> bool) -> string -> string -> bool

exists2 ~f s1 s2 returns true iff a pair of chars satisfy the predicate f.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12

Ascii functions

Those functions are deprecated in String since 4.03, so we provide a stable alias for them even in older versions.

val capitalize_ascii : string -> string

capitalize_ascii s returns a copy of s with the first character set to uppercase using the US-ASCII character set. See String.

  • since 0.18
val uncapitalize_ascii : string -> string

uncapitalize_ascii s returns a copy of s with the first character set to lowercase using the US-ASCII character set. See String.

  • since 0.18
val uppercase_ascii : string -> string

uppercase_ascii s returns a copy of s with all lowercase letters translated to uppercase using the US-ASCII character set. See String.

  • since 0.18
val lowercase_ascii : string -> string

lowercase_ascii s returns a copy of s with all uppercase letters translated to lowercase using the US-ASCII character set. See String.

  • since 0.18
val equal_caseless : string -> string -> bool

equal_caseless s1 s2 compares s1 and s2 without respect to ascii lowercase.

  • since 1.2
val to_hex : string -> string

Convert a string with arbitrary content into a hexadecimal string.

  • since 3.8
val of_hex : string -> string option

Convert a string in hex into a string with arbitrary content.

  • since 3.8
val of_hex_exn : string -> string

Same as of_hex but fails harder.

  • raises Invalid_argument

    if the input is not valid hex.

  • since 3.8

Finding

A relatively efficient algorithm for finding sub-strings.

  • since 1.0
module Find : sig ... end

Splitting

module Split : sig ... end
val split_on_char : by:char -> string -> string list

split_on_char ~by s splits the string s along the given char by.

  • since 1.2
val split : by:string -> string -> string list

split ~by s splits the string s along the given string by. Alias to Split.list_cpy.

  • since 1.2

Utils

val compare_versions : string -> string -> int

compare_versions s1 s2 compares version strings s1 and s2, considering that numbers are above text.

  • since 0.13
val compare_natural : string -> string -> int

compare_natural s1 s2 is the Natural Sort Order, comparing chunks of digits as natural numbers. https://en.wikipedia.org/wiki/Natural_sort_order

  • since 1.3
val edit_distance : ?cutoff:int -> string -> string -> int

edit_distance ?cutoff s1 s2 is the edition distance between the two strings s1 and s2. This satisfies the classical distance axioms: it is always positive, symmetric, and satisfies the formula distance s1 s2 + distance s2 s3 >= distance s1 s3.

  • parameter cutoff

    if provided, it's a cap on both the number of iterations, and on the result. (since 3.0). This is useful if you just want to check whether the edit distance is less or equal than 2 (use cutoff of 3).

Infix operators

  • since 3.0
module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 3.0
val (<>) : t -> t -> bool
  • since 3.0
val (<) : t -> t -> bool
  • since 3.0
val (<=) : t -> t -> bool
  • since 3.0
val (>=) : t -> t -> bool
  • since 3.0
val (>) : t -> t -> bool
  • since 3.0
\ No newline at end of file + pos:int -> + sub_len:int -> + bool

is_sub ~sub ~sub_pos s ~pos ~sub_len returns true iff the substring of sub starting at position sub_pos and of length sub_len is a substring of s starting at position pos.

val repeat : string -> int -> string

repeat s n creates a string by repeating the string s n times.

val prefix : pre:string -> string -> bool

prefix ~pre s returns true iff pre is a prefix of s.

val suffix : suf:string -> string -> bool

suffix ~suf s returns true iff suf is a suffix of s.

  • since 0.7
val chop_prefix : pre:string -> string -> string option

chop_prefix ~pre s removes pre from s if pre really is a prefix of s, returns None otherwise.

  • since 0.17
val chop_suffix : suf:string -> string -> string option

chop_suffix ~suf s removes suf from s if suf really is a suffix of s, returns None otherwise.

  • since 0.17
val take : int -> string -> string

take n s keeps only the n first chars of s.

  • since 0.17
val drop : int -> string -> string

drop n s removes the n first chars of s.

  • since 0.17
val take_drop : int -> string -> string * string

take_drop n s is take n s, drop n s.

  • since 0.17
val lines : string -> string list

lines s returns a list of the lines of s (splits along '\n').

  • since 0.10
val lines_gen : string -> string gen

lines_gen s returns a generator gen of the lines of s (splits along '\n').

  • since 0.10
val lines_iter : string -> string iter

lines_iter s returns the iter of the lines of s (splits along '\n').

  • since 3.2
val lines_seq : string -> string Stdlib.Seq.t

lines_seq s returns the Seq.t of the lines of s (splits along '\n').

  • since 3.2
val concat_iter : sep:string -> string iter -> string

concat_iter ~sep iter concatenates all strings of iter, separated with sep.

  • since 3.2
val concat_gen : sep:string -> string gen -> string

concat_gen ~sep gen concatenates all strings of gen, separated with sep.

  • since 0.10
val concat_seq : sep:string -> string Stdlib.Seq.t -> string

concat_seq ~sep seq concatenates all strings of seq, separated with sep.

  • since 3.2
val unlines : string list -> string

unlines ls concatenates all strings of ls, separated with '\n'.

  • since 0.10
val unlines_gen : string gen -> string

unlines_gen gen concatenates all strings of gen, separated with '\n'.

  • since 0.10
val unlines_iter : string iter -> string

unlines_iter iter concatenates all strings of iter, separated with '\n'.

  • since 3.2
val unlines_seq : string Stdlib.Seq.t -> string

unlines_seq seq concatenates all strings of seq, separated with '\n'.

  • since 3.2
val set : string -> int -> char -> string

set s i c creates a new string which is a copy of s, except for index i, which becomes c.

  • raises Invalid_argument

    if i is an invalid index.

  • since 0.12
val iter : f:(char -> unit) -> string -> unit

iter ~f s applies function f on each character of s. Alias to String.iter.

  • since 0.12
val filter_map : f:(char -> char option) -> string -> string

filter_map ~f s calls (f a0) (f a1) โ€ฆ (f an) where a0 โ€ฆ an are the characters of s. It returns the string of characters ci such as f ai = Some ci (when f returns None, the corresponding element of s is discarded).

  • since 0.17
val filter : f:(char -> bool) -> string -> string

filter ~f s discards characters of s not satisfying f.

  • since 0.17
val uniq : eq:(char -> char -> bool) -> string -> string

uniq ~eq s remove consecutive duplicate characters in s.

  • since 3.4
val flat_map : ?sep:string -> f:(char -> string) -> string -> string

flat_map ?sep ~f s maps each chars of s to a string, then concatenates them all.

  • parameter sep

    optional separator between each generated string.

  • since 0.12
val for_all : f:(char -> bool) -> string -> bool

for_all ~f s is true iff all characters of s satisfy the predicate f.

  • since 0.12
val exists : f:(char -> bool) -> string -> bool

exists ~f s is true iff some character of s satisfy the predicate f.

  • since 0.12
val drop_while : f:(char -> bool) -> t -> t

drop_while ~f s discards any characters of s starting from the left, up to the first character c not satisfying f c.

  • since 2.2
val rdrop_while : f:(char -> bool) -> t -> t

rdrop_while ~f s discards any characters of s starting from the right, up to the first character c not satisfying f c.

  • since 2.2
val ltrim : t -> t

ltrim s trims space on the left (see String.trim for more details).

  • since 1.2
val rtrim : t -> t

rtrim s trims space on the right (see String.trim for more details).

  • since 1.2

Operations on 2 strings

val map2 : f:(char -> char -> char) -> string -> string -> string

map2 ~f s1 s2 maps pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val iter2 : f:(char -> char -> unit) -> string -> string -> unit

iter2 ~f s1 s2 iterates on pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val iteri2 : f:(int -> char -> char -> unit) -> string -> string -> unit

iteri2 ~f s1 s2 iterates on pairs of chars with their index.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val fold2 : f:('a -> char -> char -> 'a) -> init:'a -> string -> string -> 'a

fold2 ~f ~init s1 s2 folds on pairs of chars.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val for_all2 : f:(char -> char -> bool) -> string -> string -> bool

for_all2 ~f s1 s2 returns true iff all pairs of chars satisfy the predicate f.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12
val exists2 : f:(char -> char -> bool) -> string -> string -> bool

exists2 ~f s1 s2 returns true iff a pair of chars satisfy the predicate f.

  • raises Invalid_argument

    if the strings have not the same length.

  • since 0.12

Ascii functions

Those functions are deprecated in String since 4.03, so we provide a stable alias for them even in older versions.

val capitalize_ascii : string -> string

capitalize_ascii s returns a copy of s with the first character set to uppercase using the US-ASCII character set. See String.

  • since 0.18
val uncapitalize_ascii : string -> string

uncapitalize_ascii s returns a copy of s with the first character set to lowercase using the US-ASCII character set. See String.

  • since 0.18
val uppercase_ascii : string -> string

uppercase_ascii s returns a copy of s with all lowercase letters translated to uppercase using the US-ASCII character set. See String.

  • since 0.18
val lowercase_ascii : string -> string

lowercase_ascii s returns a copy of s with all uppercase letters translated to lowercase using the US-ASCII character set. See String.

  • since 0.18
val equal_caseless : string -> string -> bool

equal_caseless s1 s2 compares s1 and s2 without respect to ascii lowercase.

  • since 1.2
val to_hex : string -> string

Convert a string with arbitrary content into a hexadecimal string.

  • since 3.8
val of_hex : string -> string option

Convert a string in hex into a string with arbitrary content.

  • since 3.8
val of_hex_exn : string -> string

Same as of_hex but fails harder.

  • raises Invalid_argument

    if the input is not valid hex.

  • since 3.8

Finding

A relatively efficient algorithm for finding sub-strings.

  • since 1.0
module Find : sig ... end

Splitting

module Split : sig ... end
val split_on_char : by:char -> string -> string list

split_on_char ~by s splits the string s along the given char by.

  • since 1.2
val split : by:string -> string -> string list

split ~by s splits the string s along the given string by. Alias to Split.list_cpy.

  • since 1.2

Utils

val compare_versions : string -> string -> int

compare_versions s1 s2 compares version strings s1 and s2, considering that numbers are above text.

  • since 0.13
val compare_natural : string -> string -> int

compare_natural s1 s2 is the Natural Sort Order, comparing chunks of digits as natural numbers. https://en.wikipedia.org/wiki/Natural_sort_order

  • since 1.3
val edit_distance : ?cutoff:int -> string -> string -> int

edit_distance ?cutoff s1 s2 is the edition distance between the two strings s1 and s2. This satisfies the classical distance axioms: it is always positive, symmetric, and satisfies the formula distance s1 s2 + distance s2 s3 >= distance s1 s3.

  • parameter cutoff

    if provided, it's a cap on both the number of iterations, and on the result. (since 3.0). This is useful if you just want to check whether the edit distance is less or equal than 2 (use cutoff of 3).

Infix operators

  • since 3.0
module Infix : sig ... end
include module type of Infix
val (=) : t -> t -> bool
  • since 3.0
val (<>) : t -> t -> bool
  • since 3.0
val (<) : t -> t -> bool
  • since 3.0
val (<=) : t -> t -> bool
  • since 3.0
val (>=) : t -> t -> bool
  • since 3.0
val (>) : t -> t -> bool
  • since 3.0
diff --git a/dev/containers/CCUnit/index.html b/dev/containers/CCUnit/index.html index 21025c27..c7334f1a 100644 --- a/dev/containers/CCUnit/index.html +++ b/dev/containers/CCUnit/index.html @@ -1,2 +1,2 @@ -CCUnit (containers.CCUnit)

Module CCUnit

include module type of struct include Stdlib.Unit end

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 +CCUnit (containers.CCUnit)

Module CCUnit

include module type of struct include Stdlib.Unit end

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/dev/containers/CCUnix/Infix/index.html b/dev/containers/CCUnix/Infix/index.html index 604b2a33..2a08994f 100644 --- a/dev/containers/CCUnix/Infix/index.html +++ b/dev/containers/CCUnix/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.CCUnix.Infix)

Module CCUnix.Infix

val (?|) : ('a, Stdlib.Buffer.t, unit, call_result) format4 -> 'a

Infix version of call.

  • since 0.11
val (?|&) : ('a, Stdlib.Buffer.t, unit, async_call_result) format4 -> 'a

Infix version of async_call.

  • since 0.11
\ No newline at end of file +Infix (containers.CCUnix.Infix)

Module CCUnix.Infix

val (?|) : ('a, Stdlib.Buffer.t, unit, call_result) format4 -> 'a

Infix version of call.

  • since 0.11
val (?|&) : ('a, Stdlib.Buffer.t, unit, async_call_result) format4 -> 'a

Infix version of async_call.

  • since 0.11
diff --git a/dev/containers/CCUnix/index.html b/dev/containers/CCUnix/index.html index 393c0699..920d5b75 100644 --- a/dev/containers/CCUnix/index.html +++ b/dev/containers/CCUnix/index.html @@ -1,22 +1,22 @@ -CCUnix (containers.CCUnix)

Module CCUnix

High-level Functions on top of Unix

Some useful functions built on top of Unix.

status: unstable

  • since 0.10
type 'a or_error = ('a, string) result
type 'a gen = unit -> 'a option

Calling Commands

val escape_str : string -> string

Escape a string so it can be a shell argument.

type call_result = +CCUnix (containers.CCUnix)

Module CCUnix

High-level Functions on top of Unix

Some useful functions built on top of Unix.

status: unstable

  • since 0.10
type 'a or_error = ('a, string) result
type 'a gen = unit -> 'a option

Calling Commands

val escape_str : string -> string

Escape a string so it can be a shell argument.

type call_result = < stdout : string ; stderr : string ; status : Unix.process_status ; errcode : int >
val call_full : - ?bufsize:int -> - ?stdin:[ `Gen of string gen | `Str of string ] -> - ?env:string array -> + ?bufsize:int -> + ?stdin:[ `Gen of string gen | `Str of string ] -> + ?env:string array -> ('a, Stdlib.Buffer.t, unit, call_result) format4 -> 'a

call_full cmd wraps the result of Unix.open_process_full cmd into an object. It reads the full stdout and stderr of the subprocess before returning. cmd can be a format string as in Printf.

  • parameter stdin

    if provided, the generator or string is consumed and fed to the subprocess input channel, which is then closed.

  • parameter bufsize

    buffer size used to read stdout and stderr.

  • parameter env

    environment to run the command in.

    Example:

    # CCUnix.call_full "ls %s" (CCUnix.escape_str "/");;
val call : - ?bufsize:int -> - ?stdin:[ `Gen of string gen | `Str of string ] -> - ?env:string array -> + ?bufsize:int -> + ?stdin:[ `Gen of string gen | `Str of string ] -> + ?env:string array -> ('a, Stdlib.Buffer.t, unit, string * string * int) format4 -> 'a

call cmd is similar to call_full but returns a tuple stdout, stderr, errcode instead of an object.

val call_stdout : - ?bufsize:int -> - ?stdin:[ `Gen of string gen | `Str of string ] -> - ?env:string array -> + ?bufsize:int -> + ?stdin:[ `Gen of string gen | `Str of string ] -> + ?env:string array -> ('a, Stdlib.Buffer.t, unit, string) format4 -> 'a
type line = string
type async_call_result = < stdout : line gen @@ -28,30 +28,30 @@ ; close_all : unit ; wait : Unix.process_status ; wait_errcode : int >

A subprocess for interactive usage (read/write channels line by line)

  • since 0.11
val async_call : - ?env:string array -> + ?env:string array -> ('a, Stdlib.Buffer.t, unit, async_call_result) format4 -> 'a

Spawns a subprocess, like call, but the subprocess's channels are line generators and line sinks (for stdin). If p is async_call "cmd", then p#wait waits for the subprocess to die. Channels can be closed independently.

  • since 0.11

Accessors

  • since 0.11
val stdout : < stdout : 'a.. > -> 'a
val stderr : < stderr : 'a.. > -> 'a
val status : < status : 'a.. > -> 'a
val errcode : < errcode : 'a.. > -> 'a

Simple IO

val with_in : - ?mode:int -> - ?flags:Unix.open_flag list -> + ?mode:int -> + ?flags:Unix.open_flag list -> string -> - f:(in_channel -> 'a) -> + f:(in_channel -> 'a) -> 'a

Open an input file with the given optional flag list, calls the function on the input channel. When the function raises or returns, the channel is closed.

  • parameter flags

    opening flags. Unix.O_RDONLY is used in any cases.

  • since 0.16
val with_out : - ?mode:int -> - ?flags:Unix.open_flag list -> + ?mode:int -> + ?flags:Unix.open_flag list -> string -> - f:(out_channel -> 'a) -> - 'a

Same as with_in but for an output channel.

  • parameter flags

    opening flags (default [Unix.O_CREAT; Unix.O_TRUNC]) Unix.O_WRONLY is used in any cases.

  • since 0.16

Subprocesses

val with_process_in : string -> f:(in_channel -> 'a) -> 'a

Open a shell command in a subprocess and obtain a handle to its stdout.

CCUnix.with_process_in "ls /tmp" ~f:CCIO.read_lines_l;;
  • since 0.16
val with_process_out : string -> f:(out_channel -> 'a) -> 'a

Open a shell command in a subprocess and obtain a handle to its stdin.

  • since 0.16
type process_full = + f:(out_channel -> 'a) -> + 'a

Same as with_in but for an output channel.

  • parameter flags

    opening flags (default [Unix.O_CREAT; Unix.O_TRUNC]) Unix.O_WRONLY is used in any cases.

  • since 0.16

Subprocesses

val with_process_in : string -> f:(in_channel -> 'a) -> 'a

Open a shell command in a subprocess and obtain a handle to its stdout.

CCUnix.with_process_in "ls /tmp" ~f:CCIO.read_lines_l;;
  • since 0.16
val with_process_out : string -> f:(out_channel -> 'a) -> 'a

Open a shell command in a subprocess and obtain a handle to its stdin.

  • since 0.16
type process_full = < stdin : out_channel ; stdout : in_channel ; stderr : in_channel ; close : Unix.process_status >

Handle to a subprocess.

  • since 0.16
val with_process_full : - ?env:string array -> + ?env:string array -> string -> - f:(process_full -> 'a) -> + f:(process_full -> 'a) -> 'a

Open a subprocess and obtain a handle to its channels.

  • parameter env

    environment to pass to the subprocess.

  • since 0.16
val ensure_session_leader : unit -> unit

On unix, call Unix.setsid() to make sure subprocesses die at the same time as the current process. Does nothing on windows. Idempotent: it can be called several times but will only have effects, if any, the first time.

  • since 2.8

Networking

val with_connection : Unix.sockaddr -> - f:(in_channel -> out_channel -> 'a) -> + f:(in_channel -> out_channel -> 'a) -> 'a

Wrap Unix.open_connection with a handler.

  • since 0.16
exception ExitServer
val establish_server : Unix.sockaddr -> - f:(in_channel -> out_channel -> _) -> - unit

Listen on the address and calls the handler in a blocking fashion. Using Thread is recommended if handlers might take time. The callback should raise ExitServer to stop the loop.

  • since 0.16

File lock

val with_file_lock : kind:[ `Read | `Write ] -> string -> (unit -> 'a) -> 'a

with_file_lock ~kind filename f puts a lock on the offset 0 of the file named filename, calls f and returns its result after the file is unlocked. If f () raises an exception the exception is re-raised after the file is unlocked.

  • parameter kind

    specifies whether the lock is read-only or read-write.

  • since 1.2

Infix Functions

module Infix : sig ... end
include module type of Infix
val (?|) : ('a, Stdlib.Buffer.t, unit, call_result) format4 -> 'a

Infix version of call.

  • since 0.11
val (?|&) : ('a, Stdlib.Buffer.t, unit, async_call_result) format4 -> 'a

Infix version of async_call.

  • since 0.11

Temporary directory

val with_temp_dir : ?mode:int -> ?dir:string -> string -> (string -> 'a) -> 'a

Create a temporary directory, call the function, and then destroy the directory afterwards. Usage with_temp_dir pattern f.

  • parameter pattern

    the naming pattern for the temporary directory. Helps avoiding collisions.

  • parameter mode

    mode for the directory

  • parameter dir

    the directory under which to make a temporary directory (default /tmp)

    Note that this is implemented following the discussion at: https://discuss.ocaml.org/t/how-to-create-a-temporary-directory-in-ocaml/1815/

  • since 2.8
\ No newline at end of file + f:(in_channel -> out_channel -> _) -> + unit

Listen on the address and calls the handler in a blocking fashion. Using Thread is recommended if handlers might take time. The callback should raise ExitServer to stop the loop.

  • since 0.16

File lock

val with_file_lock : kind:[ `Read | `Write ] -> string -> (unit -> 'a) -> 'a

with_file_lock ~kind filename f puts a lock on the offset 0 of the file named filename, calls f and returns its result after the file is unlocked. If f () raises an exception the exception is re-raised after the file is unlocked.

  • parameter kind

    specifies whether the lock is read-only or read-write.

  • since 1.2

Infix Functions

module Infix : sig ... end
include module type of Infix
val (?|) : ('a, Stdlib.Buffer.t, unit, call_result) format4 -> 'a

Infix version of call.

  • since 0.11
val (?|&) : ('a, Stdlib.Buffer.t, unit, async_call_result) format4 -> 'a

Infix version of async_call.

  • since 0.11

Temporary directory

val with_temp_dir : ?mode:int -> ?dir:string -> string -> (string -> 'a) -> 'a

Create a temporary directory, call the function, and then destroy the directory afterwards. Usage with_temp_dir pattern f.

  • parameter pattern

    the naming pattern for the temporary directory. Helps avoiding collisions.

  • parameter mode

    mode for the directory

  • parameter dir

    the directory under which to make a temporary directory (default /tmp)

    Note that this is implemented following the discussion at: https://discuss.ocaml.org/t/how-to-create-a-temporary-directory-in-ocaml/1815/

  • since 2.8
diff --git a/dev/containers/CCUtf8_string/index.html b/dev/containers/CCUtf8_string/index.html index 977cdab2..6f0e6c8a 100644 --- a/dev/containers/CCUtf8_string/index.html +++ b/dev/containers/CCUtf8_string/index.html @@ -1,2 +1,2 @@ -CCUtf8_string (containers.CCUtf8_string)

Module CCUtf8_string

Unicode String, in UTF8

A unicode string represented by a utf8 bytestring. This representation is convenient for manipulating normal OCaml strings that are encoded in UTF8.

We perform only basic decoding and encoding between codepoints and bytestrings. For more elaborate operations, please use the excellent Uutf.

status: experimental

  • since 2.1
type uchar = Stdlib.Uchar.t
type 'a gen = unit -> 'a option
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type t = private string

A UTF8 string

val equal : t -> t -> bool
val hash : t -> int
val compare : t -> t -> int
val pp : Stdlib.Format.formatter -> t -> unit
val to_string : t -> string

Identity.

exception Malformed of string * int

Malformed string at given offset

val to_gen : ?idx:int -> t -> uchar gen

Generator of unicode codepoints.

  • parameter idx

    offset where to start the decoding.

val to_iter : ?idx:int -> t -> uchar iter

Iterator of unicode codepoints.

  • parameter idx

    offset where to start the decoding.

  • since 2.8
val to_seq : ?idx:int -> t -> uchar Stdlib.Seq.t

Iter of unicode codepoints. Renamed from to_std_seq since 3.0.

  • parameter idx

    offset where to start the decoding.

  • since 3.0
val to_list : ?idx:int -> t -> uchar list

List of unicode codepoints.

  • parameter idx

    offset where to start the decoding.

val fold : ?idx:int -> ('a -> uchar -> 'a) -> 'a -> t -> 'a
val iter : ?idx:int -> (uchar -> unit) -> t -> unit
val n_chars : t -> int

Number of characters.

val n_bytes : t -> int

Number of bytes.

val map : (uchar -> uchar) -> t -> t
val filter_map : (uchar -> uchar option) -> t -> t
val flat_map : (uchar -> t) -> t -> t
val empty : t

Empty string.

  • since 3.5
val append : t -> t -> t

Append two string together.

val concat : t -> t list -> t

concat sep l concatenates each string in l, inserting sep in between each string. Similar to String.concat.

val of_uchar : uchar -> t

of_char c is a string with only one unicode char in it.

  • since 3.5
val make : int -> uchar -> t

make n c makes a new string with n copies of c in it.

  • since 3.5
val of_seq : uchar Stdlib.Seq.t -> t

Build a string from unicode codepoints Renamed from of_std_seq since 3.0.

  • since 3.0
val of_iter : uchar iter -> t

Build a string from unicode codepoints

  • since 2.8
val uchar_to_bytes : uchar -> char iter

Translate the unicode codepoint to a list of utf-8 bytes. This can be used, for example, in combination with Buffer.add_char on a pre-allocated buffer to add the bytes one by one (despite its name, Buffer.add_char takes individual bytes, not unicode codepoints).

  • since 3.2
val of_gen : uchar gen -> t
val of_list : uchar list -> t
val of_string_exn : string -> t

Validate string by checking it is valid UTF8.

  • raises Invalid_argument

    if the string is not valid UTF8.

val of_string : string -> t option

Safe version of of_string_exn.

val is_valid : string -> bool

Valid UTF8?

val unsafe_of_string : string -> t

Conversion from a string without validating. CAUTION this is unsafe and can break all the other functions in this module. Use only if you're sure the string is valid UTF8. Upon iteration, if an invalid substring is met, Malformed will be raised.

\ No newline at end of file +CCUtf8_string (containers.CCUtf8_string)

Module CCUtf8_string

Unicode String, in UTF8

A unicode string represented by a utf8 bytestring. This representation is convenient for manipulating normal OCaml strings that are encoded in UTF8.

We perform only basic decoding and encoding between codepoints and bytestrings. For more elaborate operations, please use the excellent Uutf.

status: experimental

  • since 2.1
type uchar = Stdlib.Uchar.t
type 'a gen = unit -> 'a option
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type t = private string

A UTF8 string

val equal : t -> t -> bool
val hash : t -> int
val compare : t -> t -> int
val pp : Stdlib.Format.formatter -> t -> unit
val to_string : t -> string

Identity.

exception Malformed of string * int

Malformed string at given offset

val to_gen : ?idx:int -> t -> uchar gen

Generator of unicode codepoints.

  • parameter idx

    offset where to start the decoding.

val to_iter : ?idx:int -> t -> uchar iter

Iterator of unicode codepoints.

  • parameter idx

    offset where to start the decoding.

  • since 2.8
val to_seq : ?idx:int -> t -> uchar Stdlib.Seq.t

Iter of unicode codepoints. Renamed from to_std_seq since 3.0.

  • parameter idx

    offset where to start the decoding.

  • since 3.0
val to_list : ?idx:int -> t -> uchar list

List of unicode codepoints.

  • parameter idx

    offset where to start the decoding.

val fold : ?idx:int -> ('a -> uchar -> 'a) -> 'a -> t -> 'a
val iter : ?idx:int -> (uchar -> unit) -> t -> unit
val n_chars : t -> int

Number of characters.

val n_bytes : t -> int

Number of bytes.

val map : (uchar -> uchar) -> t -> t
val filter_map : (uchar -> uchar option) -> t -> t
val flat_map : (uchar -> t) -> t -> t
val empty : t

Empty string.

  • since 3.5
val append : t -> t -> t

Append two string together.

val concat : t -> t list -> t

concat sep l concatenates each string in l, inserting sep in between each string. Similar to String.concat.

val of_uchar : uchar -> t

of_char c is a string with only one unicode char in it.

  • since 3.5
val make : int -> uchar -> t

make n c makes a new string with n copies of c in it.

  • since 3.5
val of_seq : uchar Stdlib.Seq.t -> t

Build a string from unicode codepoints Renamed from of_std_seq since 3.0.

  • since 3.0
val of_iter : uchar iter -> t

Build a string from unicode codepoints

  • since 2.8
val uchar_to_bytes : uchar -> char iter

Translate the unicode codepoint to a list of utf-8 bytes. This can be used, for example, in combination with Buffer.add_char on a pre-allocated buffer to add the bytes one by one (despite its name, Buffer.add_char takes individual bytes, not unicode codepoints).

  • since 3.2
val of_gen : uchar gen -> t
val of_list : uchar list -> t
val of_string_exn : string -> t

Validate string by checking it is valid UTF8.

  • raises Invalid_argument

    if the string is not valid UTF8.

val of_string : string -> t option

Safe version of of_string_exn.

val is_valid : string -> bool

Valid UTF8?

val unsafe_of_string : string -> t

Conversion from a string without validating. CAUTION this is unsafe and can break all the other functions in this module. Use only if you're sure the string is valid UTF8. Upon iteration, if an invalid substring is met, Malformed will be raised.

diff --git a/dev/containers/CCVector/index.html b/dev/containers/CCVector/index.html index 7c8a4cd5..ccaa9bc7 100644 --- a/dev/containers/CCVector/index.html +++ b/dev/containers/CCVector/index.html @@ -1,13 +1,13 @@ -CCVector (containers.CCVector)

Module CCVector

Growable, mutable vector

type ro = [
  1. | `RO
]
type rw = [
  1. | `RW
]

Mutability is rw (read-write) or ro (read-only).

type ('a, 'mut) t

The type of a vector of elements of type 'a, with a mutability flat 'mut.

type 'a vector = ('a, rw) t

Type synonym: a 'a vector is mutable.

type 'a ro_vector = ('a, ro) t

Alias for immutable vectors.

  • since 0.15
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val freeze : ('a, _) t -> ('a, ro) t

Make an immutable vector (no copy! Don't use the old version).

val freeze_copy : ('a, _) t -> ('a, ro) t

Copy the vector into an immutable version.

val create : unit -> ('a, rw) t

Create a new, empty vector.

val create_with : ?capacity:int -> 'a -> ('a, rw) t

Create a new vector, the value is used to enforce the type the new vector.

  • parameter capacity

    the size of the underlying array.

val return : 'a -> ('a, 'mut) t

Singleton vector.

  • since 0.14
val make : int -> 'a -> ('a, 'mut) t

make n x makes a vector of size n, filled with x.

val init : int -> (int -> 'a) -> ('a, 'mut) t

Init the vector with the given function and size.

val clear : ('a, rw) t -> unit

Clear the content of the vector. This ensures that length v = 0 but the underlying array is kept, and possibly references to former elements, which are therefore not garbage collectible.

val clear_and_reset : ('a, rw) t -> unit

Clear the content of the vector, and deallocate the underlying array, removing references to all the elements. The elements can be collected.

  • since 2.8
val ensure_with : init:'a -> ('a, rw) t -> int -> unit

Hint to the vector that it should have at least the given capacity. This does not affect length v.

  • parameter init

    if capacity v = 0, used to enforce the type of the vector (see create_with).

  • raises Invalid_arg

    if the size is not suitable (negative, or too big for OCaml arrays)

  • since 0.14
val ensure : ('a, rw) t -> int -> unit

Hint to the vector that it should have at least the given capacity. Just a hint, will not be enforced if the vector is empty and init is not provided.

  • raises Invalid_arg

    if the size is not suitable (negative, or too big for OCaml arrays)

val is_empty : ('a, _) t -> bool

Is the vector empty?

val push : ('a, rw) t -> 'a -> unit

Add an element at the end of the vector.

val resize_with : ('a, rw) t -> (int -> 'a) -> int -> unit

resize_with vec f size resizes vector vec up to size, fills vector with calls to f on indexes [vec.size-1.. size - 1]. The contents and size of vec are untouched if size is inferior or equal to length vec.

  • raises Invalid_argument

    if the size is too big

  • since 3.7
val resize_with_init : ('a, rw) t -> init:'a -> int -> unit

resize_with_init vec init size resizes vector vec up to size, fills vector with calls to init on indexes [length vec -1.. size - 1]. The contents and size of vec are untouched if size is inferior or equal to length vec.

  • raises Invalid_argument

    if the size is too big

  • since 3.7
val append : ('a, rw) t -> ('a, _) t -> unit

append a b adds all elements of b to a.

val append_array : ('a, rw) t -> 'a array -> unit

Like append, with an array.

val append_iter : ('a, rw) t -> 'a iter -> unit

Append content of iterator.

  • since 2.8
val append_seq : ('a, rw) t -> 'a Stdlib.Seq.t -> unit

Append content of iterator. Renamed from append_std_seq since 3.0.

  • since 3.0
val append_list : ('a, rw) t -> 'a list -> unit

Append content of list.

  • since 0.14
val append_gen : ('a, rw) t -> 'a gen -> unit

Append content of generator.

  • since 0.20
val equal : 'a equal -> ('a, _) t equal
val compare : 'a ord -> ('a, _) t ord

Total ordering on vectors. Lexicographic comparison.

exception Empty

Raised on empty stack.

val pop : ('a, rw) t -> 'a option

Remove last element, or None.

val pop_exn : ('a, rw) t -> 'a

Remove last element, or raise an exception if empty.

  • raises Empty

    on an empty vector.

val top : ('a, _) t -> 'a option

Top element, if present.

  • since 0.6
val top_exn : ('a, _) t -> 'a

Top element, if present.

  • raises Empty

    on an empty vector.

  • since 0.6
val copy : ('a, _) t -> ('a, 'mut) t

Shallow copy (may give an immutable or mutable vector).

val truncate : ('a, rw) t -> int -> unit

Truncate to the given size (remove elements above this size). Does nothing if the parameter is bigger than the current size. truncate was called shrink.

  • since 3.0
val shrink_to_fit : ('a, _) t -> unit

Shrink internal array to fit the size of the vector

  • since 2.8
val member : eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool

Is the element a member of the vector?

val sort : ('a -> 'a -> int) -> ('a, _) t -> ('a, 'mut) t

Sort the vector, returning a copy of it that is sorted w.r.t the given ordering. The vector itself is unchanged. The underlying array of the new vector can be smaller than the original one.

val sort' : ('a -> 'a -> int) -> ('a, rw) t -> unit

Sort the vector in place (modifying it). This function change the size of the underlying array.

val uniq_sort : ('a -> 'a -> int) -> ('a, rw) t -> unit

Sort the array and remove duplicates, in place (e.g. modifying the vector itself).

val iter : ('a -> unit) -> ('a, _) t -> unit

Iterate on the vector's content.

val iteri : (int -> 'a -> unit) -> ('a, _) t -> unit

Iterate on the vector, with indexes.

val map : ('a -> 'b) -> ('a, _) t -> ('b, 'mut) t

Map elements of the vector, yielding a new vector.

val mapi : (int -> 'a -> 'b) -> ('a, _) t -> ('b, 'mut) t

map f v is just like map, but it also passes in the index of each element as the first argument to the function f.

  • since 2.8
val map_in_place : ('a -> 'a) -> ('a, _) t -> unit

Map elements of the vector in place

  • since 2.3
val filter : ('a -> bool) -> ('a, _) t -> ('a, 'mut) t

Filter elements from the vector. filter p v leaves v unchanged but returns a new vector that only contains elements of v satisfying p.

val filter_in_place : ('a -> bool) -> ('a, rw) t -> unit

Filter elements from the vector in place.

  • since 3.0
val fold : ('b -> 'a -> 'b) -> 'b -> ('a, _) t -> 'b

Fold on elements of the vector

val exists : ('a -> bool) -> ('a, _) t -> bool

Existential test (is there an element that satisfies the predicate?).

val for_all : ('a -> bool) -> ('a, _) t -> bool

Universal test (do all the elements satisfy the predicate?).

val find : ('a -> bool) -> ('a, _) t -> 'a option

Find an element that satisfies the predicate.

val find_exn : ('a -> bool) -> ('a, _) t -> 'a

Find an element that satisfies the predicate, or

  • raises Not_found

    if no element does.

val find_map : ('a -> 'b option) -> ('a, _) t -> 'b option

find_map f v returns the first Some y = f x for x in v, or None if f x = None for each x in v.

  • since 0.14
val filter_map : ('a -> 'b option) -> ('a, _) t -> ('b, 'mut) t

Map elements with a function, possibly filtering some of them out.

val filter_map_in_place : ('a -> 'a option) -> ('a, _) t -> unit

Filter-map elements of the vector in place

  • since 2.3
val flat_map : ('a -> ('b, _) t) -> ('a, _) t -> ('b, 'mut) t

Map each element to a sub-vector.

val flat_map_seq : ('a -> 'b Stdlib.Seq.t) -> ('a, _) t -> ('b, 'mut) t

Like flat_map, but using Seq for intermediate collections. Renamed from flat_map_std_seq since 3.0.

  • since 3.0
val flat_map_list : ('a -> 'b list) -> ('a, _) t -> ('b, 'mut) t

Like flat_map, but using list for intermediate collections.

  • since 0.14
val monoid_product : ('a -> 'b -> 'c) -> ('a, _) t -> ('b, _) t -> ('c, _) t

All combinaisons of tuples from the two vectors are passed to the function.

  • since 2.8
val (>>=) : ('a, _) t -> ('a -> ('b, _) t) -> ('b, 'mut) t

Infix version of flat_map.

val (>|=) : ('a, _) t -> ('a -> 'b) -> ('b, 'mut) t

Infix version of map.

val get : ('a, _) t -> int -> 'a

Access element by its index, or

  • raises Invalid_argument

    if bad index.

val set : ('a, rw) t -> int -> 'a -> unit

Modify element at given index, or

  • raises Invalid_argument

    if the index is invalid (i.e. not in [0.. length v-1]).

val remove_and_shift : ('a, rw) t -> int -> unit

remove_and_shift v i remove the i-th element from v. Move elements that are after the i-th in v, in linear time. Preserve the order of the elements in v. See remove_unordered for constant time removal function that doesn't preserve the order of elements.

  • since 3.0
val remove_unordered : ('a, rw) t -> int -> unit

remove_unordered v i remove the i-th element from v. Does NOT preserve the order of the elements in v (might swap with the last element). See remove_and_shift if you want to keep the ordering.

val insert : ('a, rw) t -> int -> 'a -> unit

insert v i x insert the given element at index i. Elements at location i and later are first shifted over in linear time before inserting x. Preserve the order of elements in v.

  • since 3.7
val rev : ('a, _) t -> ('a, 'mut) t

Reverse the vector.

val rev_in_place : ('a, rw) t -> unit

Reverse the vector in place.

  • since 0.14
val rev_iter : ('a -> unit) -> ('a, _) t -> unit

rev_iter f a is the same as iter f (rev a), only more efficient.

  • since 0.14
val size : ('a, _) t -> int

Number of elements in the vector.

val length : (_, _) t -> int

Synonym for size.

val capacity : (_, _) t -> int

Number of elements the vector can contain without being resized.

val unsafe_get_array : ('a, rw) t -> 'a array

Access the underlying shared array (do not modify!). unsafe_get_array v is longer than size v, but elements at higher index than size v are undefined (do not access!).

val (--) : int -> int -> (int, 'mut) t

Range of integers, either ascending or descending (both included, therefore the result is never empty). Example: 1 -- 10 returns the vector [1;2;3;4;5;6;7;8;9;10].

val (--^) : int -> int -> (int, 'mut) t

Range of integers, either ascending or descending, but excluding right. Example: 1 --^ 10 returns the vector [1;2;3;4;5;6;7;8;9].

  • since 0.17
val of_array : 'a array -> ('a, 'mut) t

of_array a returns a vector corresponding to the array a. Operates in O(n) time.

val of_list : 'a list -> ('a, 'mut) t
val to_array : ('a, _) t -> 'a array

to_array v returns an array corresponding to the vector v.

val to_list : ('a, _) t -> 'a list

Return a list with the elements contained in the vector.

val of_iter : ?init:('a, rw) t -> 'a iter -> ('a, rw) t

Convert an Iterator to a vector.

  • since 2.8.1
val of_seq : ?init:('a, rw) t -> 'a Stdlib.Seq.t -> ('a, rw) t

Convert an Iterator to a vector. Renamed from of_std_seq since 3.0.

  • since 3.0
val to_iter : ('a, _) t -> 'a iter

Return a iter with the elements contained in the vector.

  • since 2.8
val to_iter_rev : ('a, _) t -> 'a iter

to_iter_rev v returns the sequence of elements of v in reverse order, that is, the last elements of v are iterated on first.

  • since 2.8
val to_seq : ('a, _) t -> 'a Stdlib.Seq.t

Return an iterator with the elements contained in the vector. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_seq_rev : ('a, _) t -> 'a Stdlib.Seq.t

to_seq v returns the sequence of elements of v in reverse order, that is, the last elements of v are iterated on first. Renamed from to_std_seq since 3.0.

  • since 3.0
val slice : ('a, rw) t -> 'a array * int * int

Vector as an array slice. By doing it we expose the internal array, so be careful!.

val slice_iter : ('a, _) t -> int -> int -> 'a iter

slice_iter v start len is the sequence of elements from v.(start) to v.(start+len-1).

  • since 3.0
val of_gen : ?init:('a, rw) t -> 'a gen -> ('a, rw) t
val to_gen : ('a, _) t -> 'a gen
val to_string : - ?start:string -> - ?stop:string -> - ?sep:string -> +CCVector (containers.CCVector)

Module CCVector

Growable, mutable vector

type ro = [
  1. | `RO
]
type rw = [
  1. | `RW
]

Mutability is rw (read-write) or ro (read-only).

type ('a, 'mut) t

The type of a vector of elements of type 'a, with a mutability flat 'mut.

type 'a vector = ('a, rw) t

Type synonym: a 'a vector is mutable.

type 'a ro_vector = ('a, ro) t

Alias for immutable vectors.

  • since 0.15
type 'a iter = ('a -> unit) -> unit

Fast internal iterator.

  • since 2.8
type 'a gen = unit -> 'a option
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val freeze : ('a, _) t -> ('a, ro) t

Make an immutable vector (no copy! Don't use the old version).

val freeze_copy : ('a, _) t -> ('a, ro) t

Copy the vector into an immutable version.

val create : unit -> ('a, rw) t

Create a new, empty vector.

val create_with : ?capacity:int -> 'a -> ('a, rw) t

Create a new vector, the value is used to enforce the type the new vector.

  • parameter capacity

    the size of the underlying array.

val return : 'a -> ('a, 'mut) t

Singleton vector.

  • since 0.14
val make : int -> 'a -> ('a, 'mut) t

make n x makes a vector of size n, filled with x.

val init : int -> (int -> 'a) -> ('a, 'mut) t

Init the vector with the given function and size.

val clear : ('a, rw) t -> unit

Clear the content of the vector. This ensures that length v = 0 but the underlying array is kept, and possibly references to former elements, which are therefore not garbage collectible.

val clear_and_reset : ('a, rw) t -> unit

Clear the content of the vector, and deallocate the underlying array, removing references to all the elements. The elements can be collected.

  • since 2.8
val ensure_with : init:'a -> ('a, rw) t -> int -> unit

Hint to the vector that it should have at least the given capacity. This does not affect length v.

  • parameter init

    if capacity v = 0, used to enforce the type of the vector (see create_with).

  • raises Invalid_arg

    if the size is not suitable (negative, or too big for OCaml arrays)

  • since 0.14
val ensure : ('a, rw) t -> int -> unit

Hint to the vector that it should have at least the given capacity. Just a hint, will not be enforced if the vector is empty and init is not provided.

  • raises Invalid_arg

    if the size is not suitable (negative, or too big for OCaml arrays)

val is_empty : ('a, _) t -> bool

Is the vector empty?

val push : ('a, rw) t -> 'a -> unit

Add an element at the end of the vector.

val resize_with : ('a, rw) t -> (int -> 'a) -> int -> unit

resize_with vec f size resizes vector vec up to size, fills vector with calls to f on indexes [vec.size-1.. size - 1]. The contents and size of vec are untouched if size is inferior or equal to length vec.

  • raises Invalid_argument

    if the size is too big

  • since 3.7
val resize_with_init : ('a, rw) t -> init:'a -> int -> unit

resize_with_init vec init size resizes vector vec up to size, fills vector with calls to init on indexes [length vec -1.. size - 1]. The contents and size of vec are untouched if size is inferior or equal to length vec.

  • raises Invalid_argument

    if the size is too big

  • since 3.7
val append : ('a, rw) t -> ('a, _) t -> unit

append a b adds all elements of b to a.

val append_array : ('a, rw) t -> 'a array -> unit

Like append, with an array.

val append_iter : ('a, rw) t -> 'a iter -> unit

Append content of iterator.

  • since 2.8
val append_seq : ('a, rw) t -> 'a Stdlib.Seq.t -> unit

Append content of iterator. Renamed from append_std_seq since 3.0.

  • since 3.0
val append_list : ('a, rw) t -> 'a list -> unit

Append content of list.

  • since 0.14
val append_gen : ('a, rw) t -> 'a gen -> unit

Append content of generator.

  • since 0.20
val equal : 'a equal -> ('a, _) t equal
val compare : 'a ord -> ('a, _) t ord

Total ordering on vectors. Lexicographic comparison.

exception Empty

Raised on empty stack.

val pop : ('a, rw) t -> 'a option

Remove last element, or None.

val pop_exn : ('a, rw) t -> 'a

Remove last element, or raise an exception if empty.

  • raises Empty

    on an empty vector.

val top : ('a, _) t -> 'a option

Top element, if present.

  • since 0.6
val top_exn : ('a, _) t -> 'a

Top element, if present.

  • raises Empty

    on an empty vector.

  • since 0.6
val copy : ('a, _) t -> ('a, 'mut) t

Shallow copy (may give an immutable or mutable vector).

val truncate : ('a, rw) t -> int -> unit

Truncate to the given size (remove elements above this size). Does nothing if the parameter is bigger than the current size. truncate was called shrink.

  • since 3.0
val shrink_to_fit : ('a, _) t -> unit

Shrink internal array to fit the size of the vector

  • since 2.8
val member : eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool

Is the element a member of the vector?

val sort : ('a -> 'a -> int) -> ('a, _) t -> ('a, 'mut) t

Sort the vector, returning a copy of it that is sorted w.r.t the given ordering. The vector itself is unchanged. The underlying array of the new vector can be smaller than the original one.

val sort' : ('a -> 'a -> int) -> ('a, rw) t -> unit

Sort the vector in place (modifying it). This function change the size of the underlying array.

val uniq_sort : ('a -> 'a -> int) -> ('a, rw) t -> unit

Sort the array and remove duplicates, in place (e.g. modifying the vector itself).

val iter : ('a -> unit) -> ('a, _) t -> unit

Iterate on the vector's content.

val iteri : (int -> 'a -> unit) -> ('a, _) t -> unit

Iterate on the vector, with indexes.

val map : ('a -> 'b) -> ('a, _) t -> ('b, 'mut) t

Map elements of the vector, yielding a new vector.

val mapi : (int -> 'a -> 'b) -> ('a, _) t -> ('b, 'mut) t

map f v is just like map, but it also passes in the index of each element as the first argument to the function f.

  • since 2.8
val map_in_place : ('a -> 'a) -> ('a, _) t -> unit

Map elements of the vector in place

  • since 2.3
val filter : ('a -> bool) -> ('a, _) t -> ('a, 'mut) t

Filter elements from the vector. filter p v leaves v unchanged but returns a new vector that only contains elements of v satisfying p.

val filter_in_place : ('a -> bool) -> ('a, rw) t -> unit

Filter elements from the vector in place.

  • since 3.0
val fold : ('b -> 'a -> 'b) -> 'b -> ('a, _) t -> 'b

Fold on elements of the vector

val exists : ('a -> bool) -> ('a, _) t -> bool

Existential test (is there an element that satisfies the predicate?).

val for_all : ('a -> bool) -> ('a, _) t -> bool

Universal test (do all the elements satisfy the predicate?).

val find : ('a -> bool) -> ('a, _) t -> 'a option

Find an element that satisfies the predicate.

val find_exn : ('a -> bool) -> ('a, _) t -> 'a

Find an element that satisfies the predicate, or

  • raises Not_found

    if no element does.

val find_map : ('a -> 'b option) -> ('a, _) t -> 'b option

find_map f v returns the first Some y = f x for x in v, or None if f x = None for each x in v.

  • since 0.14
val filter_map : ('a -> 'b option) -> ('a, _) t -> ('b, 'mut) t

Map elements with a function, possibly filtering some of them out.

val filter_map_in_place : ('a -> 'a option) -> ('a, _) t -> unit

Filter-map elements of the vector in place

  • since 2.3
val flat_map : ('a -> ('b, _) t) -> ('a, _) t -> ('b, 'mut) t

Map each element to a sub-vector.

val flat_map_seq : ('a -> 'b Stdlib.Seq.t) -> ('a, _) t -> ('b, 'mut) t

Like flat_map, but using Seq for intermediate collections. Renamed from flat_map_std_seq since 3.0.

  • since 3.0
val flat_map_list : ('a -> 'b list) -> ('a, _) t -> ('b, 'mut) t

Like flat_map, but using list for intermediate collections.

  • since 0.14
val monoid_product : ('a -> 'b -> 'c) -> ('a, _) t -> ('b, _) t -> ('c, _) t

All combinaisons of tuples from the two vectors are passed to the function.

  • since 2.8
val (>>=) : ('a, _) t -> ('a -> ('b, _) t) -> ('b, 'mut) t

Infix version of flat_map.

val (>|=) : ('a, _) t -> ('a -> 'b) -> ('b, 'mut) t

Infix version of map.

val get : ('a, _) t -> int -> 'a

Access element by its index, or

  • raises Invalid_argument

    if bad index.

val set : ('a, rw) t -> int -> 'a -> unit

Modify element at given index, or

  • raises Invalid_argument

    if the index is invalid (i.e. not in [0.. length v-1]).

val remove_and_shift : ('a, rw) t -> int -> unit

remove_and_shift v i remove the i-th element from v. Move elements that are after the i-th in v, in linear time. Preserve the order of the elements in v. See remove_unordered for constant time removal function that doesn't preserve the order of elements.

  • since 3.0
val remove_unordered : ('a, rw) t -> int -> unit

remove_unordered v i remove the i-th element from v. Does NOT preserve the order of the elements in v (might swap with the last element). See remove_and_shift if you want to keep the ordering.

val insert : ('a, rw) t -> int -> 'a -> unit

insert v i x insert the given element at index i. Elements at location i and later are first shifted over in linear time before inserting x. Preserve the order of elements in v.

  • since 3.7
val rev : ('a, _) t -> ('a, 'mut) t

Reverse the vector.

val rev_in_place : ('a, rw) t -> unit

Reverse the vector in place.

  • since 0.14
val rev_iter : ('a -> unit) -> ('a, _) t -> unit

rev_iter f a is the same as iter f (rev a), only more efficient.

  • since 0.14
val size : ('a, _) t -> int

Number of elements in the vector.

val length : (_, _) t -> int

Synonym for size.

val capacity : (_, _) t -> int

Number of elements the vector can contain without being resized.

val unsafe_get_array : ('a, rw) t -> 'a array

Access the underlying shared array (do not modify!). unsafe_get_array v is longer than size v, but elements at higher index than size v are undefined (do not access!).

val (--) : int -> int -> (int, 'mut) t

Range of integers, either ascending or descending (both included, therefore the result is never empty). Example: 1 -- 10 returns the vector [1;2;3;4;5;6;7;8;9;10].

val (--^) : int -> int -> (int, 'mut) t

Range of integers, either ascending or descending, but excluding right. Example: 1 --^ 10 returns the vector [1;2;3;4;5;6;7;8;9].

  • since 0.17
val of_array : 'a array -> ('a, 'mut) t

of_array a returns a vector corresponding to the array a. Operates in O(n) time.

val of_list : 'a list -> ('a, 'mut) t
val to_array : ('a, _) t -> 'a array

to_array v returns an array corresponding to the vector v.

val to_list : ('a, _) t -> 'a list

Return a list with the elements contained in the vector.

val of_iter : ?init:('a, rw) t -> 'a iter -> ('a, rw) t

Convert an Iterator to a vector.

  • since 2.8.1
val of_seq : ?init:('a, rw) t -> 'a Stdlib.Seq.t -> ('a, rw) t

Convert an Iterator to a vector. Renamed from of_std_seq since 3.0.

  • since 3.0
val to_iter : ('a, _) t -> 'a iter

Return a iter with the elements contained in the vector.

  • since 2.8
val to_iter_rev : ('a, _) t -> 'a iter

to_iter_rev v returns the sequence of elements of v in reverse order, that is, the last elements of v are iterated on first.

  • since 2.8
val to_seq : ('a, _) t -> 'a Stdlib.Seq.t

Return an iterator with the elements contained in the vector. Renamed from to_std_seq since 3.0.

  • since 3.0
val to_seq_rev : ('a, _) t -> 'a Stdlib.Seq.t

to_seq v returns the sequence of elements of v in reverse order, that is, the last elements of v are iterated on first. Renamed from to_std_seq since 3.0.

  • since 3.0
val slice : ('a, rw) t -> 'a array * int * int

Vector as an array slice. By doing it we expose the internal array, so be careful!.

val slice_iter : ('a, _) t -> int -> int -> 'a iter

slice_iter v start len is the sequence of elements from v.(start) to v.(start+len-1).

  • since 3.0
val of_gen : ?init:('a, rw) t -> 'a gen -> ('a, rw) t
val to_gen : ('a, _) t -> 'a gen
val to_string : + ?start:string -> + ?stop:string -> + ?sep:string -> ('a -> string) -> ('a, _) t -> string

Print the vector in a string

  • since 2.7
val pp : - ?pp_start:unit printer -> - ?pp_stop:unit printer -> - ?pp_sep:unit printer -> + ?pp_start:unit printer -> + ?pp_stop:unit printer -> + ?pp_sep:unit printer -> 'a printer -> - ('a, _) t printer

pp ~pp_start ~pp_stop ~pp_sep pp_item ppf v formats the vector v on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

val let+ : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
  • since 2.8
val and+ : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
val let* : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
  • since 2.8
val and* : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
\ No newline at end of file + ('a, _) t printer

pp ~pp_start ~pp_stop ~pp_sep pp_item ppf v formats the vector v on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").

val let+ : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
  • since 2.8
val and+ : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
val let* : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
  • since 2.8
val and* : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
  • since 2.8
diff --git a/dev/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html b/dev/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html index 03c09135..7eb3bc7e 100644 --- a/dev/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/dev/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (containers.Containers.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

\ No newline at end of file +H (containers.Containers.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

diff --git a/dev/containers/Containers/Hashtbl/MakeSeeded/index.html b/dev/containers/Containers/Hashtbl/MakeSeeded/index.html index 495eb468..dab9c947 100644 --- a/dev/containers/Containers/Hashtbl/MakeSeeded/index.html +++ b/dev/containers/Containers/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (containers.Containers.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.0

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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
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
\ No newline at end of file +MakeSeeded (containers.Containers.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.0

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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
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
diff --git a/dev/containers/Containers/Hashtbl/index.html b/dev/containers/Containers/Hashtbl/index.html index 7aa86e9a..911e8af6 100644 --- a/dev/containers/Containers/Hashtbl/index.html +++ b/dev/containers/Containers/Hashtbl/index.html @@ -1,8 +1,8 @@ -Hashtbl (containers.Containers.Hashtbl)

Module Containers.Hashtbl

  • since 0.14
include module type of Stdlib.Hashtbl +Hashtbl (containers.Containers.Hashtbl)

Module Containers.Hashtbl

  • since 0.14
include module type of Stdlib.Hashtbl with type statistics = Stdlib.Hashtbl.statistics and module Make = Stdlib.Hashtbl.Make - and type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.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.0

    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.0
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. 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.)

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.0
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c

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.

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.0
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03.0
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.0
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.0
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.0

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 replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the given bindings to the table, using replace

  • 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 =
+   and type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.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.0

    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.0
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. 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.)

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.0
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c

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.

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.0
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03.0
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.0
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.0
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.0

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 replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the given bindings to the table, using replace

  • 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
@@ -13,32 +13,32 @@ 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 = 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 = 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.0
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.0
include module type of struct include CCHashtbl.Poly end
val get : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> 'b option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> default:'b -> 'b

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a CCHashtbl.iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b CCHashtbl.iter

values tbl f iterates on values in the table tbl.

val keys_list : ('a, 'b) Stdlib.Hashtbl.t -> 'a list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t -> 'b list

values_list tbl is the list of values in tbl.

  • since 0.8
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Stdlib.Hashtbl.t -> 'c list

map_list f tbl maps on a tbl's items. Collect into a list.

val incr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter

Iterate on bindings in the table.

  • since 2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t -> 'a -> 'b -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : - f:('a -> 'b -> 'b -> 'b) -> + 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 = 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 = 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.0
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.0
include module type of struct include CCHashtbl.Poly end
val get : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> 'b option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> default:'b -> 'b

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a CCHashtbl.iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b CCHashtbl.iter

values tbl f iterates on values in the table tbl.

val keys_list : ('a, 'b) Stdlib.Hashtbl.t -> 'a list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t -> 'b list

values_list tbl is the list of values in tbl.

  • since 0.8
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Stdlib.Hashtbl.t -> 'c list

map_list f tbl maps on a tbl's items. Collect into a list.

val incr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter

Iterate on bindings in the table.

  • since 2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t -> 'a -> 'b -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : + f:('a -> 'b -> 'b -> 'b) -> ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_iter : ('a * 'b) CCHashtbl.iter -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order.

  • since 2.8
val of_iter_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) CCHashtbl.iter -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) Stdlib.Seq.t -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_iter_count : ('a, int) Stdlib.Hashtbl.t -> 'a CCHashtbl.iter -> unit

add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.

  • since 2.8
val add_seq_count : ('a, int) Stdlib.Hashtbl.t -> 'a Stdlib.Seq.t -> unit

add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.

  • since 3.0
val of_iter_count : 'a CCHashtbl.iter -> ('a, int) Stdlib.Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • since 2.8
val of_seq_count : 'a Stdlib.Seq.t -> ('a, int) Stdlib.Hashtbl.t

Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.

  • since 3.0
val to_list : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) list

to_list tbl returns the list of (key,value) bindings (order unspecified).

val of_list : ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.

val of_list_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val update : ('a, 'b) Stdlib.Hashtbl.t -> - f:('a -> 'b option -> 'b option) -> - k:'a -> - unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : - ?pp_start:unit CCHashtbl.printer -> - ?pp_stop:unit CCHashtbl.printer -> - ?pp_sep:unit CCHashtbl.printer -> - ?pp_arrow:unit CCHashtbl.printer -> + f:('a -> 'b option -> 'b option) -> + k:'a -> + unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : + ?pp_start:unit CCHashtbl.printer -> + ?pp_stop:unit CCHashtbl.printer -> + ?pp_sep:unit CCHashtbl.printer -> + ?pp_arrow:unit CCHashtbl.printer -> 'a CCHashtbl.printer -> 'b CCHashtbl.printer -> - ('a, 'b) Stdlib.Hashtbl.t CCHashtbl.printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
module type S' = CCHashtbl.S
module Make' = CCHashtbl.Make
\ No newline at end of file + ('a, 'b) Stdlib.Hashtbl.t CCHashtbl.printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
module type S' = CCHashtbl.S
module Make' = CCHashtbl.Make
diff --git a/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html b/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html index 2fc11911..8678bdd4 100644 --- a/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html +++ b/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (containers.Containers.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 (containers.Containers.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/dev/containers/Containers/Hashtbl/module-type-S/index.html b/dev/containers/Containers/Hashtbl/module-type-S/index.html index 90827084..a0e9fd18 100644 --- a/dev/containers/Containers/Hashtbl/module-type-S/index.html +++ b/dev/containers/Containers/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers.Containers.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.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00.0
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
\ No newline at end of file +S (containers.Containers.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.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00.0
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
diff --git a/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html b/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html index 9faa60da..f455db2c 100644 --- a/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html +++ b/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (containers.Containers.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

\ No newline at end of file +SeededHashedType (containers.Containers.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

diff --git a/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html b/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html index 2758ea56..bdfb2a66 100644 --- a/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html +++ b/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (containers.Containers.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor 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
  • since 4.05.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
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
\ No newline at end of file +SeededS (containers.Containers.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor 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
  • since 4.05.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
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
diff --git a/dev/containers/Containers/index.html b/dev/containers/Containers/index.html index d671192e..17b77a79 100644 --- a/dev/containers/Containers/index.html +++ b/dev/containers/Containers/index.html @@ -1,2 +1,2 @@ -Containers (containers.Containers)

Module Containers

Drop-In replacement to Stdlib

module Array = CCArray
module Bool = CCBool
module Byte_buffer = CCByte_buffer
module Char = CCChar
module Equal = CCEqual
module Either = CCEither
module Float = CCFloat
module Format = CCFormat
module Fun = CCFun
module Hash = CCHash
module Hashtbl : sig ... end
module Heap = CCHeap
module Int = CCInt
module Int32 = CCInt32
module Int64 = CCInt64
module IO = CCIO
module List = CCList
module Map = CCMap
module Nativeint = CCNativeint
module Option = CCOption
module Ord = CCOrd
module Pair = CCPair
module Parse = CCParse
module Random = CCRandom
module Ref = CCRef
module Result = CCResult
module Seq = CCSeq
module Set = CCSet
module String = CCString
module Vector = CCVector
module Monomorphic = CCMonomorphic
module Utf8_string = CCUtf8_string
module Unit = CCUnit
module Atomic = CCAtomic
module Sexp = CCSexp
module Sexp_intf = CCSexp_intf
module Canonical_sexp = CCCanonical_sexp
module Stdlib = Stdlib
include module type of struct include Monomorphic end

Shadow unsafe functions and operators from Stdlib

  • since 2.0
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
val min : int -> int -> int
val max : int -> int -> int

Infix operators for Floats

val (=.) : float -> float -> bool
  • since 2.1
val (<>.) : float -> float -> bool
  • since 2.1
val (<.) : float -> float -> bool
  • since 2.1
val (>.) : float -> float -> bool
  • since 2.1
val (<=.) : float -> float -> bool
  • since 2.1
val (>=.) : float -> float -> bool
  • since 2.1

Shadow Dangerous Operators

val (==) : [ `Consider_using_CCEqual_physical ]
  • deprecated Please use CCEqual.physical or Stdlib.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • since 2.1
  • deprecated Please use [not CCEqual.physical] or Stdlib.(!=) instead.
\ No newline at end of file +Containers (containers.Containers)

Module Containers

Drop-In replacement to Stdlib

module Array = CCArray
module Bool = CCBool
module Byte_buffer = CCByte_buffer
module Char = CCChar
module Equal = CCEqual
module Either = CCEither
module Float = CCFloat
module Format = CCFormat
module Fun = CCFun
module Hash = CCHash
module Hashtbl : sig ... end
module Heap = CCHeap
module Int = CCInt
module Int32 = CCInt32
module Int64 = CCInt64
module IO = CCIO
module List = CCList
module Map = CCMap
module Nativeint = CCNativeint
module Option = CCOption
module Ord = CCOrd
module Pair = CCPair
module Parse = CCParse
module Random = CCRandom
module Ref = CCRef
module Result = CCResult
module Seq = CCSeq
module Set = CCSet
module String = CCString
module Vector = CCVector
module Monomorphic = CCMonomorphic
module Utf8_string = CCUtf8_string
module Unit = CCUnit
module Atomic = CCAtomic
module Sexp = CCSexp
module Sexp_intf = CCSexp_intf
module Canonical_sexp = CCCanonical_sexp
module Stdlib = Stdlib
include module type of struct include Monomorphic end

Shadow unsafe functions and operators from Stdlib

  • since 2.0
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
val min : int -> int -> int
val max : int -> int -> int

Infix operators for Floats

val (=.) : float -> float -> bool
  • since 2.1
val (<>.) : float -> float -> bool
  • since 2.1
val (<.) : float -> float -> bool
  • since 2.1
val (>.) : float -> float -> bool
  • since 2.1
val (<=.) : float -> float -> bool
  • since 2.1
val (>=.) : float -> float -> bool
  • since 2.1

Shadow Dangerous Operators

val (==) : [ `Consider_using_CCEqual_physical ]
  • deprecated Please use CCEqual.physical or Stdlib.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • since 2.1
  • deprecated Please use [not CCEqual.physical] or Stdlib.(!=) instead.
diff --git a/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/argument-1-H/index.html b/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/argument-1-H/index.html index 6e5bec61..3ddce036 100644 --- a/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (containers.ContainersLabels.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

\ No newline at end of file +H (containers.ContainersLabels.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

diff --git a/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/index.html b/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/index.html index a7d24432..bc281d9c 100644 --- a/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/index.html +++ b/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (containers.ContainersLabels.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).

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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
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
\ No newline at end of file +MakeSeeded (containers.ContainersLabels.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).

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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
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
diff --git a/dev/containers/ContainersLabels/Hashtbl/index.html b/dev/containers/ContainersLabels/Hashtbl/index.html index 4ef70ccb..ad1dc813 100644 --- a/dev/containers/ContainersLabels/Hashtbl/index.html +++ b/dev/containers/ContainersLabels/Hashtbl/index.html @@ -1,8 +1,8 @@ -Hashtbl (containers.ContainersLabels.Hashtbl)

Module ContainersLabels.Hashtbl

include module type of Stdlib.Hashtbl +Hashtbl (containers.ContainersLabels.Hashtbl)

Module ContainersLabels.Hashtbl

  • since 0.14
include module type of Stdlib.Hashtbl with type statistics = Stdlib.Hashtbl.statistics and module Make = Stdlib.Hashtbl.Make - and type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.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.0

    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.0
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. 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.)

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.0
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c

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.

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.0
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03.0
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.0
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.0
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.0

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 replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the given bindings to the table, using replace

  • 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 =
+   and type ('a, 'b) t = ('a, 'b) Stdlib.Hashtbl.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.0

    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.0
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. 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.)

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.0
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c

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.

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.0
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03.0
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.0
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.0
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.0

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 replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the given bindings to the table, using replace

  • 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
@@ -13,32 +13,32 @@ 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 = 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 = 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.0
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.0
include module type of struct include CCHashtbl.Poly end
val get : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> 'b option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> default:'b -> 'b

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a CCHashtbl.iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b CCHashtbl.iter

values tbl f iterates on values in the table tbl.

val keys_list : ('a, 'b) Stdlib.Hashtbl.t -> 'a list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t -> 'b list

values_list tbl is the list of values in tbl.

  • since 0.8
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Stdlib.Hashtbl.t -> 'c list

map_list f tbl maps on a tbl's items. Collect into a list.

val incr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter

Iterate on bindings in the table.

  • since 2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t -> 'a -> 'b -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : - f:('a -> 'b -> 'b -> 'b) -> + 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 = 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 = 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.0
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.0
include module type of struct include CCHashtbl.Poly end
val get : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> 'b option

get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.

val get_or : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> default:'b -> 'b

get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).

  • since 0.16
val keys : ('a, 'b) Stdlib.Hashtbl.t -> 'a CCHashtbl.iter

keys tbl f iterates on keys (similar order as Hashtbl.iter).

val values : ('a, 'b) Stdlib.Hashtbl.t -> 'b CCHashtbl.iter

values tbl f iterates on values in the table tbl.

val keys_list : ('a, 'b) Stdlib.Hashtbl.t -> 'a list

keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.

  • since 0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t -> 'b list

values_list tbl is the list of values in tbl.

  • since 0.8
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Stdlib.Hashtbl.t -> 'c list

map_list f tbl maps on a tbl's items. Collect into a list.

val incr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).

  • parameter by

    if specified, the int value is incremented by by rather than 1.

  • since 0.16
val decr : ?by:int -> ('a, int) Stdlib.Hashtbl.t -> 'a -> unit

decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.

  • since 0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter

Iterate on bindings in the table.

  • since 2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t -> 'a -> 'b -> unit

add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.

  • since 0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • since 2.8
val add_iter_with : + f:('a -> 'b -> 'b -> 'b) -> ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) CCHashtbl.iter -> unit

Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.

  • since 3.0
val add_seq_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) Stdlib.Seq.t -> unit

Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_iter : ('a * 'b) CCHashtbl.iter -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order.

  • since 2.8
val of_iter_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) CCHashtbl.iter -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. Renamed from of_std_seq since 3.0.

  • since 3.0
val of_seq_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) Stdlib.Seq.t -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val add_iter_count : ('a, int) Stdlib.Hashtbl.t -> 'a CCHashtbl.iter -> unit

add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.

  • since 2.8
val add_seq_count : ('a, int) Stdlib.Hashtbl.t -> 'a Stdlib.Seq.t -> unit

add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.

  • since 3.0
val of_iter_count : 'a CCHashtbl.iter -> ('a, int) Stdlib.Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • since 2.8
val of_seq_count : 'a Stdlib.Seq.t -> ('a, int) Stdlib.Hashtbl.t

Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.

  • since 3.0
val to_list : ('a, 'b) Stdlib.Hashtbl.t -> ('a * 'b) list

to_list tbl returns the list of (key,value) bindings (order unspecified).

val of_list : ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.

val of_list_with : - f:('a -> 'b -> 'b -> 'b) -> + f:('a -> 'b -> 'b -> 'b) -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.

  • since 3.3
val update : ('a, 'b) Stdlib.Hashtbl.t -> - f:('a -> 'b option -> 'b option) -> - k:'a -> - unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : - ?pp_start:unit CCHashtbl.printer -> - ?pp_stop:unit CCHashtbl.printer -> - ?pp_sep:unit CCHashtbl.printer -> - ?pp_arrow:unit CCHashtbl.printer -> + f:('a -> 'b option -> 'b option) -> + k:'a -> + unit

update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.

  • since 0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b

get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.

  • since 1.0
val pp : + ?pp_start:unit CCHashtbl.printer -> + ?pp_stop:unit CCHashtbl.printer -> + ?pp_sep:unit CCHashtbl.printer -> + ?pp_arrow:unit CCHashtbl.printer -> 'a CCHashtbl.printer -> 'b CCHashtbl.printer -> - ('a, 'b) Stdlib.Hashtbl.t CCHashtbl.printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

  • since 0.13
module type S' = CCHashtbl.S
module Make' = CCHashtbl.Make
\ No newline at end of file + ('a, 'b) Stdlib.Hashtbl.t CCHashtbl.printer

pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.

module type S' = CCHashtbl.S
module Make' = CCHashtbl.Make
diff --git a/dev/containers/ContainersLabels/Hashtbl/module-type-HashedType/index.html b/dev/containers/ContainersLabels/Hashtbl/module-type-HashedType/index.html index d20b331e..b08deef1 100644 --- a/dev/containers/ContainersLabels/Hashtbl/module-type-HashedType/index.html +++ b/dev/containers/ContainersLabels/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (containers.ContainersLabels.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 (containers.ContainersLabels.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/dev/containers/ContainersLabels/Hashtbl/module-type-S/index.html b/dev/containers/ContainersLabels/Hashtbl/module-type-S/index.html index 54900424..7f9f9ba8 100644 --- a/dev/containers/ContainersLabels/Hashtbl/module-type-S/index.html +++ b/dev/containers/ContainersLabels/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers.ContainersLabels.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.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00.0
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
\ No newline at end of file +S (containers.ContainersLabels.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.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00.0
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
diff --git a/dev/containers/ContainersLabels/Hashtbl/module-type-SeededHashedType/index.html b/dev/containers/ContainersLabels/Hashtbl/module-type-SeededHashedType/index.html index d75379cf..d756329a 100644 --- a/dev/containers/ContainersLabels/Hashtbl/module-type-SeededHashedType/index.html +++ b/dev/containers/ContainersLabels/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (containers.ContainersLabels.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

\ No newline at end of file +SeededHashedType (containers.ContainersLabels.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

diff --git a/dev/containers/ContainersLabels/Hashtbl/module-type-SeededS/index.html b/dev/containers/ContainersLabels/Hashtbl/module-type-SeededS/index.html index 2117f851..90ec4ace 100644 --- a/dev/containers/ContainersLabels/Hashtbl/module-type-SeededS/index.html +++ b/dev/containers/ContainersLabels/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (containers.ContainersLabels.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor 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
  • since 4.05.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
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
\ No newline at end of file +SeededS (containers.ContainersLabels.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor 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
  • since 4.05.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
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
diff --git a/dev/containers/ContainersLabels/index.html b/dev/containers/ContainersLabels/index.html index bca66d44..abfe7067 100644 --- a/dev/containers/ContainersLabels/index.html +++ b/dev/containers/ContainersLabels/index.html @@ -1,2 +1,2 @@ -ContainersLabels (containers.ContainersLabels)

Module ContainersLabels

Drop-In replacement to Stdlib

module Array = CCArrayLabels
module Bool = CCBool
module Byte_buffer = CCByte_buffer
module Char = CCChar
module Equal = CCEqualLabels
module Either = CCEither
module Float = CCFloat
module Format = CCFormat
module Fun = CCFun
module Hash = CCHash
module Hashtbl : sig ... end
module Heap = CCHeap
module Int = CCInt
module Int32 = CCInt32
module Int64 = CCInt64
module IO = CCIO
module List = CCListLabels
module Map = CCMap
module Nativeint = CCNativeint
module Option = CCOption
module Ord = CCOrd
module Pair = CCPair
module Parse = CCParse
module Random = CCRandom
module Ref = CCRef
module Result = CCResult
module Seq = CCSeq
module Set = CCSet
module String = CCStringLabels
module Vector = CCVector
module Monomorphic = CCMonomorphic
module Utf8_string = CCUtf8_string
module Sexp = CCSexp
module Sexp_intf = CCSexp_intf
module Stdlib = Stdlib
include module type of struct include Monomorphic end

Shadow unsafe functions and operators from Stdlib

  • since 2.0
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
val min : int -> int -> int
val max : int -> int -> int

Infix operators for Floats

val (=.) : float -> float -> bool
  • since 2.1
val (<>.) : float -> float -> bool
  • since 2.1
val (<.) : float -> float -> bool
  • since 2.1
val (>.) : float -> float -> bool
  • since 2.1
val (<=.) : float -> float -> bool
  • since 2.1
val (>=.) : float -> float -> bool
  • since 2.1

Shadow Dangerous Operators

val (==) : [ `Consider_using_CCEqual_physical ]
  • deprecated Please use CCEqual.physical or Stdlib.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • since 2.1
  • deprecated Please use [not CCEqual.physical] or Stdlib.(!=) instead.
\ No newline at end of file +ContainersLabels (containers.ContainersLabels)

Module ContainersLabels

Drop-In replacement to Stdlib

module Array = CCArrayLabels
module Bool = CCBool
module Byte_buffer = CCByte_buffer
module Char = CCChar
module Equal = CCEqualLabels
module Either = CCEither
module Float = CCFloat
module Format = CCFormat
module Fun = CCFun
module Hash = CCHash
module Hashtbl : sig ... end
module Heap = CCHeap
module Int = CCInt
module Int32 = CCInt32
module Int64 = CCInt64
module IO = CCIO
module List = CCListLabels
module Map = CCMap
module Nativeint = CCNativeint
module Option = CCOption
module Ord = CCOrd
module Pair = CCPair
module Parse = CCParse
module Random = CCRandom
module Ref = CCRef
module Result = CCResult
module Seq = CCSeq
module Set = CCSet
module String = CCStringLabels
module Vector = CCVector
module Monomorphic = CCMonomorphic
module Utf8_string = CCUtf8_string
module Sexp = CCSexp
module Sexp_intf = CCSexp_intf
module Stdlib = Stdlib
include module type of struct include Monomorphic end

Shadow unsafe functions and operators from Stdlib

  • since 2.0
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
val min : int -> int -> int
val max : int -> int -> int

Infix operators for Floats

val (=.) : float -> float -> bool
  • since 2.1
val (<>.) : float -> float -> bool
  • since 2.1
val (<.) : float -> float -> bool
  • since 2.1
val (>.) : float -> float -> bool
  • since 2.1
val (<=.) : float -> float -> bool
  • since 2.1
val (>=.) : float -> float -> bool
  • since 2.1

Shadow Dangerous Operators

val (==) : [ `Consider_using_CCEqual_physical ]
  • deprecated Please use CCEqual.physical or Stdlib.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • since 2.1
  • deprecated Please use [not CCEqual.physical] or Stdlib.(!=) instead.
diff --git a/dev/containers/Containers_bencode/Decode/index.html b/dev/containers/Containers_bencode/Decode/index.html index 85279b4d..197dfe9c 100644 --- a/dev/containers/Containers_bencode/Decode/index.html +++ b/dev/containers/Containers_bencode/Decode/index.html @@ -1,2 +1,2 @@ -Decode (containers.Containers_bencode.Decode)

Module Containers_bencode.Decode

Decoding

val of_string : string -> t option
val of_string_exn : string -> t

Parse string.

  • raises Failure

    if the string is not valid bencode.

\ No newline at end of file +Decode (containers.Containers_bencode.Decode)

Module Containers_bencode.Decode

Decoding

val of_string : string -> t option
val of_string_exn : string -> t

Parse string.

  • raises Failure

    if the string is not valid bencode.

diff --git a/dev/containers/Containers_bencode/Encode/index.html b/dev/containers/Containers_bencode/Encode/index.html index 778200ae..4624e0ac 100644 --- a/dev/containers/Containers_bencode/Encode/index.html +++ b/dev/containers/Containers_bencode/Encode/index.html @@ -1,2 +1,2 @@ -Encode (containers.Containers_bencode.Encode)

Module Containers_bencode.Encode

Encoding

val to_string : t -> string
val to_buffer : Stdlib.Buffer.t -> t -> unit
val to_chan : out_channel -> t -> unit
val to_fmt : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Encode (containers.Containers_bencode.Encode)

Module Containers_bencode.Encode

Encoding

val to_string : t -> string
val to_buffer : Stdlib.Buffer.t -> t -> unit
val to_chan : out_channel -> t -> unit
val to_fmt : Stdlib.Format.formatter -> t -> unit
diff --git a/dev/containers/Containers_bencode/Str_map/index.html b/dev/containers/Containers_bencode/Str_map/index.html index fa943287..db270f62 100644 --- a/dev/containers/Containers_bencode/Str_map/index.html +++ b/dev/containers/Containers_bencode/Str_map/index.html @@ -1,6 +1,6 @@ -Str_map (containers.Containers_bencode.Str_map)

Module Containers_bencode.Str_map

type key = Stdlib.String.t
type !'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a 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 : +Str_map (containers.Containers_bencode.Str_map)

Module Containers_bencode.Str_map

type key = Stdlib.String.t
type !'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a 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 compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
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 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 split : key -> 'a t -> 'a t * 'a option * 'a t
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 map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b 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 compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
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 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 split : key -> 'a t -> 'a t * 'a option * 'a t
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 map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b 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/dev/containers/Containers_bencode/index.html b/dev/containers/Containers_bencode/index.html index c27412d5..03eac266 100644 --- a/dev/containers/Containers_bencode/index.html +++ b/dev/containers/Containers_bencode/index.html @@ -1,2 +1,2 @@ -Containers_bencode (containers.Containers_bencode)

Module Containers_bencode

Basic Bencode decoder/encoder.

See https://en.wikipedia.org/wiki/Bencode .

module Str_map : sig ... end
type t =
  1. | Int of int64
  2. | String of string
  3. | List of t list
  4. | Map of t Str_map.t
val equal : t -> t -> bool
val hash : t -> int
val pp_debug : Stdlib.Format.formatter -> t -> unit

Printer for diagnostic/human consumption

val to_string_debug : t -> string
val int : int -> t
val int64 : int64 -> t
val string : string -> t
val list : t list -> t
val map_of_list : (string * t) list -> t
val map : t Str_map.t -> t
module Encode : sig ... end

Encoding

module Decode : sig ... end

Decoding

\ No newline at end of file +Containers_bencode (containers.Containers_bencode)

Module Containers_bencode

Basic Bencode decoder/encoder.

See https://en.wikipedia.org/wiki/Bencode .

module Str_map : sig ... end
type t =
  1. | Int of int64
  2. | String of string
  3. | List of t list
  4. | Map of t Str_map.t
val equal : t -> t -> bool
val hash : t -> int
val pp_debug : Stdlib.Format.formatter -> t -> unit

Printer for diagnostic/human consumption

val to_string_debug : t -> string
val int : int -> t
val int64 : int64 -> t
val string : string -> t
val list : t list -> t
val map_of_list : (string * t) list -> t
val map : t Str_map.t -> t
module Encode : sig ... end

Encoding

module Decode : sig ... end

Decoding

diff --git a/dev/containers/Containers_cbor/index.html b/dev/containers/Containers_cbor/index.html index dd3722ec..7bf84d31 100644 --- a/dev/containers/Containers_cbor/index.html +++ b/dev/containers/Containers_cbor/index.html @@ -1,2 +1,2 @@ -Containers_cbor (containers.Containers_cbor)

Module Containers_cbor

CBOR encoder/decoder.

The type is chosen to be compatible with ocaml-cbor. See the RFC.

note this is experimental.

type t = [
  1. | `Null
  2. | `Undefined
  3. | `Simple of int
  4. | `Bool of bool
  5. | `Int of int64
  6. | `Float of float
  7. | `Bytes of string
  8. | `Text of string
  9. | `Array of t list
  10. | `Map of (t * t) list
  11. | `Tag of int * t
]
val pp_diagnostic : t CCFormat.printer
val to_string_diagnostic : t -> string
val encode : ?buf:Stdlib.Buffer.t -> t -> string
val decode : string -> (t, string) result
val decode_exn : string -> t

Like decode.

  • raises Failure

    if the string isn't valid

\ No newline at end of file +Containers_cbor (containers.Containers_cbor)

Module Containers_cbor

CBOR encoder/decoder.

The type is chosen to be compatible with ocaml-cbor. See the RFC.

note this is experimental.

type t = [
  1. | `Null
  2. | `Undefined
  3. | `Simple of int
  4. | `Bool of bool
  5. | `Int of int64
  6. | `Float of float
  7. | `Bytes of string
  8. | `Text of string
  9. | `Array of t list
  10. | `Map of (t * t) list
  11. | `Tag of int * t
]
val pp_diagnostic : t CCFormat.printer
val to_string_diagnostic : t -> string
val encode : ?buf:Stdlib.Buffer.t -> t -> string
val decode : string -> (t, string) result
val decode_exn : string -> t

Like decode.

  • raises Failure

    if the string isn't valid

diff --git a/dev/containers/Containers_codegen/Bitfield/index.html b/dev/containers/Containers_codegen/Bitfield/index.html index e4741e3d..24275b83 100644 --- a/dev/containers/Containers_codegen/Bitfield/index.html +++ b/dev/containers/Containers_codegen/Bitfield/index.html @@ -1,2 +1,2 @@ -Bitfield (containers.Containers_codegen.Bitfield)

Module Containers_codegen.Bitfield

Generate efficient bitfields that fit in an integer

type t
val make : ?emit_failure_if_too_wide:bool -> name:string -> unit -> t

Make a new bitfield with the given name.

  • parameter name

    the name of the generated type

  • parameter emit_failure_if_too_wide

    if true, generated code includes a runtime assertion that Sys.int_size is wide enough to support this type

val field_bit : t -> string -> unit

field_bit ty name adds a field of size 1 to the bitfield ty, with name name. The generate code will provide get/set for a boolean.

val field_int : t -> width:int -> string -> unit

field_int ty name ~width adds a field of size width to the bitfield with name name. The accessors will be for integers of width bits, and the setter might assert that the provided integer fits.

val total_width : t -> int

Total width in bits of the given bitfield.

val gen_mli : t -> code

Generate code for the type signature for the given bitfield

val gen_ml : t -> code

Generate code for the implementation for the given bitfield

\ No newline at end of file +Bitfield (containers.Containers_codegen.Bitfield)

Module Containers_codegen.Bitfield

Generate efficient bitfields that fit in an integer

type t
val make : ?emit_failure_if_too_wide:bool -> name:string -> unit -> t

Make a new bitfield with the given name.

  • parameter name

    the name of the generated type

  • parameter emit_failure_if_too_wide

    if true, generated code includes a runtime assertion that Sys.int_size is wide enough to support this type

val field_bit : t -> string -> unit

field_bit ty name adds a field of size 1 to the bitfield ty, with name name. The generate code will provide get/set for a boolean.

val field_int : t -> width:int -> string -> unit

field_int ty name ~width adds a field of size width to the bitfield with name name. The accessors will be for integers of width bits, and the setter might assert that the provided integer fits.

val total_width : t -> int

Total width in bits of the given bitfield.

val gen_mli : t -> code

Generate code for the type signature for the given bitfield

val gen_ml : t -> code

Generate code for the implementation for the given bitfield

diff --git a/dev/containers/Containers_codegen/Code/index.html b/dev/containers/Containers_codegen/Code/index.html index 5f25e6c6..150036f2 100644 --- a/dev/containers/Containers_codegen/Code/index.html +++ b/dev/containers/Containers_codegen/Code/index.html @@ -1,2 +1,2 @@ -Code (containers.Containers_codegen.Code)

Module Containers_codegen.Code

Representation of OCaml code

type t = code
val pp : t Fmt.printer
val to_string : t -> string
val mk_pp : unit Fmt.printer -> t
val mk_str : string -> t
val in_struct : string -> t list -> t
val in_sig : string -> t list -> t
\ No newline at end of file +Code (containers.Containers_codegen.Code)

Module Containers_codegen.Code

Representation of OCaml code

type t = code
val pp : t Fmt.printer
val to_string : t -> string
val mk_pp : unit Fmt.printer -> t
val mk_str : string -> t
val in_struct : string -> t list -> t
val in_sig : string -> t list -> t
diff --git a/dev/containers/Containers_codegen/index.html b/dev/containers/Containers_codegen/index.html index d52d04fa..e9abb53d 100644 --- a/dev/containers/Containers_codegen/index.html +++ b/dev/containers/Containers_codegen/index.html @@ -1,5 +1,5 @@ -Containers_codegen (containers.Containers_codegen)

Module Containers_codegen

Code generators

The code generator library is designed to be used from a build system (for example, from dune) to generate efficient code for features that are harder to provide at runtime.

The idea is that the build system should invoke some OCaml script that depends on containers.codegen; the script uses the DSL below to describe what code to generate (e.g. a description of a bitfield type) and emits a .ml file (and possibly a .mli file).

For example, the build script might contain:

module CG = Containers_codegen
+Containers_codegen (containers.Containers_codegen)

Module Containers_codegen

Code generators

The code generator library is designed to be used from a build system (for example, from dune) to generate efficient code for features that are harder to provide at runtime.

The idea is that the build system should invoke some OCaml script that depends on containers.codegen; the script uses the DSL below to describe what code to generate (e.g. a description of a bitfield type) and emits a .ml file (and possibly a .mli file).

For example, the build script might contain:

module CG = Containers_codegen
 let () =
   let module B = CG.Bitfield in
   let b = B.make ~name:"t" () in
@@ -10,4 +10,4 @@ let () =
 
   CG.emit_file "foo.mli" [B.gen_mli b];
   CG.emit_file "foo.ml" [B.gen_ml b];
-  ()

and this will produce foo.ml and foo.mli with a bitfield containing x, y, and z.

module Fmt = CCFormat
type code
module Code : sig ... end
module Bitfield : sig ... end
val emit_file : string -> code list -> unit

emit_file file cs emits code fragments cs into the given file at path file

val emit_chan : out_channel -> code list -> unit
val emit_string : code list -> string
\ No newline at end of file + ()

and this will produce foo.ml and foo.mli with a bitfield containing x, y, and z.

module Fmt = CCFormat
type code
module Code : sig ... end
module Bitfield : sig ... end
val emit_file : string -> code list -> unit

emit_file file cs emits code fragments cs into the given file at path file

val emit_chan : out_channel -> code list -> unit
val emit_string : code list -> string
diff --git a/dev/containers/Containers_pp/Dump/index.html b/dev/containers/Containers_pp/Dump/index.html index 1a3919a8..edaba958 100644 --- a/dev/containers/Containers_pp/Dump/index.html +++ b/dev/containers/Containers_pp/Dump/index.html @@ -1,2 +1,2 @@ -Dump (containers.Containers_pp.Dump)

Module Containers_pp.Dump

Printers that correspond closely to OCaml's syntax.

val list : t list -> t
\ No newline at end of file +Dump (containers.Containers_pp.Dump)

Module Containers_pp.Dump

Printers that correspond closely to OCaml's syntax.

val list : t list -> t
diff --git a/dev/containers/Containers_pp/Ext/index.html b/dev/containers/Containers_pp/Ext/index.html index 01de7baf..a425d0fd 100644 --- a/dev/containers/Containers_pp/Ext/index.html +++ b/dev/containers/Containers_pp/Ext/index.html @@ -1,2 +1,2 @@ -Ext (containers.Containers_pp.Ext)

Module Containers_pp.Ext

Extension node.

Custom nodes can be used to add user-defined behavior to the rendered output. For example, documents might be annotated with ANSI-terminal colors, or with HTML tags.

type 'a t = {
  1. pre : Out.t -> 'a -> unit;
    (*

    Printed before the wrapped value.

    *)
  2. post : Out.t -> 'a -> unit;
    (*

    Printed after the wrapped value.

    *)
}

An extension is a custom document node. It takes a value of type 'a, and a document d, and can output what it wants based on the custom value before and after d is printed.

The extension is considered to have width 0.

\ No newline at end of file +Ext (containers.Containers_pp.Ext)

Module Containers_pp.Ext

Extension node.

Custom nodes can be used to add user-defined behavior to the rendered output. For example, documents might be annotated with ANSI-terminal colors, or with HTML tags.

type 'a t = {
  1. pre : Out.t -> 'a -> unit;
    (*

    Printed before the wrapped value.

    *)
  2. post : Out.t -> 'a -> unit;
    (*

    Printed after the wrapped value.

    *)
}

An extension is a custom document node. It takes a value of type 'a, and a document d, and can output what it wants based on the custom value before and after d is printed.

The extension is considered to have width 0.

diff --git a/dev/containers/Containers_pp/Flatten/index.html b/dev/containers/Containers_pp/Flatten/index.html index eb136ca7..44076e65 100644 --- a/dev/containers/Containers_pp/Flatten/index.html +++ b/dev/containers/Containers_pp/Flatten/index.html @@ -1,2 +1,2 @@ -Flatten (containers.Containers_pp.Flatten)

Module Containers_pp.Flatten

Trivial printing, on a single line.

This is generally ugly, but it's simple and fast when we do not care about looks.

val to_out : Out.t -> t -> unit
val to_buffer : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
\ No newline at end of file +Flatten (containers.Containers_pp.Flatten)

Module Containers_pp.Flatten

Trivial printing, on a single line.

This is generally ugly, but it's simple and fast when we do not care about looks.

val to_out : Out.t -> t -> unit
val to_buffer : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
diff --git a/dev/containers/Containers_pp/Infix/index.html b/dev/containers/Containers_pp/Infix/index.html index d06db815..925a2e4c 100644 --- a/dev/containers/Containers_pp/Infix/index.html +++ b/dev/containers/Containers_pp/Infix/index.html @@ -1,2 +1,2 @@ -Infix (containers.Containers_pp.Infix)

Module Containers_pp.Infix

val (^) : t -> t -> t

Alias of append.

val (^+) : t -> t -> t

x ^+ y is x ^ text " " ^ y

val (^/) : t -> t -> t

x ^/ y is x ^ newline ^ y

\ No newline at end of file +Infix (containers.Containers_pp.Infix)

Module Containers_pp.Infix

val (^) : t -> t -> t

Alias of append.

val (^+) : t -> t -> t

x ^+ y is x ^ text " " ^ y

val (^/) : t -> t -> t

x ^/ y is x ^ newline ^ y

diff --git a/dev/containers/Containers_pp/Out/index.html b/dev/containers/Containers_pp/Out/index.html index 602de777..efbe433d 100644 --- a/dev/containers/Containers_pp/Out/index.html +++ b/dev/containers/Containers_pp/Out/index.html @@ -1,2 +1,2 @@ -Out (containers.Containers_pp.Out)

Module Containers_pp.Out

Arbitrary output.

This is used for user-provided output.

type t = {
  1. char : char -> unit;
    (*

    Output a single char. The char is assumed not to be '\n'.

    *)
  2. sub_string : string -> int -> int -> unit;
    (*

    Output a string slice (optim for string)

    *)
  3. string : string -> unit;
    (*

    Output a string

    *)
  4. newline : unit -> unit;
    (*

    Output a newline

    *)
}
val of_buffer : Stdlib.Buffer.t -> t
val char : t -> char -> unit
val string : t -> string -> unit
val sub_string : t -> string -> int -> int -> unit
val newline : t -> unit
\ No newline at end of file +Out (containers.Containers_pp.Out)

Module Containers_pp.Out

Arbitrary output.

This is used for user-provided output.

type t = {
  1. char : char -> unit;
    (*

    Output a single char. The char is assumed not to be '\n'.

    *)
  2. sub_string : string -> int -> int -> unit;
    (*

    Output a string slice (optim for string)

    *)
  3. string : string -> unit;
    (*

    Output a string

    *)
  4. newline : unit -> unit;
    (*

    Output a newline

    *)
}
val of_buffer : Stdlib.Buffer.t -> t
val char : t -> char -> unit
val string : t -> string -> unit
val sub_string : t -> string -> int -> int -> unit
val newline : t -> unit
diff --git a/dev/containers/Containers_pp/Pretty/index.html b/dev/containers/Containers_pp/Pretty/index.html index 527df8bb..b8669414 100644 --- a/dev/containers/Containers_pp/Pretty/index.html +++ b/dev/containers/Containers_pp/Pretty/index.html @@ -1,2 +1,2 @@ -Pretty (containers.Containers_pp.Pretty)

Module Containers_pp.Pretty

Pretty-printing.

These functions are parametrized by a width, and will try to fit the result within this width.

val to_out : width:int -> Out.t -> t -> unit

Render to an arbitrary output.

val to_string : width:int -> t -> string

Render to a string.

val to_buffer : width:int -> Stdlib.Buffer.t -> t -> unit

Render to a buffer.

val to_format : width:int -> Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Pretty (containers.Containers_pp.Pretty)

Module Containers_pp.Pretty

Pretty-printing.

These functions are parametrized by a width, and will try to fit the result within this width.

val to_out : width:int -> Out.t -> t -> unit

Render to an arbitrary output.

val to_string : width:int -> t -> string

Render to a string.

val to_buffer : width:int -> Stdlib.Buffer.t -> t -> unit

Render to a buffer.

val to_format : width:int -> Stdlib.Format.formatter -> t -> unit
diff --git a/dev/containers/Containers_pp/Term_color/index.html b/dev/containers/Containers_pp/Term_color/index.html index d939a769..89c14aea 100644 --- a/dev/containers/Containers_pp/Term_color/index.html +++ b/dev/containers/Containers_pp/Term_color/index.html @@ -1,2 +1,2 @@ -Term_color (containers.Containers_pp.Term_color)

Module Containers_pp.Term_color

Simple colors in terminals

type color = [
  1. | `Black
  2. | `Blue
  3. | `Cyan
  4. | `Green
  5. | `Magenta
  6. | `Red
  7. | `White
  8. | `Yellow
]
type style = [
  1. | `BG of color
  2. | `Bold
  3. | `FG of color
  4. | `Reset
  5. | `Underline
]
val color : color -> t -> t
val style_l : style list -> t -> t
\ No newline at end of file +Term_color (containers.Containers_pp.Term_color)

Module Containers_pp.Term_color

Simple colors in terminals

type color = [
  1. | `Black
  2. | `Blue
  3. | `Cyan
  4. | `Green
  5. | `Magenta
  6. | `Red
  7. | `White
  8. | `Yellow
]
type style = [
  1. | `BG of color
  2. | `Bold
  3. | `FG of color
  4. | `Reset
  5. | `Underline
]
val color : color -> t -> t
val style_l : style list -> t -> t
diff --git a/dev/containers/Containers_pp/index.html b/dev/containers/Containers_pp/index.html index 8ff8383d..48147b4c 100644 --- a/dev/containers/Containers_pp/index.html +++ b/dev/containers/Containers_pp/index.html @@ -1,2 +1,2 @@ -Containers_pp (containers.Containers_pp)

Module Containers_pp

Pretty printing of documents.

A document is a structured tree of text with formatting instructions.

It can be rendered into a string ("pretty printed"), see Pretty.

This follows Wadler's paper "A prettier printer", but with some changes in the rendering part because we can't rely on lazyness to make the algebraic implementation efficient.

Some general considerations: the type t is the type of documents, a tree with text leaves that is pretty printed within a given width.

Layout is controlled via the combination of a few primitives:

Core

type t

The type of documents

val nil : t

Empty document

val char : char -> t

Single char.

val text : string -> t

Text. The string will be split on '\n', which are replaced by newline.

val textpf : ('a, unit, string, t) format4 -> 'a

Text, with a Printf-compatible format.

For example, textpf "%d-%d" 4 2 is like text "4-2".

val textf : ('a, Stdlib.Format.formatter, unit, t) format4 -> 'a

Text, with a Format-compatible format.

Note that this will bake-in any formatting done by Format. Newlines introduced by format will become hard newlines in the resulting document.

val nest : int -> t -> t

nest n d increases indentation by n inside d. If current indentation is m, then every newline inside d will be followed by n + m leading spaces.

val group : t -> t

Group the documents inside this.

Newlines immediately inside this group will either render as new lines or as spaces, depending on the width available.

val append : t -> t -> t

Concatenation.

val newline : t

A line break.

val nl : t

Alias for newline

val fill : t -> t list -> t

fill sep l resembles group (append_l ~sep l), except it tries to put as many items of l as possible on each line.

In terms of Format, this is like the hov box.

Output device

module Out : sig ... end

Arbitrary output.

Extensibility

module Ext : sig ... end

Extension node.

val ext : 'a Ext.t -> 'a -> t -> t

ext e v d wraps d with value v.

It is a document that has the same shape (and size) as d, except that additional data will be output when it is rendered using extension e.

When this is rendered, first e.pre out v is called; then d is printed; then e.post out v is called. Here out is the output buffer/stream for rendering.

Pretty print and rendering

module Pretty : sig ... end

Pretty-printing.

module Flatten : sig ... end

Trivial printing, on a single line.

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

Pretty-print, using Pretty and an unspecified margin.

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

Debug printer. This prints the structure of the document, it does not pretty-print it. See pp or Pretty.

Convenience functions

module Infix : sig ... end
include module type of Infix
val (^) : t -> t -> t

Alias of append.

val (^+) : t -> t -> t

x ^+ y is x ^ text " " ^ y

val (^/) : t -> t -> t

x ^/ y is x ^ newline ^ y

val sp : t

A single space

val append_l : ?sep:t -> t list -> t

append_l ?sep l is the concatenation of elements of l, separated by sep (default nil)

val append_sp : t list -> t

append_sp l is the concatenation of elements of l, separated by ' '

val append_nl : t list -> t

Same as append_l with sep=nl

val fill_map : t -> ('a -> t) -> 'a list -> t

fill_map sep f l is fill sep (List.map f l)

val bool : bool -> t
val int : int -> t
val float : float -> t
val float_hex : float -> t
val text_quoted : string -> t

text_quoted s is text (spf "%S" s)

val text_zero_width : string -> t

Text but we assume it takes no space on screen.

val of_list : ?sep:t -> ('a -> t) -> 'a list -> t

of_list f l maps each element of l to a document and concatenates them.

  • parameter sep

    separator inserted between elements (default nil)

val of_seq : ?sep:t -> ('a -> t) -> 'a Stdlib.Seq.t -> t

Same as of_list but with sequences.

val bracket : string -> t -> string -> t

bracket l d r groups d, between brackets l and r

val bracket2 : string -> t -> string -> t

bracket2 l d r groups d, indented by 2, between brackets l and r

val sexp_apply : string -> t list -> t

sexp_apply a l is the S-expr "(text a โ€ฆl)", pretty-printed

val sexp_l : t list -> t

sexp_l [l1;โ€ฆln] is the S-expr "(l1 l2โ€ฆln)", pretty-printed

module Dump : sig ... end

Printers that correspond closely to OCaml's syntax.

module Term_color : sig ... end

Simple colors in terminals

\ No newline at end of file +Containers_pp (containers.Containers_pp)

Module Containers_pp

Pretty printing of documents.

A document is a structured tree of text with formatting instructions.

It can be rendered into a string ("pretty printed"), see Pretty.

This follows Wadler's paper "A prettier printer", but with some changes in the rendering part because we can't rely on lazyness to make the algebraic implementation efficient.

Some general considerations: the type t is the type of documents, a tree with text leaves that is pretty printed within a given width.

Layout is controlled via the combination of a few primitives:

Core

type t

The type of documents

val nil : t

Empty document

val char : char -> t

Single char.

val text : string -> t

Text. The string will be split on '\n', which are replaced by newline.

val textpf : ('a, unit, string, t) format4 -> 'a

Text, with a Printf-compatible format.

For example, textpf "%d-%d" 4 2 is like text "4-2".

val textf : ('a, Stdlib.Format.formatter, unit, t) format4 -> 'a

Text, with a Format-compatible format.

Note that this will bake-in any formatting done by Format. Newlines introduced by format will become hard newlines in the resulting document.

val nest : int -> t -> t

nest n d increases indentation by n inside d. If current indentation is m, then every newline inside d will be followed by n + m leading spaces.

val group : t -> t

Group the documents inside this.

Newlines immediately inside this group will either render as new lines or as spaces, depending on the width available.

val append : t -> t -> t

Concatenation.

val newline : t

A line break.

val nl : t

Alias for newline

val fill : t -> t list -> t

fill sep l resembles group (append_l ~sep l), except it tries to put as many items of l as possible on each line.

In terms of Format, this is like the hov box.

Output device

module Out : sig ... end

Arbitrary output.

Extensibility

module Ext : sig ... end

Extension node.

val ext : 'a Ext.t -> 'a -> t -> t

ext e v d wraps d with value v.

It is a document that has the same shape (and size) as d, except that additional data will be output when it is rendered using extension e.

When this is rendered, first e.pre out v is called; then d is printed; then e.post out v is called. Here out is the output buffer/stream for rendering.

Pretty print and rendering

module Pretty : sig ... end

Pretty-printing.

module Flatten : sig ... end

Trivial printing, on a single line.

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

Pretty-print, using Pretty and an unspecified margin.

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

Debug printer. This prints the structure of the document, it does not pretty-print it. See pp or Pretty.

Convenience functions

module Infix : sig ... end
include module type of Infix
val (^) : t -> t -> t

Alias of append.

val (^+) : t -> t -> t

x ^+ y is x ^ text " " ^ y

val (^/) : t -> t -> t

x ^/ y is x ^ newline ^ y

val sp : t

A single space

val append_l : ?sep:t -> t list -> t

append_l ?sep l is the concatenation of elements of l, separated by sep (default nil)

val append_sp : t list -> t

append_sp l is the concatenation of elements of l, separated by ' '

val append_nl : t list -> t

Same as append_l with sep=nl

val fill_map : t -> ('a -> t) -> 'a list -> t

fill_map sep f l is fill sep (List.map f l)

val bool : bool -> t
val int : int -> t
val float : float -> t
val float_hex : float -> t
val text_quoted : string -> t

text_quoted s is text (spf "%S" s)

val text_zero_width : string -> t

Text but we assume it takes no space on screen.

val of_list : ?sep:t -> ('a -> t) -> 'a list -> t

of_list f l maps each element of l to a document and concatenates them.

  • parameter sep

    separator inserted between elements (default nil)

val of_seq : ?sep:t -> ('a -> t) -> 'a Stdlib.Seq.t -> t

Same as of_list but with sequences.

val bracket : string -> t -> string -> t

bracket l d r groups d, between brackets l and r

val bracket2 : string -> t -> string -> t

bracket2 l d r groups d, indented by 2, between brackets l and r

val sexp_apply : string -> t list -> t

sexp_apply a l is the S-expr "(text a โ€ฆl)", pretty-printed

val sexp_l : t list -> t

sexp_l [l1;โ€ฆln] is the S-expr "(l1 l2โ€ฆln)", pretty-printed

module Dump : sig ... end

Printers that correspond closely to OCaml's syntax.

module Term_color : sig ... end

Simple colors in terminals

diff --git a/dev/containers/Containers_scc/Make/argument-1-A/Node_tbl/index.html b/dev/containers/Containers_scc/Make/argument-1-A/Node_tbl/index.html index b2dc6dde..4c66f4f1 100644 --- a/dev/containers/Containers_scc/Make/argument-1-A/Node_tbl/index.html +++ b/dev/containers/Containers_scc/Make/argument-1-A/Node_tbl/index.html @@ -1,2 +1,2 @@ -Node_tbl (containers.Containers_scc.Make.A.Node_tbl)

Module A.Node_tbl

type key = node
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00.0
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 +Node_tbl (containers.Containers_scc.Make.A.Node_tbl)

Module A.Node_tbl

type key = node
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00.0
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/dev/containers/Containers_scc/Make/argument-1-A/index.html b/dev/containers/Containers_scc/Make/argument-1-A/index.html index fb09ce42..56a469a0 100644 --- a/dev/containers/Containers_scc/Make/argument-1-A/index.html +++ b/dev/containers/Containers_scc/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -A (containers.Containers_scc.Make.A)

Parameter Make.A

type t
type node
val children : t -> node -> node iter
module Node_tbl : Hashtbl.S with type key = node
\ No newline at end of file +A (containers.Containers_scc.Make.A)

Parameter Make.A

type t
type node
val children : t -> node -> node iter
module Node_tbl : Hashtbl.S with type key = node
diff --git a/dev/containers/Containers_scc/Make/index.html b/dev/containers/Containers_scc/Make/index.html index fb9fa7cf..af081380 100644 --- a/dev/containers/Containers_scc/Make/index.html +++ b/dev/containers/Containers_scc/Make/index.html @@ -1,2 +1,2 @@ -Make (containers.Containers_scc.Make)

Module Containers_scc.Make

Parameters

module A : ARG

Signature

module A = A
val scc : A.t -> A.node list -> A.node list list
\ No newline at end of file +Make (containers.Containers_scc.Make)

Module Containers_scc.Make

Parameters

module A : ARG

Signature

module A = A
val scc : A.t -> A.node list -> A.node list list
diff --git a/dev/containers/Containers_scc/index.html b/dev/containers/Containers_scc/index.html index ee068a95..7364735f 100644 --- a/dev/containers/Containers_scc/index.html +++ b/dev/containers/Containers_scc/index.html @@ -1,8 +1,8 @@ -Containers_scc (containers.Containers_scc)

Module Containers_scc

type 'a iter = ('a -> unit) -> unit
module type ARG = sig ... end
module type S = sig ... end
module Make (A : ARG) : S with module A = A
val scc : - tbl:(module Stdlib.Hashtbl.S with type key = 'node) -> - graph:'graph -> - children:('graph -> 'node -> 'node iter) -> - nodes:'node list -> +Containers_scc (containers.Containers_scc)

Module Containers_scc

type 'a iter = ('a -> unit) -> unit
module type ARG = sig ... end
module type S = sig ... end
module Make (A : ARG) : S with module A = A
val scc : + tbl:(module Stdlib.Hashtbl.S with type key = 'node) -> + graph:'graph -> + children:('graph -> 'node -> 'node iter) -> + nodes:'node list -> unit -> - 'node list list

Compute the strongly connected components of the given graph, reachable from nodes.

  • parameter graph

    the graph state

  • parameter children

    maps a node to its direct descendants (children)

  • parameter nodes

    initial nodes.

  • parameter tbl

    a hashtable implementation that takes nodes as keys

\ No newline at end of file + 'node list list

Compute the strongly connected components of the given graph, reachable from nodes.

  • parameter graph

    the graph state

  • parameter children

    maps a node to its direct descendants (children)

  • parameter nodes

    initial nodes.

  • parameter tbl

    a hashtable implementation that takes nodes as keys

diff --git a/dev/containers/Containers_scc/module-type-ARG/Node_tbl/index.html b/dev/containers/Containers_scc/module-type-ARG/Node_tbl/index.html index c57be214..3c3715e0 100644 --- a/dev/containers/Containers_scc/module-type-ARG/Node_tbl/index.html +++ b/dev/containers/Containers_scc/module-type-ARG/Node_tbl/index.html @@ -1,2 +1,2 @@ -Node_tbl (containers.Containers_scc.ARG.Node_tbl)

Module ARG.Node_tbl

type key = node
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00.0
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 +Node_tbl (containers.Containers_scc.ARG.Node_tbl)

Module ARG.Node_tbl

type key = node
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00.0
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/dev/containers/Containers_scc/module-type-ARG/index.html b/dev/containers/Containers_scc/module-type-ARG/index.html index 056bca06..b237a8a2 100644 --- a/dev/containers/Containers_scc/module-type-ARG/index.html +++ b/dev/containers/Containers_scc/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (containers.Containers_scc.ARG)

Module type Containers_scc.ARG

type t
type node
val children : t -> node -> node iter
module Node_tbl : Hashtbl.S with type key = node
\ No newline at end of file +ARG (containers.Containers_scc.ARG)

Module type Containers_scc.ARG

type t
type node
val children : t -> node -> node iter
module Node_tbl : Hashtbl.S with type key = node
diff --git a/dev/containers/Containers_scc/module-type-S/A/Node_tbl/index.html b/dev/containers/Containers_scc/module-type-S/A/Node_tbl/index.html index 27bde4f2..68dda19d 100644 --- a/dev/containers/Containers_scc/module-type-S/A/Node_tbl/index.html +++ b/dev/containers/Containers_scc/module-type-S/A/Node_tbl/index.html @@ -1,2 +1,2 @@ -Node_tbl (containers.Containers_scc.S.A.Node_tbl)

Module A.Node_tbl

type key = node
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00.0
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 +Node_tbl (containers.Containers_scc.S.A.Node_tbl)

Module A.Node_tbl

type key = node
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00.0
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.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00.0
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/dev/containers/Containers_scc/module-type-S/A/index.html b/dev/containers/Containers_scc/module-type-S/A/index.html index 6dbaaeab..ed02ed3e 100644 --- a/dev/containers/Containers_scc/module-type-S/A/index.html +++ b/dev/containers/Containers_scc/module-type-S/A/index.html @@ -1,2 +1,2 @@ -A (containers.Containers_scc.S.A)

Module S.A

type t
type node
val children : t -> node -> node iter
module Node_tbl : Hashtbl.S with type key = node
\ No newline at end of file +A (containers.Containers_scc.S.A)

Module S.A

type t
type node
val children : t -> node -> node iter
module Node_tbl : Hashtbl.S with type key = node
diff --git a/dev/containers/Containers_scc/module-type-S/index.html b/dev/containers/Containers_scc/module-type-S/index.html index aee27da7..59c58f76 100644 --- a/dev/containers/Containers_scc/module-type-S/index.html +++ b/dev/containers/Containers_scc/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers.Containers_scc.S)

Module type Containers_scc.S

module A : ARG
val scc : A.t -> A.node list -> A.node list list
\ No newline at end of file +S (containers.Containers_scc.S)

Module type Containers_scc.S

module A : ARG
val scc : A.t -> A.node list -> A.node list list
diff --git a/dev/containers/Containers_top/index.html b/dev/containers/Containers_top/index.html index c14b3eb5..e9046c46 100644 --- a/dev/containers/Containers_top/index.html +++ b/dev/containers/Containers_top/index.html @@ -1,2 +1,2 @@ -Containers_top (containers.Containers_top)

Module Containers_top

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val eval_exn : string -> bool
val install_printer : string -> unit
val install_printers : string list -> unit
\ No newline at end of file +Containers_top (containers.Containers_top)

Module Containers_top

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val eval_exn : string -> bool
val install_printer : string -> unit
val install_printers : string list -> unit
diff --git a/dev/containers/index.html b/dev/containers/index.html index 2882af22..4a72a639 100644 --- a/dev/containers/index.html +++ b/dev/containers/index.html @@ -1,2 +1,2 @@ -index (containers.index)

Package containers

Package info

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

Package containers

Package info

changes-files
license-files
readme-files
diff --git a/dev/either/Either/index.html b/dev/either/Either/index.html index f4fbd7b2..0fc6840d 100644 --- a/dev/either/Either/index.html +++ b/dev/either/Either/index.html @@ -1,16 +1,16 @@ -Either (either.Either)

Module Either

type ('a, 'b) t = ('a, 'b) Stdlib.Either.t =
  1. | Left of 'a
  2. | Right of 'b

This module defines the common Either interface that is provided for all OCaml versions. For documentation of these functions, refer to the standard library.

val left : 'a -> ('a, 'b) t
val right : 'b -> ('a, 'b) t
val is_left : ('a, 'b) t -> bool
val is_right : ('a, 'b) t -> bool
val find_left : ('a, 'b) t -> 'a option
val find_right : ('a, 'b) t -> 'b option
val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t
val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t
val map : - left:('a1 -> 'a2) -> - right:('b1 -> 'b2) -> +Either (either.Either)

Module Either

type ('a, 'b) t = ('a, 'b) Stdlib.Either.t =
  1. | Left of 'a
  2. | Right of 'b

This module defines the common Either interface that is provided for all OCaml versions. For documentation of these functions, refer to the standard library.

val left : 'a -> ('a, 'b) t
val right : 'b -> ('a, 'b) t
val is_left : ('a, 'b) t -> bool
val is_right : ('a, 'b) t -> bool
val find_left : ('a, 'b) t -> 'a option
val find_right : ('a, 'b) t -> 'b option
val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t
val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t
val map : + left:('a1 -> 'a2) -> + right:('b1 -> 'b2) -> ('a1, 'b1) t -> - ('a2, 'b2) t
val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c
val iter : left:('a -> unit) -> right:('b -> unit) -> ('a, 'b) t -> unit
val for_all : left:('a -> bool) -> right:('b -> bool) -> ('a, 'b) t -> bool
val equal : - left:('a -> 'a -> bool) -> - right:('b -> 'b -> bool) -> + ('a2, 'b2) t
val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c
val iter : left:('a -> unit) -> right:('b -> unit) -> ('a, 'b) t -> unit
val for_all : left:('a -> bool) -> right:('b -> bool) -> ('a, 'b) t -> bool
val equal : + left:('a -> 'a -> bool) -> + right:('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool
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
\ No newline at end of file + int
diff --git a/dev/either/Either__/index.html b/dev/either/Either__/index.html deleted file mode 100644 index 1b9d910b..00000000 --- a/dev/either/Either__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Either__ (either.Either__)

Module Either__

\ No newline at end of file diff --git a/dev/either/Either__Either_intf/index.html b/dev/either/Either__Either_intf/index.html deleted file mode 100644 index 572dae8d..00000000 --- a/dev/either/Either__Either_intf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Either__Either_intf (either.Either__Either_intf)

Module Either__Either_intf

\ No newline at end of file diff --git a/dev/either/index.html b/dev/either/index.html index 65b7c38d..efc6d58f 100644 --- a/dev/either/index.html +++ b/dev/either/index.html @@ -1,2 +1,2 @@ -index (either.index)

Package either

Package info

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

Package either

Package info

changes-files
license-files
readme-files
diff --git a/dev/fonts/fira-mono-v14-latin-500.woff2 b/dev/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/dev/fonts/fira-mono-v14-latin-regular.woff2 b/dev/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/dev/fonts/fira-sans-v17-latin-500.woff2 b/dev/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/dev/fonts/noticia-text-v15-latin-italic.woff2 b/dev/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/dev/highlight.pack.js b/dev/highlight.pack.js index a3731597..7d1bcd04 100644 --- a/dev/highlight.pack.js +++ b/dev/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/dev/ocaml/Afl_instrument/index.html b/dev/ocaml/Afl_instrument/index.html index 49ae7984..ab0c7c55 100644 --- a/dev/ocaml/Afl_instrument/index.html +++ b/dev/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/dev/ocaml/Alias_analysis/index.html b/dev/ocaml/Alias_analysis/index.html index e69ebddf..03f4711a 100644 --- a/dev/ocaml/Alias_analysis/index.html +++ b/dev/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/dev/ocaml/Allocated_const/index.html b/dev/ocaml/Allocated_const/index.html index 5f1230c1..80e85a19 100644 --- a/dev/ocaml/Allocated_const/index.html +++ b/dev/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/dev/ocaml/Annot/index.html b/dev/ocaml/Annot/index.html index 28db7a4c..933b3da7 100644 --- a/dev/ocaml/Annot/index.html +++ b/dev/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/dev/ocaml/Arch/index.html b/dev/ocaml/Arch/index.html index a903ec43..6a6a9038 100644 --- a/dev/ocaml/Arch/index.html +++ b/dev/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 -> @@ -9,4 +9,4 @@ specific_operation -> Stdlib.Format.formatter -> 'b array -> - unit
val win64 : bool
val operation_is_pure : specific_operation -> bool
val operation_can_raise : 'a -> bool
\ No newline at end of file + unit
val win64 : bool
val operation_is_pure : specific_operation -> bool
val operation_can_raise : 'a -> bool
diff --git a/dev/ocaml/Arg_helper/Make/argument-1-S/Key/Map/index.html b/dev/ocaml/Arg_helper/Make/argument-1-S/Key/Map/index.html index 3d3fffe8..446e1281 100644 --- a/dev/ocaml/Arg_helper/Make/argument-1-S/Key/Map/index.html +++ b/dev/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

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 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 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 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.0
val singleton : key -> 'a -> 'a t

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

  • since 3.12.0
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

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 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 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 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.0
val singleton : key -> 'a -> 'a t

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

  • since 3.12.0
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.0
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.0
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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

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.

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.0
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.0
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.0
  • 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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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
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.0
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
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.

Maps and Sequences

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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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
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.0
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
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.

Maps and Sequences

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/dev/ocaml/Arg_helper/Make/argument-1-S/Key/index.html b/dev/ocaml/Arg_helper/Make/argument-1-S/Key/index.html index 0bcb97de..e80abf45 100644 --- a/dev/ocaml/Arg_helper/Make/argument-1-S/Key/index.html +++ b/dev/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/dev/ocaml/Arg_helper/Make/argument-1-S/Value/index.html b/dev/ocaml/Arg_helper/Make/argument-1-S/Value/index.html index 84f654d3..e76d77b2 100644 --- a/dev/ocaml/Arg_helper/Make/argument-1-S/Value/index.html +++ b/dev/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/dev/ocaml/Arg_helper/Make/argument-1-S/index.html b/dev/ocaml/Arg_helper/Make/argument-1-S/index.html index a601a3ec..e8bdebd5 100644 --- a/dev/ocaml/Arg_helper/Make/argument-1-S/index.html +++ b/dev/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/dev/ocaml/Arg_helper/Make/index.html b/dev/ocaml/Arg_helper/Make/index.html index f7a4067c..66054098 100644 --- a/dev/ocaml/Arg_helper/Make/index.html +++ b/dev/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/dev/ocaml/Arg_helper/index.html b/dev/ocaml/Arg_helper/index.html index 4a10a901..99748813 100644 --- a/dev/ocaml/Arg_helper/index.html +++ b/dev/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/dev/ocaml/Asmgen/index.html b/dev/ocaml/Asmgen/index.html index a0a779d1..aef203e2 100644 --- a/dev/ocaml/Asmgen/index.html +++ b/dev/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/dev/ocaml/Asmlibrarian/index.html b/dev/ocaml/Asmlibrarian/index.html index 168f3bf8..4f54e5a3 100644 --- a/dev/ocaml/Asmlibrarian/index.html +++ b/dev/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/dev/ocaml/Asmlink/index.html b/dev/ocaml/Asmlink/index.html index e03f8648..16b418d8 100644 --- a/dev/ocaml/Asmlink/index.html +++ b/dev/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/dev/ocaml/Asmpackager/index.html b/dev/ocaml/Asmpackager/index.html index cc434557..dca6ca58 100644 --- a/dev/ocaml/Asmpackager/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Attr/index.html b/dev/ocaml/Ast_helper/Attr/index.html index 7df40aed..5545c541 100644 --- a/dev/ocaml/Ast_helper/Attr/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Cf/index.html b/dev/ocaml/Ast_helper/Cf/index.html index 08bd1c9d..77515e60 100644 --- a/dev/ocaml/Ast_helper/Cf/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Ci/index.html b/dev/ocaml/Ast_helper/Ci/index.html index 34f18a95..77920efc 100644 --- a/dev/ocaml/Ast_helper/Ci/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Cl/index.html b/dev/ocaml/Ast_helper/Cl/index.html index a598fb79..98ab0897 100644 --- a/dev/ocaml/Ast_helper/Cl/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Const/index.html b/dev/ocaml/Ast_helper/Const/index.html index d0b422fc..15d5bb12 100644 --- a/dev/ocaml/Ast_helper/Const/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Csig/index.html b/dev/ocaml/Ast_helper/Csig/index.html index 946d0053..fa30c993 100644 --- a/dev/ocaml/Ast_helper/Csig/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Cstr/index.html b/dev/ocaml/Ast_helper/Cstr/index.html index e2b0902c..0d8738dc 100644 --- a/dev/ocaml/Ast_helper/Cstr/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Ctf/index.html b/dev/ocaml/Ast_helper/Ctf/index.html index 11c7012a..bbaf95fb 100644 --- a/dev/ocaml/Ast_helper/Ctf/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Cty/index.html b/dev/ocaml/Ast_helper/Cty/index.html index cfa0f67b..126b6359 100644 --- a/dev/ocaml/Ast_helper/Cty/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Exp/index.html b/dev/ocaml/Ast_helper/Exp/index.html index a2972835..2014ee26 100644 --- a/dev/ocaml/Ast_helper/Exp/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Incl/index.html b/dev/ocaml/Ast_helper/Incl/index.html index 013ecc3e..41b213c1 100644 --- a/dev/ocaml/Ast_helper/Incl/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Mb/index.html b/dev/ocaml/Ast_helper/Mb/index.html index b9b99c96..96e1134e 100644 --- a/dev/ocaml/Ast_helper/Mb/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Md/index.html b/dev/ocaml/Ast_helper/Md/index.html index f219aff0..bfbaf2d5 100644 --- a/dev/ocaml/Ast_helper/Md/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Mod/index.html b/dev/ocaml/Ast_helper/Mod/index.html index 8ea68a67..7984e7ef 100644 --- a/dev/ocaml/Ast_helper/Mod/index.html +++ b/dev/ocaml/Ast_helper/Mod/index.html @@ -1,36 +1,36 @@ -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 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/dev/ocaml/Ast_helper/Ms/index.html b/dev/ocaml/Ast_helper/Ms/index.html index 49e39b6a..1063bcd2 100644 --- a/dev/ocaml/Ast_helper/Ms/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Mtd/index.html b/dev/ocaml/Ast_helper/Mtd/index.html index 1c0d06e3..0be50b33 100644 --- a/dev/ocaml/Ast_helper/Mtd/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Mty/index.html b/dev/ocaml/Ast_helper/Mty/index.html index 8d6494aa..dca43410 100644 --- a/dev/ocaml/Ast_helper/Mty/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Of/index.html b/dev/ocaml/Ast_helper/Of/index.html index 2601a462..1e1705c6 100644 --- a/dev/ocaml/Ast_helper/Of/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Opn/index.html b/dev/ocaml/Ast_helper/Opn/index.html index 90253f2a..f331d017 100644 --- a/dev/ocaml/Ast_helper/Opn/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Pat/index.html b/dev/ocaml/Ast_helper/Pat/index.html index ec0c55cf..e4c11415 100644 --- a/dev/ocaml/Ast_helper/Pat/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Rf/index.html b/dev/ocaml/Ast_helper/Rf/index.html index e3556121..4dde9c68 100644 --- a/dev/ocaml/Ast_helper/Rf/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Sig/index.html b/dev/ocaml/Ast_helper/Sig/index.html index 4436ea4f..e9a156e4 100644 --- a/dev/ocaml/Ast_helper/Sig/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Str/index.html b/dev/ocaml/Ast_helper/Str/index.html index 7f682c52..3c11ee66 100644 --- a/dev/ocaml/Ast_helper/Str/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Te/index.html b/dev/ocaml/Ast_helper/Te/index.html index d57b0b3c..83aebe78 100644 --- a/dev/ocaml/Ast_helper/Te/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Typ/index.html b/dev/ocaml/Ast_helper/Typ/index.html index 88777fd6..9cfe1642 100644 --- a/dev/ocaml/Ast_helper/Typ/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Type/index.html b/dev/ocaml/Ast_helper/Type/index.html index 4bd57b42..b2211f00 100644 --- a/dev/ocaml/Ast_helper/Type/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Val/index.html b/dev/ocaml/Ast_helper/Val/index.html index bc30393c..d392d28d 100644 --- a/dev/ocaml/Ast_helper/Val/index.html +++ b/dev/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/dev/ocaml/Ast_helper/Vb/index.html b/dev/ocaml/Ast_helper/Vb/index.html index 3e4ce269..6d0a09e8 100644 --- a/dev/ocaml/Ast_helper/Vb/index.html +++ b/dev/ocaml/Ast_helper/Vb/index.html @@ -1,9 +1,9 @@ -Vb (ocaml.Ast_helper.Vb)

Module Ast_helper.Vb

Value bindings

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

Module Ast_helper.Vb

Value bindings

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> Parsetree.pattern -> Parsetree.expression -> - Parsetree.value_binding
\ No newline at end of file + Parsetree.value_binding
diff --git a/dev/ocaml/Ast_helper/index.html b/dev/ocaml/Ast_helper/index.html index d80bb29f..73f0b1ef 100644 --- a/dev/ocaml/Ast_helper/index.html +++ b/dev/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/dev/ocaml/Ast_invariants/index.html b/dev/ocaml/Ast_invariants/index.html index 88ab3a1e..1ed2dc9a 100644 --- a/dev/ocaml/Ast_invariants/index.html +++ b/dev/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/dev/ocaml/Ast_iterator/index.html b/dev/ocaml/Ast_iterator/index.html index 1d445a02..c4205960 100644 --- a/dev/ocaml/Ast_iterator/index.html +++ b/dev/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/dev/ocaml/Ast_mapper/index.html b/dev/ocaml/Ast_mapper/index.html index 2e7a37ff..350a031a 100644 --- a/dev/ocaml/Ast_mapper/index.html +++ b/dev/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/dev/ocaml/Asttypes/index.html b/dev/ocaml/Asttypes/index.html index 029b6e56..f970ef56 100644 --- a/dev/ocaml/Asttypes/index.html +++ b/dev/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/dev/ocaml/Attr_helper/index.html b/dev/ocaml/Attr_helper/index.html index fd411557..69961b7d 100644 --- a/dev/ocaml/Attr_helper/index.html +++ b/dev/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/dev/ocaml/Augment_specialised_args/Definition/index.html b/dev/ocaml/Augment_specialised_args/Definition/index.html index eb0defd3..67e5ff14 100644 --- a/dev/ocaml/Augment_specialised_args/Definition/index.html +++ b/dev/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/dev/ocaml/Augment_specialised_args/Make/argument-1-_/index.html b/dev/ocaml/Augment_specialised_args/Make/argument-1-_/index.html index 5ee798df..3e9f0b93 100644 --- a/dev/ocaml/Augment_specialised_args/Make/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Augment_specialised_args/Make/index.html b/dev/ocaml/Augment_specialised_args/Make/index.html index f2edfa54..d517d6df 100644 --- a/dev/ocaml/Augment_specialised_args/Make/index.html +++ b/dev/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/dev/ocaml/Augment_specialised_args/What_to_specialise/index.html b/dev/ocaml/Augment_specialised_args/What_to_specialise/index.html index 408998f1..e2df7955 100644 --- a/dev/ocaml/Augment_specialised_args/What_to_specialise/index.html +++ b/dev/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/dev/ocaml/Augment_specialised_args/index.html b/dev/ocaml/Augment_specialised_args/index.html index 9385409e..0a2f8998 100644 --- a/dev/ocaml/Augment_specialised_args/index.html +++ b/dev/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/dev/ocaml/Augment_specialised_args/module-type-S/index.html b/dev/ocaml/Augment_specialised_args/module-type-S/index.html index ed80620d..a975f2db 100644 --- a/dev/ocaml/Augment_specialised_args/module-type-S/index.html +++ b/dev/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/dev/ocaml/Backend_intf/index.html b/dev/ocaml/Backend_intf/index.html index 88c4d56e..7eccad9e 100644 --- a/dev/ocaml/Backend_intf/index.html +++ b/dev/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/dev/ocaml/Backend_intf/module-type-S/index.html b/dev/ocaml/Backend_intf/module-type-S/index.html index 19007221..815fe5e4 100644 --- a/dev/ocaml/Backend_intf/module-type-S/index.html +++ b/dev/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/dev/ocaml/Backend_var/Provenance/index.html b/dev/ocaml/Backend_var/Provenance/index.html index 0239844f..a128c22c 100644 --- a/dev/ocaml/Backend_var/Provenance/index.html +++ b/dev/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/dev/ocaml/Backend_var/With_provenance/index.html b/dev/ocaml/Backend_var/With_provenance/index.html index 58dd4288..37a110c1 100644 --- a/dev/ocaml/Backend_var/With_provenance/index.html +++ b/dev/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/dev/ocaml/Backend_var/index.html b/dev/ocaml/Backend_var/index.html index 5a79cb3a..91be46a8 100644 --- a/dev/ocaml/Backend_var/index.html +++ b/dev/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
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 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
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 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/dev/ocaml/Bigarray/index.html b/dev/ocaml/Bigarray/index.html index 0fcda6f1..46be1918 100644 --- a/dev/ocaml/Bigarray/index.html +++ b/dev/ocaml/Bigarray/index.html @@ -1,14 +1,14 @@ -Bigarray (ocaml.Bigarray)

Module Bigarray

include module type of struct include Stdlib.Bigarray end

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.0 Moved from otherlibs to stdlib.
type float32_elt = Stdlib.Bigarray.float32_elt =
  1. | Float32_elt
type float64_elt = Stdlib.Bigarray.float64_elt =
  1. | Float64_elt
type int8_signed_elt = Stdlib.Bigarray.int8_signed_elt =
  1. | Int8_signed_elt
type int8_unsigned_elt = Stdlib.Bigarray.int8_unsigned_elt =
  1. | Int8_unsigned_elt
type int16_signed_elt = Stdlib.Bigarray.int16_signed_elt =
  1. | Int16_signed_elt
type int16_unsigned_elt = Stdlib.Bigarray.int16_unsigned_elt =
  1. | Int16_unsigned_elt
type int32_elt = Stdlib.Bigarray.int32_elt =
  1. | Int32_elt
type int64_elt = Stdlib.Bigarray.int64_elt =
  1. | Int64_elt
type int_elt = Stdlib.Bigarray.int_elt =
  1. | Int_elt
type nativeint_elt = Stdlib.Bigarray.nativeint_elt =
  1. | Nativeint_elt
type complex32_elt = Stdlib.Bigarray.complex32_elt =
  1. | Complex32_elt
type complex64_elt = Stdlib.Bigarray.complex64_elt =
  1. | Complex64_elt
type ('a, 'b) kind = ('a, 'b) Stdlib.Bigarray.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 : (Stdlib.Complex.t, complex32_elt) kind
  12. | Complex64 : (Stdlib.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
+Bigarray (ocaml.Bigarray)

Module Bigarray

include module type of struct include Stdlib.Bigarray end

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.0 Moved from otherlibs to stdlib.
type float32_elt = Stdlib.Bigarray.float32_elt =
  1. | Float32_elt
type float64_elt = Stdlib.Bigarray.float64_elt =
  1. | Float64_elt
type int8_signed_elt = Stdlib.Bigarray.int8_signed_elt =
  1. | Int8_signed_elt
type int8_unsigned_elt = Stdlib.Bigarray.int8_unsigned_elt =
  1. | Int8_unsigned_elt
type int16_signed_elt = Stdlib.Bigarray.int16_signed_elt =
  1. | Int16_signed_elt
type int16_unsigned_elt = Stdlib.Bigarray.int16_unsigned_elt =
  1. | Int16_unsigned_elt
type int32_elt = Stdlib.Bigarray.int32_elt =
  1. | Int32_elt
type int64_elt = Stdlib.Bigarray.int64_elt =
  1. | Int64_elt
type int_elt = Stdlib.Bigarray.int_elt =
  1. | Int_elt
type nativeint_elt = Stdlib.Bigarray.nativeint_elt =
  1. | Nativeint_elt
type complex32_elt = Stdlib.Bigarray.complex32_elt =
  1. | Complex32_elt
type complex64_elt = Stdlib.Bigarray.complex64_elt =
  1. | Complex64_elt
type ('a, 'b) kind = ('a, 'b) Stdlib.Bigarray.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 : (Stdlib.Complex.t, complex32_elt) kind
  12. | Complex64 : (Stdlib.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 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.0

Array layouts

type c_layout = Stdlib.Bigarray.c_layout =
  1. | C_layout_typ
type fortran_layout = Stdlib.Bigarray.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 = 'a Stdlib.Bigarray.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 = Stdlib.Bigarray.Genarray

Zero-dimensional arrays

module Array0 = Stdlib.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.

One-dimensional arrays

module Array1 = Stdlib.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.

Two-dimensional arrays

module Array2 = Stdlib.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.

Three-dimensional arrays

module Array3 = Stdlib.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.

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.0
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.0
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.0
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 : + | Char -> '\000'
val float32 : (float, float32_elt) kind
val float64 : (float, float64_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.0

Array layouts

type c_layout = Stdlib.Bigarray.c_layout =
  1. | C_layout_typ
type fortran_layout = Stdlib.Bigarray.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 = 'a Stdlib.Bigarray.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 = Stdlib.Bigarray.Genarray

Zero-dimensional arrays

module Array0 = Stdlib.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.

One-dimensional arrays

module Array1 = Stdlib.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.

Two-dimensional arrays

module Array2 = Stdlib.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.

Three-dimensional arrays

module Array3 = Stdlib.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.

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.0
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.0
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.0
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 -> int -> - ('a, 'b, 'c) Array3.t

Specialized version of Bigarray.reshape for reshaping to three-dimensional arrays.

\ No newline at end of file + ('a, 'b, 'c) Array3.t

Specialized version of Bigarray.reshape for reshaping to three-dimensional arrays.

diff --git a/dev/ocaml/Binutils/index.html b/dev/ocaml/Binutils/index.html index afc6b7cb..14029c3d 100644 --- a/dev/ocaml/Binutils/index.html +++ b/dev/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/dev/ocaml/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html b/dev/ocaml/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html index 01b97d5f..b0f02ac2 100644 --- a/dev/ocaml/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html +++ b/dev/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/dev/ocaml/Branch_relaxation/Make/argument-1-T/index.html b/dev/ocaml/Branch_relaxation/Make/argument-1-T/index.html index 4a4bc543..b685111f 100644 --- a/dev/ocaml/Branch_relaxation/Make/argument-1-T/index.html +++ b/dev/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/dev/ocaml/Branch_relaxation/Make/index.html b/dev/ocaml/Branch_relaxation/Make/index.html index 9d6881ee..3b445f0e 100644 --- a/dev/ocaml/Branch_relaxation/Make/index.html +++ b/dev/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/dev/ocaml/Branch_relaxation/index.html b/dev/ocaml/Branch_relaxation/index.html index 16000ff5..781f48bf 100644 --- a/dev/ocaml/Branch_relaxation/index.html +++ b/dev/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/dev/ocaml/Branch_relaxation_intf/index.html b/dev/ocaml/Branch_relaxation_intf/index.html index 2d7d2fe5..1fcbd1db 100644 --- a/dev/ocaml/Branch_relaxation_intf/index.html +++ b/dev/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/dev/ocaml/Branch_relaxation_intf/module-type-S/Cond_branch/index.html b/dev/ocaml/Branch_relaxation_intf/module-type-S/Cond_branch/index.html index cf55d67b..aed3ca3c 100644 --- a/dev/ocaml/Branch_relaxation_intf/module-type-S/Cond_branch/index.html +++ b/dev/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/dev/ocaml/Branch_relaxation_intf/module-type-S/index.html b/dev/ocaml/Branch_relaxation_intf/module-type-S/index.html index aadbabcb..3ae491b3 100644 --- a/dev/ocaml/Branch_relaxation_intf/module-type-S/index.html +++ b/dev/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/dev/ocaml/Btype/For_copy/index.html b/dev/ocaml/Btype/For_copy/index.html index d863e06b..40b4fe56 100644 --- a/dev/ocaml/Btype/For_copy/index.html +++ b/dev/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/dev/ocaml/Btype/TransientTypeMap/index.html b/dev/ocaml/Btype/TransientTypeMap/index.html index e689a81a..76ed23a8 100644 --- a/dev/ocaml/Btype/TransientTypeMap/index.html +++ b/dev/ocaml/Btype/TransientTypeMap/index.html @@ -1,8 +1,8 @@ -TransientTypeMap (ocaml.Btype.TransientTypeMap)

Module Btype.TransientTypeMap

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 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 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 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.0
val singleton : key -> 'a -> 'a t

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

  • since 3.12.0
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

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 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 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 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.0
val singleton : key -> 'a -> 'a t

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

  • since 3.12.0
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.0
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.0
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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

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.

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.0
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.0
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.0
  • 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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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
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.0
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
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.

Maps and Sequences

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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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
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.0
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
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.

Maps and Sequences

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/dev/ocaml/Btype/TypeHash/index.html b/dev/ocaml/Btype/TypeHash/index.html index c1024d23..05250fc3 100644 --- a/dev/ocaml/Btype/TypeHash/index.html +++ b/dev/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.0
val copy : 'a t -> 'a t
val remove : 'a t -> key -> unit
val find_opt : 'a t -> key -> 'a option
  • since 4.05.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
  • since 4.00.0
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 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.0
val copy : 'a t -> 'a t
val remove : 'a t -> key -> unit
val find_opt : 'a t -> key -> 'a option
  • since 4.05.0
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.0
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
  • since 4.00.0
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 find : 'a t -> Types.type_expr -> 'a
val iter : (Types.type_expr -> 'a -> unit) -> 'a t -> unit
diff --git a/dev/ocaml/Btype/TypeMap/index.html b/dev/ocaml/Btype/TypeMap/index.html index e9aa698d..ada54fbc 100644 --- a/dev/ocaml/Btype/TypeMap/index.html +++ b/dev/ocaml/Btype/TypeMap/index.html @@ -1,5 +1,5 @@ -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

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 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 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.0
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) -> @@ -7,4 +7,4 @@ '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.0
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.0
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 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 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 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.0
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.0
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.0
  • 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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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
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.0
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
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.

Maps and Sequences

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.0
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.0
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12.0
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 Stdlib.Map.Make.

  • since 3.12.0
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.0
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.0
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.0
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
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.0
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
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.

Maps and Sequences

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/dev/ocaml/Btype/TypePairs/index.html b/dev/ocaml/Btype/TypePairs/index.html index 05a2844f..4e2f0368 100644 --- a/dev/ocaml/Btype/TypePairs/index.html +++ b/dev/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/dev/ocaml/Btype/TypeSet/index.html b/dev/ocaml/Btype/TypeSet/index.html index bb363c3a..41e3f868 100644 --- a/dev/ocaml/Btype/TypeSet/index.html +++ b/dev/ocaml/Btype/TypeSet/index.html @@ -1,3 +1,3 @@ -TypeSet (ocaml.Btype.TypeSet)

Module Btype.TypeSet

include Set.S with type elt = Types.transient_expr

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val is_empty : t -> bool

Test whether a set is empty or not.

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.0
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

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 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.0
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

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.0
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 cardinal : t -> int

Return the number of elements of a set.

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
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.

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.0
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
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.0

Iterators

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

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val is_empty : t -> bool

Test whether a set is empty or not.

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.0
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

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 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.0
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

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.0
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 cardinal : t -> int

Return the number of elements of a set.

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
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.

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.0
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
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.0

Iterators

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/dev/ocaml/Btype/index.html b/dev/ocaml/Btype/index.html index 8d6da805..9fc70ca1 100644 --- a/dev/ocaml/Btype/index.html +++ b/dev/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/dev/ocaml/Build_export_info/index.html b/dev/ocaml/Build_export_info/index.html index 07f405ac..150a2ca8 100644 --- a/dev/ocaml/Build_export_info/index.html +++ b/dev/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/dev/ocaml/Build_path_prefix_map/index.html b/dev/ocaml/Build_path_prefix_map/index.html index e31a148d..156dd455 100644 --- a/dev/ocaml/Build_path_prefix_map/index.html +++ b/dev/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.

    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_opt : map -> path -> path option

    rewrite_opt 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 : map -> path -> 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.

    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_opt : map -> path -> path option

    rewrite_opt 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 : map -> path -> path
    diff --git a/dev/ocaml/Builtin_attributes/index.html b/dev/ocaml/Builtin_attributes/index.html index 1dc31d4a..96168ac6 100644 --- a/dev/ocaml/Builtin_attributes/index.html +++ b/dev/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/dev/ocaml/Bytegen/index.html b/dev/ocaml/Bytegen/index.html index c0374597..d03ba42e 100644 --- a/dev/ocaml/Bytegen/index.html +++ b/dev/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
    val reset : unit -> unit
    \ No newline at end of file + Instruct.debug_event
    diff --git a/dev/ocaml/Bytelibrarian/index.html b/dev/ocaml/Bytelibrarian/index.html index 6013a657..400beb57 100644 --- a/dev/ocaml/Bytelibrarian/index.html +++ b/dev/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/dev/ocaml/Bytelink/index.html b/dev/ocaml/Bytelink/index.html index ffc5b691..7ac00880 100644 --- a/dev/ocaml/Bytelink/index.html +++ b/dev/ocaml/Bytelink/index.html @@ -1,2 +1,2 @@ -Bytelink (ocaml.Bytelink)

    Module Bytelink

    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
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file +Bytelink (ocaml.Bytelink)

    Module Bytelink

    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
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/dev/ocaml/Bytepackager/index.html b/dev/ocaml/Bytepackager/index.html index d6273220..1f13d0f0 100644 --- a/dev/ocaml/Bytepackager/index.html +++ b/dev/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
    val reset : unit -> 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
    val reset : unit -> unit
    diff --git a/dev/ocaml/Bytesections/index.html b/dev/ocaml/Bytesections/index.html index d71c72b6..c23e9caa 100644 --- a/dev/ocaml/Bytesections/index.html +++ b/dev/ocaml/Bytesections/index.html @@ -1,2 +1,2 @@ -Bytesections (ocaml.Bytesections)

    Module Bytesections

    Recording sections written to a bytecode executable file

    val init_record : out_channel -> unit
    val record : out_channel -> string -> unit
    val write_toc_and_trailer : out_channel -> unit

    Reading sections from a bytecode executable file

    val read_toc : in_channel -> unit
    exception Bad_magic_number
    val toc : unit -> (string * int) list
    val seek_section : in_channel -> string -> int
    val read_section_string : in_channel -> string -> string
    val read_section_struct : in_channel -> string -> 'a
    val pos_first_section : in_channel -> int
    val reset : unit -> unit
    \ No newline at end of file +Bytesections (ocaml.Bytesections)

    Module Bytesections

    Recording sections written to a bytecode executable file

    val init_record : out_channel -> unit
    val record : out_channel -> string -> unit
    val write_toc_and_trailer : out_channel -> unit

    Reading sections from a bytecode executable file

    val read_toc : in_channel -> unit
    exception Bad_magic_number
    val toc : unit -> (string * int) list
    val seek_section : in_channel -> string -> int
    val read_section_string : in_channel -> string -> string
    val read_section_struct : in_channel -> string -> 'a
    val pos_first_section : in_channel -> int
    val reset : unit -> unit
    diff --git a/dev/ocaml/CSE/class-cse/index.html b/dev/ocaml/CSE/class-cse/index.html index 068740bf..4760489a 100644 --- a/dev/ocaml/CSE/class-cse/index.html +++ b/dev/ocaml/CSE/class-cse/index.html @@ -1,2 +1,2 @@ -cse (ocaml.CSE.cse)

    Class CSE.cse

    method class_of_operation : cse -> Mach.operation -> CSEgen.op_class
    \ No newline at end of file +cse (ocaml.CSE.cse)

    Class CSE.cse

    method class_of_operation : Mach.operation -> CSEgen.op_class
    diff --git a/dev/ocaml/CSE/index.html b/dev/ocaml/CSE/index.html index c669ec71..70f31a40 100644 --- a/dev/ocaml/CSE/index.html +++ b/dev/ocaml/CSE/index.html @@ -1,2 +1,2 @@ -CSE (ocaml.CSE)

    Module CSE

    class cse : object ... end
    val fundecl : Mach.fundecl -> Mach.fundecl
    \ No newline at end of file +CSE (ocaml.CSE)

    Module CSE

    class cse : object ... end
    val fundecl : Mach.fundecl -> Mach.fundecl
    diff --git a/dev/ocaml/CSEgen/class-cse_generic/index.html b/dev/ocaml/CSEgen/class-cse_generic/index.html index c79febf5..27db6941 100644 --- a/dev/ocaml/CSEgen/class-cse_generic/index.html +++ b/dev/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/dev/ocaml/CSEgen/index.html b/dev/ocaml/CSEgen/index.html index 4ffb6373..b6833454 100644 --- a/dev/ocaml/CSEgen/index.html +++ b/dev/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/dev/ocaml/CamlinternalAtomic/index.html b/dev/ocaml/CamlinternalAtomic/index.html index 5876eaa5..fe7ef1ee 100644 --- a/dev/ocaml/CamlinternalAtomic/index.html +++ b/dev/ocaml/CamlinternalAtomic/index.html @@ -1,2 +1,2 @@ -CamlinternalAtomic (ocaml.CamlinternalAtomic)

    Module CamlinternalAtomic

    type !'a t
    val make : 'a -> 'a t
    val get : 'a t -> 'a
    val set : 'a t -> 'a -> unit
    val exchange : 'a t -> 'a -> 'a
    val compare_and_set : 'a t -> 'a -> 'a -> bool
    val fetch_and_add : int t -> int -> int
    val incr : int t -> unit
    val decr : int t -> unit
    \ No newline at end of file +CamlinternalAtomic (ocaml.CamlinternalAtomic)

    Module CamlinternalAtomic

    type !'a t
    val make : 'a -> 'a t
    val get : 'a t -> 'a
    val set : 'a t -> 'a -> unit
    val exchange : 'a t -> 'a -> 'a
    val compare_and_set : 'a t -> 'a -> 'a -> bool
    val fetch_and_add : int t -> int -> int
    val incr : int t -> unit
    val decr : int t -> unit
    diff --git a/dev/ocaml/CamlinternalFormat/index.html b/dev/ocaml/CamlinternalFormat/index.html index c3cf139d..0510c55d 100644 --- a/dev/ocaml/CamlinternalFormat/index.html +++ b/dev/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/dev/ocaml/CamlinternalFormatBasics/index.html b/dev/ocaml/CamlinternalFormatBasics/index.html index d47a1e0c..01138a0b 100644 --- a/dev/ocaml/CamlinternalFormatBasics/index.html +++ b/dev/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/dev/ocaml/CamlinternalLazy/index.html b/dev/ocaml/CamlinternalLazy/index.html index d77cefe5..df9599b0 100644 --- a/dev/ocaml/CamlinternalLazy/index.html +++ b/dev/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.

    exception Undefined
    type 'a t = 'a lazy_t
    val force_lazy_block : 'a lazy_t -> 'a
    val force_val_lazy_block : 'a lazy_t -> 'a
    val force : 'a lazy_t -> 'a
    val force_val : '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.

    exception Undefined
    type 'a t = 'a lazy_t
    val force_lazy_block : 'a lazy_t -> 'a
    val force_val_lazy_block : 'a lazy_t -> 'a
    val force : 'a lazy_t -> 'a
    val force_val : 'a lazy_t -> 'a
    diff --git a/dev/ocaml/CamlinternalMenhirLib/Convert/Simplified/index.html b/dev/ocaml/CamlinternalMenhirLib/Convert/Simplified/index.html index 9e389160..efe37357 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Convert/Simplified/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Convert/index.html b/dev/ocaml/CamlinternalMenhirLib/Convert/index.html index 2fa80515..b5e1a216 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Convert/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html b/dev/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html index a803edcb..f2422320 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html b/dev/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html index 6817ba57..da374411 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Engine/Make/index.html b/dev/ocaml/CamlinternalMenhirLib/Engine/Make/index.html index 6548195f..d33acbba 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Engine/Make/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Engine/index.html b/dev/ocaml/CamlinternalMenhirLib/Engine/index.html index d8880a64..6da9bb9f 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Engine/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/EngineTypes/index.html b/dev/ocaml/CamlinternalMenhirLib/EngineTypes/index.html index 72c7c98d..207376df 100644 --- a/dev/ocaml/CamlinternalMenhirLib/EngineTypes/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html b/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html index 1440b2b7..d67779d7 100644 --- a/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html b/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html index ea743e5d..71f942fc 100644 --- a/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html b/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html index 0c95d499..7776c92e 100644 --- a/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html b/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html index 825342ed..ad2ace1a 100644 --- a/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html b/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html index c762ad5f..4d1d952c 100644 --- a/dev/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/ErrorReports/index.html b/dev/ocaml/CamlinternalMenhirLib/ErrorReports/index.html index 4dddfa44..905cd824 100644 --- a/dev/ocaml/CamlinternalMenhirLib/ErrorReports/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/General/index.html b/dev/ocaml/CamlinternalMenhirLib/General/index.html index 0587745b..0767481c 100644 --- a/dev/ocaml/CamlinternalMenhirLib/General/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/index.html b/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/index.html index c1ec55d8..1bc85989 100644 --- a/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html b/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html index 3b267c54..489b34d7 100644 --- a/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html b/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html index acdafd3c..03ae5c94 100644 --- a/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html b/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html index d56c72d7..6fb96dc8 100644 --- a/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html b/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html index 86d7c204..0f2cdbb8 100644 --- a/dev/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InfiniteArray/index.html b/dev/ocaml/CamlinternalMenhirLib/InfiniteArray/index.html index 7738278c..c6bdba75 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InfiniteArray/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableFormat/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableFormat/index.html index 4d1b11da..726555cf 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableFormat/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html index e8b114c1..51efabf5 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html index 5f8a55dc..47135685 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html index 9eb5ac9a..c538e4ed 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html index 7f03e701..b77df1c1 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html index e79e0c37..8fa1bfb5 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html index 717ca94f..a76c6443 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html index ee593a2b..74914635 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html index aec38eec..1f03da18 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html index aa596a98..3d22a2dc 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/index.html b/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/index.html index 04a46b39..790064fd 100644 --- a/dev/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/LexerUtil/index.html b/dev/ocaml/CamlinternalMenhirLib/LexerUtil/index.html index eda9257e..e75373fd 100644 --- a/dev/ocaml/CamlinternalMenhirLib/LexerUtil/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/LinearizedArray/index.html b/dev/ocaml/CamlinternalMenhirLib/LinearizedArray/index.html index b891a7b8..aeeb0475 100644 --- a/dev/ocaml/CamlinternalMenhirLib/LinearizedArray/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/PackedIntArray/index.html b/dev/ocaml/CamlinternalMenhirLib/PackedIntArray/index.html index ac15e00e..c7b76905 100644 --- a/dev/ocaml/CamlinternalMenhirLib/PackedIntArray/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html b/dev/ocaml/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html index fc235c7c..848bf43e 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html b/dev/ocaml/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html index 7c3c7810..9c50cb4c 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Printers/Make/index.html b/dev/ocaml/CamlinternalMenhirLib/Printers/Make/index.html index 74f8e1e7..a5aa1534 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Printers/Make/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/Printers/index.html b/dev/ocaml/CamlinternalMenhirLib/Printers/index.html index f70d9ab3..fa2759b9 100644 --- a/dev/ocaml/CamlinternalMenhirLib/Printers/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/RowDisplacement/index.html b/dev/ocaml/CamlinternalMenhirLib/RowDisplacement/index.html index 93da071a..5d3944ee 100644 --- a/dev/ocaml/CamlinternalMenhirLib/RowDisplacement/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/StaticVersion/index.html b/dev/ocaml/CamlinternalMenhirLib/StaticVersion/index.html index 410ed23a..9ec2c2ed 100644 --- a/dev/ocaml/CamlinternalMenhirLib/StaticVersion/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/TableFormat/index.html b/dev/ocaml/CamlinternalMenhirLib/TableFormat/index.html index 5309895d..13b297eb 100644 --- a/dev/ocaml/CamlinternalMenhirLib/TableFormat/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html b/dev/ocaml/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html index 736915ea..506e6773 100644 --- a/dev/ocaml/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html b/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html index 832afc91..3c59c193 100644 --- a/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html b/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html index ffacd487..c524335e 100644 --- a/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html b/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html index 251a1280..ae1b1088 100644 --- a/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/index.html b/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/index.html index 3793fd5d..fcbbb743 100644 --- a/dev/ocaml/CamlinternalMenhirLib/TableInterpreter/index.html +++ b/dev/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/dev/ocaml/CamlinternalMenhirLib/index.html b/dev/ocaml/CamlinternalMenhirLib/index.html index b42d289d..367777ec 100644 --- a/dev/ocaml/CamlinternalMenhirLib/index.html +++ b/dev/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/dev/ocaml/CamlinternalMod/index.html b/dev/ocaml/CamlinternalMod/index.html index ffaace72..1cf9f701 100644 --- a/dev/ocaml/CamlinternalMod/index.html +++ b/dev/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/dev/ocaml/CamlinternalOO/index.html b/dev/ocaml/CamlinternalOO/index.html index 0c1df594..5ed386c3 100644 --- a/dev/ocaml/CamlinternalOO/index.html +++ b/dev/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/dev/ocaml/Ccomp/index.html b/dev/ocaml/Ccomp/index.html index f40752d8..94dd1995 100644 --- a/dev/ocaml/Ccomp/index.html +++ b/dev/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 : 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 : string list -> string
    val quote_optfile : string option -> string
    val call_linker : link_mode -> string -> string list -> string -> int
    diff --git a/dev/ocaml/Clambda/index.html b/dev/ocaml/Clambda/index.html index 75c36d5a..79aeedae 100644 --- a/dev/ocaml/Clambda/index.html +++ b/dev/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/dev/ocaml/Clambda_primitives/index.html b/dev/ocaml/Clambda_primitives/index.html index 175fcd65..d4c202c0 100644 --- a/dev/ocaml/Clambda_primitives/index.html +++ b/dev/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
    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. | Pccall of Primitive.description
    11. | Praise of raise_kind
    12. | Psequand
    13. | Psequor
    14. | Pnot
    15. | Pnegint
    16. | Paddint
    17. | Psubint
    18. | Pmulint
    19. | Pdivint of is_safe
    20. | Pmodint of is_safe
    21. | Pandint
    22. | Porint
    23. | Pxorint
    24. | Plslint
    25. | Plsrint
    26. | Pasrint
    27. | Pintcomp of integer_comparison
    28. | Pcompare_ints
    29. | Pcompare_floats
    30. | Pcompare_bints of boxed_integer
    31. | Poffsetint of int
    32. | Poffsetref of int
    33. | Pintoffloat
    34. | Pfloatofint
    35. | Pnegfloat
    36. | Pabsfloat
    37. | Paddfloat
    38. | Psubfloat
    39. | Pmulfloat
    40. | Pdivfloat
    41. | Pfloatcomp of float_comparison
    42. | Pstringlength
    43. | Pstringrefu
    44. | Pstringrefs
    45. | Pbyteslength
    46. | Pbytesrefu
    47. | Pbytessetu
    48. | Pbytesrefs
    49. | Pbytessets
    50. | 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.

      *)
    51. | 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.

      *)
    52. | Parraylength of array_kind
    53. | Parrayrefu of array_kind
    54. | Parraysetu of array_kind
    55. | Parrayrefs of array_kind
    56. | Parraysets of array_kind
    57. | Pisint
    58. | Pisout
    59. | Pbintofint of boxed_integer
    60. | Pintofbint of boxed_integer
    61. | Pcvtbint of boxed_integer * boxed_integer
    62. | Pnegbint of boxed_integer
    63. | Paddbint of boxed_integer
    64. | Psubbint of boxed_integer
    65. | Pmulbint of boxed_integer
    66. | Pdivbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    67. | Pmodbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    68. | Pandbint of boxed_integer
    69. | Porbint of boxed_integer
    70. | Pxorbint of boxed_integer
    71. | Plslbint of boxed_integer
    72. | Plsrbint of boxed_integer
    73. | Pasrbint of boxed_integer
    74. | Pbintcomp of boxed_integer * integer_comparison
    75. | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
    76. | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
    77. | Pbigarraydim of int
    78. | Pstring_load of memory_access_size * is_safe
    79. | Pbytes_load of memory_access_size * is_safe
    80. | Pbytes_set of memory_access_size * is_safe
    81. | Pbigstring_load of memory_access_size * is_safe
    82. | Pbigstring_set of memory_access_size * is_safe
    83. | Pbswap16
    84. | Pbbswap of boxed_integer
    85. | Pint_as_pointer
    86. | Popaque
    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
    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. | Pccall of Primitive.description
    11. | Praise of raise_kind
    12. | Psequand
    13. | Psequor
    14. | Pnot
    15. | Pnegint
    16. | Paddint
    17. | Psubint
    18. | Pmulint
    19. | Pdivint of is_safe
    20. | Pmodint of is_safe
    21. | Pandint
    22. | Porint
    23. | Pxorint
    24. | Plslint
    25. | Plsrint
    26. | Pasrint
    27. | Pintcomp of integer_comparison
    28. | Pcompare_ints
    29. | Pcompare_floats
    30. | Pcompare_bints of boxed_integer
    31. | Poffsetint of int
    32. | Poffsetref of int
    33. | Pintoffloat
    34. | Pfloatofint
    35. | Pnegfloat
    36. | Pabsfloat
    37. | Paddfloat
    38. | Psubfloat
    39. | Pmulfloat
    40. | Pdivfloat
    41. | Pfloatcomp of float_comparison
    42. | Pstringlength
    43. | Pstringrefu
    44. | Pstringrefs
    45. | Pbyteslength
    46. | Pbytesrefu
    47. | Pbytessetu
    48. | Pbytesrefs
    49. | Pbytessets
    50. | 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.

      *)
    51. | 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.

      *)
    52. | Parraylength of array_kind
    53. | Parrayrefu of array_kind
    54. | Parraysetu of array_kind
    55. | Parrayrefs of array_kind
    56. | Parraysets of array_kind
    57. | Pisint
    58. | Pisout
    59. | Pbintofint of boxed_integer
    60. | Pintofbint of boxed_integer
    61. | Pcvtbint of boxed_integer * boxed_integer
    62. | Pnegbint of boxed_integer
    63. | Paddbint of boxed_integer
    64. | Psubbint of boxed_integer
    65. | Pmulbint of boxed_integer
    66. | Pdivbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    67. | Pmodbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    68. | Pandbint of boxed_integer
    69. | Porbint of boxed_integer
    70. | Pxorbint of boxed_integer
    71. | Plslbint of boxed_integer
    72. | Plsrbint of boxed_integer
    73. | Pasrbint of boxed_integer
    74. | Pbintcomp of boxed_integer * integer_comparison
    75. | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
    76. | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
    77. | Pbigarraydim of int
    78. | Pstring_load of memory_access_size * is_safe
    79. | Pbytes_load of memory_access_size * is_safe
    80. | Pbytes_set of memory_access_size * is_safe
    81. | Pbigstring_load of memory_access_size * is_safe
    82. | Pbigstring_set of memory_access_size * is_safe
    83. | Pbswap16
    84. | Pbbswap of boxed_integer
    85. | Pint_as_pointer
    86. | Popaque
    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/dev/ocaml/Clflags/Compiler_pass/index.html b/dev/ocaml/Clflags/Compiler_pass/index.html index 05ff15d4..dde59a23 100644 --- a/dev/ocaml/Clflags/Compiler_pass/index.html +++ b/dev/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. | Scheduling
    4. | 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. | Scheduling
    4. | 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/dev/ocaml/Clflags/Float_arg_helper/index.html b/dev/ocaml/Clflags/Float_arg_helper/index.html index 59c58d16..2c4f0cea 100644 --- a/dev/ocaml/Clflags/Float_arg_helper/index.html +++ b/dev/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/dev/ocaml/Clflags/Int_arg_helper/index.html b/dev/ocaml/Clflags/Int_arg_helper/index.html index d341fa3d..7d15936c 100644 --- a/dev/ocaml/Clflags/Int_arg_helper/index.html +++ b/dev/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/dev/ocaml/Clflags/index.html b/dev/ocaml/Clflags/index.html index 2e9bf772..b608cdb9 100644 --- a/dev/ocaml/Clflags/index.html +++ b/dev/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 compile_only : bool ref
    val output_name : string option ref
    val include_dirs : string list ref
    val no_std_include : 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 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 unsafe_string : 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 compile_only : bool ref
    val output_name : string option ref
    val include_dirs : string list ref
    val no_std_include : 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 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 unsafe_string : 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/dev/ocaml/Closure/index.html b/dev/ocaml/Closure/index.html index fcbacced..5af9ffcb 100644 --- a/dev/ocaml/Closure/index.html +++ b/dev/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/dev/ocaml/Closure_conversion/index.html b/dev/ocaml/Closure_conversion/index.html index 6a977d15..d275c9d5 100644 --- a/dev/ocaml/Closure_conversion/index.html +++ b/dev/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/dev/ocaml/Closure_conversion_aux/Env/index.html b/dev/ocaml/Closure_conversion_aux/Env/index.html index 87c328e9..8afd4b9f 100644 --- a/dev/ocaml/Closure_conversion_aux/Env/index.html +++ b/dev/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
    val at_toplevel : t -> bool
    val not_at_toplevel : t -> 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
    val at_toplevel : t -> bool
    val not_at_toplevel : t -> t
    diff --git a/dev/ocaml/Closure_conversion_aux/Function_decls/Function_decl/index.html b/dev/ocaml/Closure_conversion_aux/Function_decls/Function_decl/index.html index a7e8e4c0..2b20a154 100644 --- a/dev/ocaml/Closure_conversion_aux/Function_decls/Function_decl/index.html +++ b/dev/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/dev/ocaml/Closure_conversion_aux/Function_decls/index.html b/dev/ocaml/Closure_conversion_aux/Function_decls/index.html index 1472da70..6ad1b25e 100644 --- a/dev/ocaml/Closure_conversion_aux/Function_decls/index.html +++ b/dev/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/dev/ocaml/Closure_conversion_aux/index.html b/dev/ocaml/Closure_conversion_aux/index.html index 45be7373..83627d27 100644 --- a/dev/ocaml/Closure_conversion_aux/index.html +++ b/dev/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/dev/ocaml/Closure_element/Map/index.html b/dev/ocaml/Closure_element/Map/index.html index 7004a228..3e2061d9 100644 --- a/dev/ocaml/Closure_element/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Closure_element/Set/index.html b/dev/ocaml/Closure_element/Set/index.html index 544b1388..3deebf28 100644 --- a/dev/ocaml/Closure_element/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Closure_element/T/index.html b/dev/ocaml/Closure_element/T/index.html index 6fe91623..eaedc23e 100644 --- a/dev/ocaml/Closure_element/T/index.html +++ b/dev/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/dev/ocaml/Closure_element/Tbl/index.html b/dev/ocaml/Closure_element/Tbl/index.html index 115155ef..afa522f8 100644 --- a/dev/ocaml/Closure_element/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Closure_element/index.html b/dev/ocaml/Closure_element/index.html index b5dfa78e..0a2cab2d 100644 --- a/dev/ocaml/Closure_element/index.html +++ b/dev/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/dev/ocaml/Closure_id/Map/index.html b/dev/ocaml/Closure_id/Map/index.html index 73f3ab78..4de94a4d 100644 --- a/dev/ocaml/Closure_id/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Closure_id/Set/index.html b/dev/ocaml/Closure_id/Set/index.html index 5c35c2ed..09e0a042 100644 --- a/dev/ocaml/Closure_id/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Closure_id/T/index.html b/dev/ocaml/Closure_id/T/index.html index d8624deb..fd930472 100644 --- a/dev/ocaml/Closure_id/T/index.html +++ b/dev/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/dev/ocaml/Closure_id/Tbl/index.html b/dev/ocaml/Closure_id/Tbl/index.html index daa7a917..e6dcc50e 100644 --- a/dev/ocaml/Closure_id/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Closure_id/index.html b/dev/ocaml/Closure_id/index.html index 5c15639b..0a9d88de 100644 --- a/dev/ocaml/Closure_id/index.html +++ b/dev/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/dev/ocaml/Closure_middle_end/index.html b/dev/ocaml/Closure_middle_end/index.html index 123a5f24..2f049bd6 100644 --- a/dev/ocaml/Closure_middle_end/index.html +++ b/dev/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/dev/ocaml/Closure_offsets/index.html b/dev/ocaml/Closure_offsets/index.html index 7edb6e38..36369cb7 100644 --- a/dev/ocaml/Closure_offsets/index.html +++ b/dev/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/dev/ocaml/Closure_origin/Map/index.html b/dev/ocaml/Closure_origin/Map/index.html index fed8cd26..67f60bb7 100644 --- a/dev/ocaml/Closure_origin/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Closure_origin/Set/index.html b/dev/ocaml/Closure_origin/Set/index.html index 3f585385..0628c94c 100644 --- a/dev/ocaml/Closure_origin/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Closure_origin/T/index.html b/dev/ocaml/Closure_origin/T/index.html index 24a4a885..2c399b71 100644 --- a/dev/ocaml/Closure_origin/T/index.html +++ b/dev/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/dev/ocaml/Closure_origin/Tbl/index.html b/dev/ocaml/Closure_origin/Tbl/index.html index e0a8e63b..1d910c40 100644 --- a/dev/ocaml/Closure_origin/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Closure_origin/index.html b/dev/ocaml/Closure_origin/index.html index 72cee388..243a3c6e 100644 --- a/dev/ocaml/Closure_origin/index.html +++ b/dev/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/dev/ocaml/Cmi_format/index.html b/dev/ocaml/Cmi_format/index.html index a73ce0cd..868e0f73 100644 --- a/dev/ocaml/Cmi_format/index.html +++ b/dev/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
    4. | Unsafe_string
    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
    4. | Unsafe_string
    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/dev/ocaml/Cmm/index.html b/dev/ocaml/Cmm/index.html index cc82cc66..dfd024a8 100644 --- a/dev/ocaml/Cmm/index.html +++ b/dev/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".

      *)
    3. | Cload of memory_chunk * Asttypes.mutable_flag
    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
    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/dev/ocaml/Cmm_helpers/index.html b/dev/ocaml/Cmm_helpers/index.html index 36d7078c..ba3272ed 100644 --- a/dev/ocaml/Cmm_helpers/index.html +++ b/dev/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 -> @@ -74,7 +74,7 @@ Cmm.expression -> Debuginfo.t -> Cmm.expression
    val array_indexing : - ?typ:Cmm.machtype_component -> + ?typ:Cmm.machtype_component -> int -> Cmm.expression -> Cmm.expression -> @@ -284,7 +284,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 -> @@ -324,4 +324,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/dev/ocaml/Cmm_invariants/index.html b/dev/ocaml/Cmm_invariants/index.html index 63d25d91..52fb126f 100644 --- a/dev/ocaml/Cmm_invariants/index.html +++ b/dev/ocaml/Cmm_invariants/index.html @@ -1,2 +1,2 @@ -Cmm_invariants (ocaml.Cmm_invariants)

    Module Cmm_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

    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/dev/ocaml/Cmmgen/index.html b/dev/ocaml/Cmmgen/index.html index 1fc65304..edcfb152 100644 --- a/dev/ocaml/Cmmgen/index.html +++ b/dev/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/dev/ocaml/Cmmgen_state/index.html b/dev/ocaml/Cmmgen_state/index.html index 1cea6500..87c1f09c 100644 --- a/dev/ocaml/Cmmgen_state/index.html +++ b/dev/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/dev/ocaml/Cmo_format/index.html b/dev/ocaml/Cmo_format/index.html index 226c8bfe..683e3afe 100644 --- a/dev/ocaml/Cmo_format/index.html +++ b/dev/ocaml/Cmo_format/index.html @@ -1,2 +1,2 @@ -Cmo_format (ocaml.Cmo_format)

    Module Cmo_format

    type reloc_info =
    1. | Reloc_literal of Lambda.structured_constant
    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 Lambda.structured_constant
    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/dev/ocaml/Cmt2annot/index.html b/dev/ocaml/Cmt2annot/index.html index 8fbee952..72f629cd 100644 --- a/dev/ocaml/Cmt2annot/index.html +++ b/dev/ocaml/Cmt2annot/index.html @@ -1,7 +1,7 @@ -Cmt2annot (ocaml.Cmt2annot)

    Module Cmt2annot

    val variables_iterator : Location.t -> Tast_iterator.iterator
    val bind_variables : Location.t -> 'a Typedtree.general_pattern -> unit
    val bind_bindings : Location.t -> Typedtree.value_binding list -> unit
    val bind_cases : 'a Typedtree.case list -> unit
    val record_module_binding : Location.t -> Typedtree.module_binding -> unit
    val iterator : scope:Location.t -> bool -> Tast_iterator.iterator
    val binary_part : Tast_iterator.iterator -> Cmt_format.binary_part -> unit
    val gen_annot : +Cmt2annot (ocaml.Cmt2annot)

    Module Cmt2annot

    val variables_iterator : Location.t -> Tast_iterator.iterator
    val bind_variables : Location.t -> 'a Typedtree.general_pattern -> unit
    val bind_bindings : Location.t -> Typedtree.value_binding list -> unit
    val bind_cases : 'a Typedtree.case list -> unit
    val record_module_binding : Location.t -> Typedtree.module_binding -> unit
    val iterator : scope:Location.t -> bool -> Tast_iterator.iterator
    val binary_part : Tast_iterator.iterator -> Cmt_format.binary_part -> unit
    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/dev/ocaml/Cmt_format/index.html b/dev/ocaml/Cmt_format/index.html index bc6067bc..4b1f18d3 100644 --- a/dev/ocaml/Cmt_format/index.html +++ b/dev/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/dev/ocaml/Cmx_format/index.html b/dev/ocaml/Cmx_format/index.html index 00a4884c..5d4b70fc 100644 --- a/dev/ocaml/Cmx_format/index.html +++ b/dev/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;
    }
    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;
    }
    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/dev/ocaml/Cmxs_format/index.html b/dev/ocaml/Cmxs_format/index.html index c29360ed..0bef705d 100644 --- a/dev/ocaml/Cmxs_format/index.html +++ b/dev/ocaml/Cmxs_format/index.html @@ -1,2 +1,2 @@ -Cmxs_format (ocaml.Cmxs_format)

    Module Cmxs_format

    type dynunit = {
    1. dynu_name : Misc.modname;
    2. dynu_crc : Stdlib.Digest.t;
    3. dynu_imports_cmi : Misc.crcs;
    4. dynu_imports_cmx : Misc.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 dynunit = {
    1. dynu_name : Misc.modname;
    2. dynu_crc : Stdlib.Digest.t;
    3. dynu_imports_cmi : Misc.crcs;
    4. dynu_imports_cmx : Misc.crcs;
    5. dynu_defines : string list;
    }
    type dynheader = {
    1. dynu_magic : string;
    2. dynu_units : dynunit list;
    }
    diff --git a/dev/ocaml/Coloring/index.html b/dev/ocaml/Coloring/index.html index fcd955ae..24f510e3 100644 --- a/dev/ocaml/Coloring/index.html +++ b/dev/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/dev/ocaml/Comballoc/index.html b/dev/ocaml/Comballoc/index.html index d7da6379..ad9e740b 100644 --- a/dev/ocaml/Comballoc/index.html +++ b/dev/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/dev/ocaml/Compenv/index.html b/dev/ocaml/Compenv/index.html index dd1ae50d..1741417d 100644 --- a/dev/ocaml/Compenv/index.html +++ b/dev/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/dev/ocaml/Compilation_unit/Map/index.html b/dev/ocaml/Compilation_unit/Map/index.html index 04e073bc..a5038e12 100644 --- a/dev/ocaml/Compilation_unit/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Compilation_unit/Set/index.html b/dev/ocaml/Compilation_unit/Set/index.html index 19ad71ae..5ac13647 100644 --- a/dev/ocaml/Compilation_unit/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Compilation_unit/T/index.html b/dev/ocaml/Compilation_unit/T/index.html index 2c073abd..b20b1c57 100644 --- a/dev/ocaml/Compilation_unit/T/index.html +++ b/dev/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/dev/ocaml/Compilation_unit/Tbl/index.html b/dev/ocaml/Compilation_unit/Tbl/index.html index 08c02d50..4cc6f66a 100644 --- a/dev/ocaml/Compilation_unit/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Compilation_unit/index.html b/dev/ocaml/Compilation_unit/index.html index 81a7b8e2..4a912b63 100644 --- a/dev/ocaml/Compilation_unit/index.html +++ b/dev/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/dev/ocaml/Compile/index.html b/dev/ocaml/Compile/index.html index b8f9fe6d..f5f5d984 100644 --- a/dev/ocaml/Compile/index.html +++ b/dev/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/dev/ocaml/Compile_common/index.html b/dev/ocaml/Compile_common/index.html index 3bbbe8e4..c7419ed7 100644 --- a/dev/ocaml/Compile_common/index.html +++ b/dev/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/dev/ocaml/Compilenv/index.html b/dev/ocaml/Compilenv/index.html index 25fbeb6e..d6487555 100644 --- a/dev/ocaml/Compilenv/index.html +++ b/dev/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
    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
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/dev/ocaml/Compmisc/index.html b/dev/ocaml/Compmisc/index.html index 954f6758..ba798913 100644 --- a/dev/ocaml/Compmisc/index.html +++ b/dev/ocaml/Compmisc/index.html @@ -1,2 +1,2 @@ -Compmisc (ocaml.Compmisc)

    Module Compmisc

    val init_path : ?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
    \ No newline at end of file +Compmisc (ocaml.Compmisc)

    Module Compmisc

    val init_path : ?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
    diff --git a/dev/ocaml/Condition/index.html b/dev/ocaml/Condition/index.html index 242ffff7..4be59f59 100644 --- a/dev/ocaml/Condition/index.html +++ b/dev/ocaml/Condition/index.html @@ -1,8 +1,8 @@ -Condition (ocaml.Condition)

    Module Condition

    Condition variables to synchronize between threads.

    Condition variables are used when one thread wants to wait until another thread has finished doing something: the former thread 'waits' on the condition variable, the latter thread 'signals' the condition when it is done. Condition variables should always be protected by a mutex. The typical use is (if D is a shared data structure, m its mutex, and c is a condition variable):

    Mutex.lock m;
    +Condition (ocaml.Condition)

    Module Condition

    Condition variables to synchronize between threads.

    Condition variables are used when one thread wants to wait until another thread has finished doing something: the former thread 'waits' on the condition variable, the latter thread 'signals' the condition when it is done. Condition variables should always be protected by a mutex. The typical use is (if D is a shared data structure, m its mutex, and c is a condition variable):

    Mutex.lock m;
     while (* some predicate P over D is not satisfied *) do
       Condition.wait c m
     done;
     (* Modify D *)
     if (* the predicate P over D is now satisfied *) then Condition.signal c;
    -Mutex.unlock m
    type t

    The type of condition variables.

    val create : unit -> t

    Return a new condition variable.

    val wait : t -> Mutex.t -> unit

    wait c m atomically unlocks the mutex m and suspends the calling process on the condition variable c. The process will restart after the condition variable c has been signalled. The mutex m is locked again before wait returns.

    val signal : t -> unit

    signal c restarts one of the processes waiting on the condition variable c.

    val broadcast : t -> unit

    broadcast c restarts all processes waiting on the condition variable c.

    \ No newline at end of file +Mutex.unlock m
    type t

    The type of condition variables.

    val create : unit -> t

    Return a new condition variable.

    val wait : t -> Mutex.t -> unit

    wait c m atomically unlocks the mutex m and suspends the calling process on the condition variable c. The process will restart after the condition variable c has been signalled. The mutex m is locked again before wait returns.

    val signal : t -> unit

    signal c restarts one of the processes waiting on the condition variable c.

    val broadcast : t -> unit

    broadcast c restarts all processes waiting on the condition variable c.

    diff --git a/dev/ocaml/Config/index.html b/dev/ocaml/Config/index.html index d5f8dfea..3856177b 100644 --- a/dev/ocaml/Config/index.html +++ b/dev/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 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.0
    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 profinfo : bool

    Whether the compiler was configured for profiling

    val profinfo_width : int

    How many bits are to be used in values' headers for profiling information

    val safe_string : bool

    Whether the compiler was configured with -force-safe-string; in that case, the -unsafe-string compile-time option is unavailable

    • since 4.05.0
    val default_safe_string : bool

    Whether the compiler was configured to use the -safe-string or -unsafe-string compile-time option by default.

    • since 4.06.0
    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.0
    val supports_shared_libraries : bool

    Whether shared libraries are supported

    • since 4.08.0
    val afl_instrument : bool

    Whether afl-fuzz instrumentation is generated by default

    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 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.0
    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 profinfo : bool

    Whether the compiler was configured for profiling

    val profinfo_width : int

    How many bits are to be used in values' headers for profiling information

    val safe_string : bool

    Whether the compiler was configured with -force-safe-string; in that case, the -unsafe-string compile-time option is unavailable

    • since 4.05.0
    val default_safe_string : bool

    Whether the compiler was configured to use the -safe-string or -unsafe-string compile-time option by default.

    • since 4.06.0
    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.0
    val supports_shared_libraries : bool

    Whether shared libraries are supported

    • since 4.08.0
    val afl_instrument : bool

    Whether afl-fuzz instrumentation is generated by default

    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/dev/ocaml/Consistbl/Make/argument-1-Module_name/Map/index.html b/dev/ocaml/Consistbl/Make/argument-1-Module_name/Map/index.html index 4b4c21b9..27a8c596 100644 --- a/dev/ocaml/Consistbl/Make/argument-1-Module_name/Map/index.html +++ b/dev/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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Consistbl/Make/argument-1-Module_name/Set/index.html b/dev/ocaml/Consistbl/Make/argument-1-Module_name/Set/index.html index ec3a0060..eda32291 100644 --- a/dev/ocaml/Consistbl/Make/argument-1-Module_name/Set/index.html +++ b/dev/ocaml/Consistbl/Make/argument-1-Module_name/Set/index.html @@ -1,3 +1,3 @@ -Set (ocaml.Consistbl.Make.Module_name.Set)

    Module Module_name.Set

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Consistbl/Make/argument-1-Module_name/Tbl/index.html b/dev/ocaml/Consistbl/Make/argument-1-Module_name/Tbl/index.html index a06c6cf7..91f6a64d 100644 --- a/dev/ocaml/Consistbl/Make/argument-1-Module_name/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Consistbl/Make/argument-1-Module_name/index.html b/dev/ocaml/Consistbl/Make/argument-1-Module_name/index.html index b1a77b4a..e6238a76 100644 --- a/dev/ocaml/Consistbl/Make/argument-1-Module_name/index.html +++ b/dev/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/dev/ocaml/Consistbl/Make/index.html b/dev/ocaml/Consistbl/Make/index.html index a1390222..80fe88ae 100644 --- a/dev/ocaml/Consistbl/Make/index.html +++ b/dev/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/dev/ocaml/Consistbl/index.html b/dev/ocaml/Consistbl/index.html index 774c468f..eb5b324d 100644 --- a/dev/ocaml/Consistbl/index.html +++ b/dev/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/dev/ocaml/Convert_primitives/index.html b/dev/ocaml/Convert_primitives/index.html index c3942d27..9b8fdbc9 100644 --- a/dev/ocaml/Convert_primitives/index.html +++ b/dev/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/dev/ocaml/Ctype/index.html b/dev/ocaml/Ctype/index.html index b6a1cac4..65603fe1 100644 --- a/dev/ocaml/Ctype/index.html +++ b/dev/ocaml/Ctype/index.html @@ -1,5 +1,5 @@ -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 init_def : int -> unit
    val begin_def : unit -> unit
    val end_def : unit -> unit
    val begin_class_def : unit -> unit
    val raise_nongen_level : unit -> unit
    val reset_global_level : unit -> unit
    val increase_global_level : unit -> int
    val restore_global_level : int -> unit
    type levels = {
    1. current_level : int;
    2. nongen_level : int;
    3. global_level : int;
    4. saved_level : (int * int) list;
    }
    val save_levels : unit -> levels
    val set_levels : levels -> 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 : +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 init_def : int -> unit
    val begin_def : unit -> unit
    val end_def : unit -> unit
    val begin_class_def : unit -> unit
    val raise_nongen_level : unit -> unit
    val reset_global_level : unit -> unit
    val increase_global_level : unit -> int
    val restore_global_level : int -> unit
    type levels = {
    1. current_level : int;
    2. nongen_level : int;
    3. global_level : int;
    4. saved_level : (int * int) list;
    }
    val save_levels : unit -> levels
    val set_levels : levels -> 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 -> @@ -28,18 +28,18 @@ * (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 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 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 existential_name : Types.constructor_description -> Types.type_expr -> string
    val instance_constructor : - ?in_pattern:(Env.t ref * int) -> + ?in_pattern:(Env.t ref * int) -> Types.constructor_description -> Types.type_expr list * Types.type_expr * Types.type_expr list
    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_parameterized_type_2 : @@ -52,7 +52,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 -> @@ -70,21 +70,21 @@ 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:bool -> + equations_level:int -> + allow_recursive:bool -> Env.t ref -> Types.type_expr -> Types.type_expr -> @@ -98,12 +98,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 -> @@ -129,7 +129,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 -> @@ -137,7 +137,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 -> @@ -145,7 +145,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 -> @@ -169,7 +169,7 @@ Env.t -> Ident.t list -> 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_schema : Env.t -> Types.type_expr -> bool
    val nongen_class_declaration : Types.class_declaration -> bool
    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.class_type_declaration
    val is_contractive : Env.t -> Path.t -> bool
    val normalize_type : Types.type_expr -> unit
    val nongen_schema : Env.t -> Types.type_expr -> bool
    val nongen_class_declaration : Types.class_declaration -> bool
    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 -> @@ -181,4 +181,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/dev/ocaml/Dataflow/Backward/argument-1-D/index.html b/dev/ocaml/Dataflow/Backward/argument-1-D/index.html index 436ff159..0d3497f3 100644 --- a/dev/ocaml/Dataflow/Backward/argument-1-D/index.html +++ b/dev/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/dev/ocaml/Dataflow/Backward/index.html b/dev/ocaml/Dataflow/Backward/index.html index 7569151b..f6fa8d60 100644 --- a/dev/ocaml/Dataflow/Backward/index.html +++ b/dev/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/dev/ocaml/Dataflow/index.html b/dev/ocaml/Dataflow/index.html index 3c174426..4a1c6b88 100644 --- a/dev/ocaml/Dataflow/index.html +++ b/dev/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/dev/ocaml/Dataflow/module-type-DOMAIN/index.html b/dev/ocaml/Dataflow/module-type-DOMAIN/index.html index c4c15b33..a497b6a6 100644 --- a/dev/ocaml/Dataflow/module-type-DOMAIN/index.html +++ b/dev/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/dev/ocaml/Datarepr/index.html b/dev/ocaml/Datarepr/index.html index 4dcb9715..35f20897 100644 --- a/dev/ocaml/Datarepr/index.html +++ b/dev/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/dev/ocaml/Deadcode/index.html b/dev/ocaml/Deadcode/index.html index be19a524..7f4f88f4 100644 --- a/dev/ocaml/Deadcode/index.html +++ b/dev/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/dev/ocaml/Debuginfo/Scoped_location/index.html b/dev/ocaml/Debuginfo/Scoped_location/index.html index e9fa9383..5e701e7f 100644 --- a/dev/ocaml/Debuginfo/Scoped_location/index.html +++ b/dev/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/dev/ocaml/Debuginfo/index.html b/dev/ocaml/Debuginfo/index.html index 2be24e4e..cb4de288 100644 --- a/dev/ocaml/Debuginfo/index.html +++ b/dev/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/dev/ocaml/Depend/index.html b/dev/ocaml/Depend/index.html index a5ec5528..ebbcc265 100644 --- a/dev/ocaml/Depend/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/Left_variadic/argument-1-_/index.html b/dev/ocaml/Diffing/Define/Left_variadic/argument-1-_/index.html index 7671241b..bdd95102 100644 --- a/dev/ocaml/Diffing/Define/Left_variadic/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/Left_variadic/index.html b/dev/ocaml/Diffing/Define/Left_variadic/index.html index 638a1064..d43e26ac 100644 --- a/dev/ocaml/Diffing/Define/Left_variadic/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/Right_variadic/argument-1-_/index.html b/dev/ocaml/Diffing/Define/Right_variadic/argument-1-_/index.html index c3a0bd5a..b6406648 100644 --- a/dev/ocaml/Diffing/Define/Right_variadic/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/Right_variadic/index.html b/dev/ocaml/Diffing/Define/Right_variadic/index.html index ab0f3131..16cd2da1 100644 --- a/dev/ocaml/Diffing/Define/Right_variadic/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/Simple/argument-1-_/index.html b/dev/ocaml/Diffing/Define/Simple/argument-1-_/index.html index febb1563..a7e35604 100644 --- a/dev/ocaml/Diffing/Define/Simple/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/Simple/index.html b/dev/ocaml/Diffing/Define/Simple/index.html index 7fb8c524..f574ce49 100644 --- a/dev/ocaml/Diffing/Define/Simple/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/argument-1-D/index.html b/dev/ocaml/Diffing/Define/argument-1-D/index.html index b970d214..aa1b8dd8 100644 --- a/dev/ocaml/Diffing/Define/argument-1-D/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/index.html b/dev/ocaml/Diffing/Define/index.html index 880b351f..8150a8bc 100644 --- a/dev/ocaml/Diffing/Define/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/module-type-Parameters/index.html b/dev/ocaml/Diffing/Define/module-type-Parameters/index.html index ae7e81e8..2c9a4bc2 100644 --- a/dev/ocaml/Diffing/Define/module-type-Parameters/index.html +++ b/dev/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/dev/ocaml/Diffing/Define/module-type-S/index.html b/dev/ocaml/Diffing/Define/module-type-S/index.html index 6531fbfd..48ba9560 100644 --- a/dev/ocaml/Diffing/Define/module-type-S/index.html +++ b/dev/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/dev/ocaml/Diffing/index.html b/dev/ocaml/Diffing/index.html index 5a1c79e8..568b2ae1 100644 --- a/dev/ocaml/Diffing/index.html +++ b/dev/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/dev/ocaml/Diffing/module-type-Defs/index.html b/dev/ocaml/Diffing/module-type-Defs/index.html index 3d3d3d75..caf2e8b0 100644 --- a/dev/ocaml/Diffing/module-type-Defs/index.html +++ b/dev/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/dev/ocaml/Diffing_with_keys/Define/Simple/argument-1-_/index.html b/dev/ocaml/Diffing_with_keys/Define/Simple/argument-1-_/index.html index a427b8c6..6c9d2868 100644 --- a/dev/ocaml/Diffing_with_keys/Define/Simple/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Diffing_with_keys/Define/Simple/index.html b/dev/ocaml/Diffing_with_keys/Define/Simple/index.html index 169cecb1..c1f0d401 100644 --- a/dev/ocaml/Diffing_with_keys/Define/Simple/index.html +++ b/dev/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/dev/ocaml/Diffing_with_keys/Define/argument-1-D/index.html b/dev/ocaml/Diffing_with_keys/Define/argument-1-D/index.html index 4cf7f477..1368ffb7 100644 --- a/dev/ocaml/Diffing_with_keys/Define/argument-1-D/index.html +++ b/dev/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/dev/ocaml/Diffing_with_keys/Define/index.html b/dev/ocaml/Diffing_with_keys/Define/index.html index 102d05da..449ffb97 100644 --- a/dev/ocaml/Diffing_with_keys/Define/index.html +++ b/dev/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/dev/ocaml/Diffing_with_keys/Define/module-type-Parameters/index.html b/dev/ocaml/Diffing_with_keys/Define/module-type-Parameters/index.html index 7bc19145..bf09c7db 100644 --- a/dev/ocaml/Diffing_with_keys/Define/module-type-Parameters/index.html +++ b/dev/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/dev/ocaml/Diffing_with_keys/index.html b/dev/ocaml/Diffing_with_keys/index.html index 9bfcc097..4d804254 100644 --- a/dev/ocaml/Diffing_with_keys/index.html +++ b/dev/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/dev/ocaml/Dll/index.html b/dev/ocaml/Dll/index.html index 70e6e55d..aa8995ec 100644 --- a/dev/ocaml/Dll/index.html +++ b/dev/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 -> 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 -> unit
    val reset : unit -> unit
    diff --git a/dev/ocaml/Docstrings/WithMenhir/index.html b/dev/ocaml/Docstrings/WithMenhir/index.html index 11e5439a..e0d39cab 100644 --- a/dev/ocaml/Docstrings/WithMenhir/index.html +++ b/dev/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/dev/ocaml/Docstrings/index.html b/dev/ocaml/Docstrings/index.html index 548fb4b4..dd914a16 100644 --- a/dev/ocaml/Docstrings/index.html +++ b/dev/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/dev/ocaml/Domainstate/index.html b/dev/ocaml/Domainstate/index.html index 8a7a2622..12538938 100644 --- a/dev/ocaml/Domainstate/index.html +++ b/dev/ocaml/Domainstate/index.html @@ -1,2 +1,2 @@ -Domainstate (ocaml.Domainstate)

    Module Domainstate

    type t =
    1. | Domain_young_limit
    2. | Domain_young_ptr
    3. | Domain_exception_pointer
    4. | Domain_young_base
    5. | Domain_young_start
    6. | Domain_young_end
    7. | Domain_young_alloc_start
    8. | Domain_young_alloc_end
    9. | Domain_young_alloc_mid
    10. | Domain_young_trigger
    11. | Domain_minor_heap_wsz
    12. | Domain_in_minor_collection
    13. | Domain_extra_heap_resources_minor
    14. | Domain_ref_table
    15. | Domain_ephe_ref_table
    16. | Domain_custom_table
    17. | Domain_mark_stack
    18. | Domain_stack_low
    19. | Domain_stack_high
    20. | Domain_stack_threshold
    21. | Domain_extern_sp
    22. | Domain_trapsp
    23. | Domain_trap_barrier
    24. | Domain_external_raise
    25. | Domain_exn_bucket
    26. | Domain_top_of_stack
    27. | Domain_bottom_of_stack
    28. | Domain_last_return_address
    29. | Domain_gc_regs
    30. | Domain_backtrace_active
    31. | Domain_backtrace_pos
    32. | Domain_backtrace_buffer
    33. | Domain_backtrace_last_exn
    34. | Domain_compare_unordered
    35. | Domain_requested_major_slice
    36. | Domain_requested_minor_gc
    37. | Domain_local_roots
    38. | Domain_stat_minor_words
    39. | Domain_stat_promoted_words
    40. | Domain_stat_major_words
    41. | Domain_stat_minor_collections
    42. | Domain_stat_major_collections
    43. | Domain_stat_heap_wsz
    44. | Domain_stat_top_heap_wsz
    45. | Domain_stat_compactions
    46. | Domain_stat_forced_major_collections
    47. | Domain_stat_heap_chunks
    48. | Domain_eventlog_startup_timestamp
    49. | Domain_eventlog_startup_pid
    50. | Domain_eventlog_paused
    51. | Domain_eventlog_enabled
    52. | Domain_eventlog_out
    53. | Domain_extra_params
    val idx_of_field : t -> int
    \ No newline at end of file +Domainstate (ocaml.Domainstate)

    Module Domainstate

    type t =
    1. | Domain_young_limit
    2. | Domain_young_ptr
    3. | Domain_exception_pointer
    4. | Domain_young_base
    5. | Domain_young_start
    6. | Domain_young_end
    7. | Domain_young_alloc_start
    8. | Domain_young_alloc_end
    9. | Domain_young_alloc_mid
    10. | Domain_young_trigger
    11. | Domain_minor_heap_wsz
    12. | Domain_in_minor_collection
    13. | Domain_extra_heap_resources_minor
    14. | Domain_ref_table
    15. | Domain_ephe_ref_table
    16. | Domain_custom_table
    17. | Domain_mark_stack
    18. | Domain_stack_low
    19. | Domain_stack_high
    20. | Domain_stack_threshold
    21. | Domain_extern_sp
    22. | Domain_trapsp
    23. | Domain_trap_barrier
    24. | Domain_external_raise
    25. | Domain_exn_bucket
    26. | Domain_top_of_stack
    27. | Domain_bottom_of_stack
    28. | Domain_last_return_address
    29. | Domain_gc_regs
    30. | Domain_backtrace_active
    31. | Domain_backtrace_pos
    32. | Domain_backtrace_buffer
    33. | Domain_backtrace_last_exn
    34. | Domain_compare_unordered
    35. | Domain_requested_major_slice
    36. | Domain_requested_minor_gc
    37. | Domain_local_roots
    38. | Domain_stat_minor_words
    39. | Domain_stat_promoted_words
    40. | Domain_stat_major_words
    41. | Domain_stat_minor_collections
    42. | Domain_stat_major_collections
    43. | Domain_stat_heap_wsz
    44. | Domain_stat_top_heap_wsz
    45. | Domain_stat_compactions
    46. | Domain_stat_forced_major_collections
    47. | Domain_stat_heap_chunks
    48. | Domain_eventlog_startup_timestamp
    49. | Domain_eventlog_startup_pid
    50. | Domain_eventlog_paused
    51. | Domain_eventlog_enabled
    52. | Domain_eventlog_out
    53. | Domain_extra_params
    val idx_of_field : t -> int
    diff --git a/dev/ocaml/Dynlink/index.html b/dev/ocaml/Dynlink/index.html index 392e8368..6c163765 100644 --- a/dev/ocaml/Dynlink/index.html +++ b/dev/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/dev/ocaml/Effect_analysis/index.html b/dev/ocaml/Effect_analysis/index.html index bd13ddd9..43644825 100644 --- a/dev/ocaml/Effect_analysis/index.html +++ b/dev/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/dev/ocaml/Emit/index.html b/dev/ocaml/Emit/index.html index 5b5e4e9e..84ad4884 100644 --- a/dev/ocaml/Emit/index.html +++ b/dev/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/dev/ocaml/Emitaux/index.html b/dev/ocaml/Emitaux/index.html index b6739dc7..ac241df5 100644 --- a/dev/ocaml/Emitaux/index.html +++ b/dev/ocaml/Emitaux/index.html @@ -1,11 +1,11 @@ -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 : char -> 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 : char -> 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 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
    \ 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 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
    diff --git a/dev/ocaml/Emitcode/index.html b/dev/ocaml/Emitcode/index.html index 9cb981c4..ae16a1fd 100644 --- a/dev/ocaml/Emitcode/index.html +++ b/dev/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 -> @@ -14,8 +14,8 @@ out_channel -> Instruct.instruction list -> (Cmo_format.reloc_info * int) list
    val reset : unit -> unit
    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/dev/ocaml/Emitenv/index.html b/dev/ocaml/Emitenv/index.html index 8100f8bc..b76b61ae 100644 --- a/dev/ocaml/Emitenv/index.html +++ b/dev/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;
    11. mutable offset_literals : offset_computation list;
    12. mutable gotrel_literals : gotrel_literal list;
    13. mutable symbol_literals : symbol_literal list;
    14. mutable size_literals : int;
    }
    \ 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;
    11. mutable offset_literals : offset_computation list;
    12. mutable gotrel_literals : gotrel_literal list;
    13. mutable symbol_literals : symbol_literal list;
    14. mutable size_literals : int;
    }
    diff --git a/dev/ocaml/Env/index.html b/dev/ocaml/Env/index.html index a115599c..62404455 100644 --- a/dev/ocaml/Env/index.html +++ b/dev/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_safe_string : t
      val initial_unsafe_string : 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_path_prefix : 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 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/dev/ocaml/Envaux/index.html b/dev/ocaml/Envaux/index.html index 22c6a31e..0b6bffcb 100644 --- a/dev/ocaml/Envaux/index.html +++ b/dev/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/dev/ocaml/Errors/index.html b/dev/ocaml/Errors/index.html index 2e698729..0b5f61df 100644 --- a/dev/ocaml/Errors/index.html +++ b/dev/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/dev/ocaml/Errortrace/Subtype/index.html b/dev/ocaml/Errortrace/Subtype/index.html index c9fa62c4..3bfb1485 100644 --- a/dev/ocaml/Errortrace/Subtype/index.html +++ b/dev/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/dev/ocaml/Errortrace/index.html b/dev/ocaml/Errortrace/index.html index c15ec79e..5658257d 100644 --- a/dev/ocaml/Errortrace/index.html +++ b/dev/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/dev/ocaml/Event/index.html b/dev/ocaml/Event/index.html index 49bf901a..31adff12 100644 --- a/dev/ocaml/Event/index.html +++ b/dev/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/dev/ocaml/Export_id/Map/index.html b/dev/ocaml/Export_id/Map/index.html index d796c7e6..81f1f4ab 100644 --- a/dev/ocaml/Export_id/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Export_id/Set/index.html b/dev/ocaml/Export_id/Set/index.html index 5557a57a..eb3c79e7 100644 --- a/dev/ocaml/Export_id/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Export_id/T/index.html b/dev/ocaml/Export_id/T/index.html index 54d775cd..4820903d 100644 --- a/dev/ocaml/Export_id/T/index.html +++ b/dev/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/dev/ocaml/Export_id/Tbl/index.html b/dev/ocaml/Export_id/Tbl/index.html index d2472aca..197c1c2d 100644 --- a/dev/ocaml/Export_id/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Export_id/index.html b/dev/ocaml/Export_id/index.html index bed6838f..070640a3 100644 --- a/dev/ocaml/Export_id/index.html +++ b/dev/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/dev/ocaml/Export_info/index.html b/dev/ocaml/Export_info/index.html index c15b9b3f..ece71070 100644 --- a/dev/ocaml/Export_info/index.html +++ b/dev/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/dev/ocaml/Export_info_for_pack/index.html b/dev/ocaml/Export_info_for_pack/index.html index 230bfb3d..3610e634 100644 --- a/dev/ocaml/Export_info_for_pack/index.html +++ b/dev/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/dev/ocaml/Expunge/index.html b/dev/ocaml/Expunge/index.html index 371985f6..7b931f05 100644 --- a/dev/ocaml/Expunge/index.html +++ b/dev/ocaml/Expunge/index.html @@ -1,2 +1,2 @@ -Expunge (ocaml.Expunge)

    Module Expunge

    module String = Misc.Stdlib.String
    val is_exn : string -> bool
    val to_keep : String.Set.t ref
    val negate : bool
    val keep : String.Set.elt -> bool
    val expunge_crcs : (String.Set.elt * 'a) list -> (String.Set.elt * 'a) list
    val main : unit -> unit
    \ No newline at end of file +Expunge (ocaml.Expunge)

    Module Expunge

    module String = Misc.Stdlib.String
    val is_exn : string -> bool
    val to_keep : String.Set.t ref
    val negate : bool
    val keep : String.Set.elt -> bool
    val expunge_crcs : (String.Set.elt * 'a) list -> (String.Set.elt * 'a) list
    val main : unit -> unit
    diff --git a/dev/ocaml/Extract_projections/index.html b/dev/ocaml/Extract_projections/index.html index fa218c42..1487864c 100644 --- a/dev/ocaml/Extract_projections/index.html +++ b/dev/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/dev/ocaml/Find_recursive_functions/index.html b/dev/ocaml/Find_recursive_functions/index.html index af4ff1f7..04415c20 100644 --- a/dev/ocaml/Find_recursive_functions/index.html +++ b/dev/ocaml/Find_recursive_functions/index.html @@ -1,7 +1,7 @@ -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 +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/dev/ocaml/Flambda/Constant_defining_value/Map/index.html b/dev/ocaml/Flambda/Constant_defining_value/Map/index.html index 8e9eb2d5..6bbeeaba 100644 --- a/dev/ocaml/Flambda/Constant_defining_value/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Flambda/Constant_defining_value/Set/index.html b/dev/ocaml/Flambda/Constant_defining_value/Set/index.html index 1f6793cb..a0c8ece3 100644 --- a/dev/ocaml/Flambda/Constant_defining_value/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Flambda/Constant_defining_value/T/index.html b/dev/ocaml/Flambda/Constant_defining_value/T/index.html index d5f90851..013b6f88 100644 --- a/dev/ocaml/Flambda/Constant_defining_value/T/index.html +++ b/dev/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/dev/ocaml/Flambda/Constant_defining_value/Tbl/index.html b/dev/ocaml/Flambda/Constant_defining_value/Tbl/index.html index 3a103f25..0d2693fd 100644 --- a/dev/ocaml/Flambda/Constant_defining_value/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Flambda/Constant_defining_value/index.html b/dev/ocaml/Flambda/Constant_defining_value/index.html index 6de4e5b1..eaf7713e 100644 --- a/dev/ocaml/Flambda/Constant_defining_value/index.html +++ b/dev/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/dev/ocaml/Flambda/With_free_variables/index.html b/dev/ocaml/Flambda/With_free_variables/index.html index 16c225d7..49012e53 100644 --- a/dev/ocaml/Flambda/With_free_variables/index.html +++ b/dev/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/dev/ocaml/Flambda/index.html b/dev/ocaml/Flambda/index.html index d77c231f..665fa70d 100644 --- a/dev/ocaml/Flambda/index.html +++ b/dev/ocaml/Flambda/index.html @@ -1,5 +1,5 @@ -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 +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; @@ -17,27 +17,27 @@ Identifiable.S with type t = constant_defining_value

      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 +45,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 +117,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/dev/ocaml/Flambda_invariants/index.html b/dev/ocaml/Flambda_invariants/index.html index 63c5add4..625e2564 100644 --- a/dev/ocaml/Flambda_invariants/index.html +++ b/dev/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/dev/ocaml/Flambda_iterators/index.html b/dev/ocaml/Flambda_iterators/index.html index 39755eb9..297be64a 100644 --- a/dev/ocaml/Flambda_iterators/index.html +++ b/dev/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/dev/ocaml/Flambda_middle_end/index.html b/dev/ocaml/Flambda_middle_end/index.html index 79ff27a6..ee039131 100644 --- a/dev/ocaml/Flambda_middle_end/index.html +++ b/dev/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/dev/ocaml/Flambda_to_clambda/index.html b/dev/ocaml/Flambda_to_clambda/index.html index bb6332eb..70aadadc 100644 --- a/dev/ocaml/Flambda_to_clambda/index.html +++ b/dev/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/dev/ocaml/Flambda_utils/Switch_storer/index.html b/dev/ocaml/Flambda_utils/Switch_storer/index.html index b9d58530..27f97e76 100644 --- a/dev/ocaml/Flambda_utils/Switch_storer/index.html +++ b/dev/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/dev/ocaml/Flambda_utils/index.html b/dev/ocaml/Flambda_utils/index.html index 8649bed3..da4db4f9 100644 --- a/dev/ocaml/Flambda_utils/index.html +++ b/dev/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/dev/ocaml/Freshening/Project_var/index.html b/dev/ocaml/Freshening/Project_var/index.html index fa251ac3..83b0f989 100644 --- a/dev/ocaml/Freshening/Project_var/index.html +++ b/dev/ocaml/Freshening/Project_var/index.html @@ -1,9 +1,9 @@ -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 = +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 : +

    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/dev/ocaml/Freshening/index.html b/dev/ocaml/Freshening/index.html index 4729c19a..229b2005 100644 --- a/dev/ocaml/Freshening/index.html +++ b/dev/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/dev/ocaml/Genprintval/Make/argument-1-O/index.html b/dev/ocaml/Genprintval/Make/argument-1-O/index.html index de518871..eb686246 100644 --- a/dev/ocaml/Genprintval/Make/argument-1-O/index.html +++ b/dev/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/dev/ocaml/Genprintval/Make/argument-2-_/index.html b/dev/ocaml/Genprintval/Make/argument-2-_/index.html index 966ca9e4..043daaec 100644 --- a/dev/ocaml/Genprintval/Make/argument-2-_/index.html +++ b/dev/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/dev/ocaml/Genprintval/Make/index.html b/dev/ocaml/Genprintval/Make/index.html index c66f1603..c7283f3a 100644 --- a/dev/ocaml/Genprintval/Make/index.html +++ b/dev/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/dev/ocaml/Genprintval/index.html b/dev/ocaml/Genprintval/index.html index d44eaa67..68ca11d8 100644 --- a/dev/ocaml/Genprintval/index.html +++ b/dev/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/dev/ocaml/Genprintval/module-type-EVALPATH/index.html b/dev/ocaml/Genprintval/module-type-EVALPATH/index.html index eb99784d..fd1893c7 100644 --- a/dev/ocaml/Genprintval/module-type-EVALPATH/index.html +++ b/dev/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/dev/ocaml/Genprintval/module-type-OBJ/index.html b/dev/ocaml/Genprintval/module-type-OBJ/index.html index ec652eed..e49a1d00 100644 --- a/dev/ocaml/Genprintval/module-type-OBJ/index.html +++ b/dev/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/dev/ocaml/Genprintval/module-type-S/index.html b/dev/ocaml/Genprintval/module-type-S/index.html index a9ed0678..5913aa25 100644 --- a/dev/ocaml/Genprintval/module-type-S/index.html +++ b/dev/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/dev/ocaml/Id_types/Id/index.html b/dev/ocaml/Id_types/Id/index.html index 12d476e0..4b33afc5 100644 --- a/dev/ocaml/Id_types/Id/index.html +++ b/dev/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/dev/ocaml/Id_types/UnitId/argument-1-_/index.html b/dev/ocaml/Id_types/UnitId/argument-1-_/index.html index 75f54e01..b91a8d97 100644 --- a/dev/ocaml/Id_types/UnitId/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Id_types/UnitId/argument-2-Compilation_unit/index.html b/dev/ocaml/Id_types/UnitId/argument-2-Compilation_unit/index.html index 18d7d352..c4697673 100644 --- a/dev/ocaml/Id_types/UnitId/argument-2-Compilation_unit/index.html +++ b/dev/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/dev/ocaml/Id_types/UnitId/index.html b/dev/ocaml/Id_types/UnitId/index.html index b2f65780..57b4f8d4 100644 --- a/dev/ocaml/Id_types/UnitId/index.html +++ b/dev/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/dev/ocaml/Id_types/index.html b/dev/ocaml/Id_types/index.html index 617f2b36..582302b3 100644 --- a/dev/ocaml/Id_types/index.html +++ b/dev/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/dev/ocaml/Id_types/module-type-BaseId/index.html b/dev/ocaml/Id_types/module-type-BaseId/index.html index 4563c5d0..6bd47ac3 100644 --- a/dev/ocaml/Id_types/module-type-BaseId/index.html +++ b/dev/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/dev/ocaml/Id_types/module-type-Id/index.html b/dev/ocaml/Id_types/module-type-Id/index.html index 72336b20..aacd822b 100644 --- a/dev/ocaml/Id_types/module-type-Id/index.html +++ b/dev/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/dev/ocaml/Id_types/module-type-UnitId/Compilation_unit/index.html b/dev/ocaml/Id_types/module-type-UnitId/Compilation_unit/index.html index 05c35ec4..1b814948 100644 --- a/dev/ocaml/Id_types/module-type-UnitId/Compilation_unit/index.html +++ b/dev/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/dev/ocaml/Id_types/module-type-UnitId/index.html b/dev/ocaml/Id_types/module-type-UnitId/index.html index b4b9e6cd..96082ce2 100644 --- a/dev/ocaml/Id_types/module-type-UnitId/index.html +++ b/dev/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/dev/ocaml/Ident/Map/index.html b/dev/ocaml/Ident/Map/index.html index 30722ab1..72753469 100644 --- a/dev/ocaml/Ident/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Ident/Set/index.html b/dev/ocaml/Ident/Set/index.html index ec430bbe..d05bf902 100644 --- a/dev/ocaml/Ident/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Ident/T/index.html b/dev/ocaml/Ident/T/index.html index 94fd4c75..85c89438 100644 --- a/dev/ocaml/Ident/T/index.html +++ b/dev/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/dev/ocaml/Ident/Tbl/index.html b/dev/ocaml/Ident/Tbl/index.html index cb089e44..4b5ebf39 100644 --- a/dev/ocaml/Ident/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Ident/index.html b/dev/ocaml/Ident/index.html index 9cccab81..f00f8960 100644 --- a/dev/ocaml/Ident/index.html +++ b/dev/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
    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 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
    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 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/dev/ocaml/Identifiable/Make/Map/index.html b/dev/ocaml/Identifiable/Make/Map/index.html index 33510002..6a7e8eae 100644 --- a/dev/ocaml/Identifiable/Make/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Identifiable/Make/Set/index.html b/dev/ocaml/Identifiable/Make/Set/index.html index d56c6b87..51c271f9 100644 --- a/dev/ocaml/Identifiable/Make/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Identifiable/Make/T/index.html b/dev/ocaml/Identifiable/Make/T/index.html index 68153ec3..b2d723a2 100644 --- a/dev/ocaml/Identifiable/Make/T/index.html +++ b/dev/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/dev/ocaml/Identifiable/Make/Tbl/index.html b/dev/ocaml/Identifiable/Make/Tbl/index.html index db512ef7..ab84c94e 100644 --- a/dev/ocaml/Identifiable/Make/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Identifiable/Make/argument-1-T/index.html b/dev/ocaml/Identifiable/Make/argument-1-T/index.html index c4798f2c..e21f6f45 100644 --- a/dev/ocaml/Identifiable/Make/argument-1-T/index.html +++ b/dev/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/dev/ocaml/Identifiable/Make/index.html b/dev/ocaml/Identifiable/Make/index.html index 6aba4772..d3d57fea 100644 --- a/dev/ocaml/Identifiable/Make/index.html +++ b/dev/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/dev/ocaml/Identifiable/Pair/argument-1-A/index.html b/dev/ocaml/Identifiable/Pair/argument-1-A/index.html index b3cc73ad..01be4be1 100644 --- a/dev/ocaml/Identifiable/Pair/argument-1-A/index.html +++ b/dev/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/dev/ocaml/Identifiable/Pair/argument-2-B/index.html b/dev/ocaml/Identifiable/Pair/argument-2-B/index.html index 38b3357d..64eee261 100644 --- a/dev/ocaml/Identifiable/Pair/argument-2-B/index.html +++ b/dev/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/dev/ocaml/Identifiable/Pair/index.html b/dev/ocaml/Identifiable/Pair/index.html index 8b5a4308..a184f377 100644 --- a/dev/ocaml/Identifiable/Pair/index.html +++ b/dev/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/dev/ocaml/Identifiable/index.html b/dev/ocaml/Identifiable/index.html index b0260a75..bd4688d3 100644 --- a/dev/ocaml/Identifiable/index.html +++ b/dev/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/dev/ocaml/Identifiable/module-type-Map/T/index.html b/dev/ocaml/Identifiable/module-type-Map/T/index.html index 44289d75..dc77c3d9 100644 --- a/dev/ocaml/Identifiable/module-type-Map/T/index.html +++ b/dev/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/dev/ocaml/Identifiable/module-type-Map/index.html b/dev/ocaml/Identifiable/module-type-Map/index.html index 15776b88..565a5379 100644 --- a/dev/ocaml/Identifiable/module-type-Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Identifiable/module-type-S/Map/index.html b/dev/ocaml/Identifiable/module-type-S/Map/index.html index dfa2b45b..1eff009e 100644 --- a/dev/ocaml/Identifiable/module-type-S/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Identifiable/module-type-S/Set/index.html b/dev/ocaml/Identifiable/module-type-S/Set/index.html index f8aa7096..38d95380 100644 --- a/dev/ocaml/Identifiable/module-type-S/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Identifiable/module-type-S/T/index.html b/dev/ocaml/Identifiable/module-type-S/T/index.html index f73a0562..c680d5ab 100644 --- a/dev/ocaml/Identifiable/module-type-S/T/index.html +++ b/dev/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/dev/ocaml/Identifiable/module-type-S/Tbl/index.html b/dev/ocaml/Identifiable/module-type-S/Tbl/index.html index bd9c111a..ffbbd6b0 100644 --- a/dev/ocaml/Identifiable/module-type-S/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Identifiable/module-type-S/index.html b/dev/ocaml/Identifiable/module-type-S/index.html index 30e528f0..2bab13ef 100644 --- a/dev/ocaml/Identifiable/module-type-S/index.html +++ b/dev/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/dev/ocaml/Identifiable/module-type-Set/T/index.html b/dev/ocaml/Identifiable/module-type-Set/T/index.html index c227382f..21700e97 100644 --- a/dev/ocaml/Identifiable/module-type-Set/T/index.html +++ b/dev/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/dev/ocaml/Identifiable/module-type-Set/index.html b/dev/ocaml/Identifiable/module-type-Set/index.html index 5191eabf..2a6a8dfb 100644 --- a/dev/ocaml/Identifiable/module-type-Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Identifiable/module-type-Tbl/T/index.html b/dev/ocaml/Identifiable/module-type-Tbl/T/index.html index dc5bccb7..acecc6cb 100644 --- a/dev/ocaml/Identifiable/module-type-Tbl/T/index.html +++ b/dev/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/dev/ocaml/Identifiable/module-type-Tbl/index.html b/dev/ocaml/Identifiable/module-type-Tbl/index.html index adacd634..9c542f43 100644 --- a/dev/ocaml/Identifiable/module-type-Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Identifiable/module-type-Thing/index.html b/dev/ocaml/Identifiable/module-type-Thing/index.html index 78990567..550a51a5 100644 --- a/dev/ocaml/Identifiable/module-type-Thing/index.html +++ b/dev/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/dev/ocaml/Import_approx/index.html b/dev/ocaml/Import_approx/index.html index 3f77d7ef..e6b73e65 100644 --- a/dev/ocaml/Import_approx/index.html +++ b/dev/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/dev/ocaml/Includeclass/index.html b/dev/ocaml/Includeclass/index.html index d6d1025e..df554f69 100644 --- a/dev/ocaml/Includeclass/index.html +++ b/dev/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/dev/ocaml/Includecore/index.html b/dev/ocaml/Includecore/index.html index 9c44b58c..61b97aba 100644 --- a/dev/ocaml/Includecore/index.html +++ b/dev/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 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 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
    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/dev/ocaml/Includemod/Error/index.html b/dev/ocaml/Includemod/Error/index.html index eaa31d30..276f284c 100644 --- a/dev/ocaml/Includemod/Error/index.html +++ b/dev/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
    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
      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, @@ -10,4 +10,4 @@ (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/dev/ocaml/Includemod/FieldMap/index.html b/dev/ocaml/Includemod/FieldMap/index.html index 363aac83..fd665803 100644 --- a/dev/ocaml/Includemod/FieldMap/index.html +++ b/dev/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.

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Includemod/Functor_app_diff/Defs/index.html b/dev/ocaml/Includemod/Functor_app_diff/Defs/index.html index 9e605a1a..62a851de 100644 --- a/dev/ocaml/Includemod/Functor_app_diff/Defs/index.html +++ b/dev/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/dev/ocaml/Includemod/Functor_app_diff/index.html b/dev/ocaml/Includemod/Functor_app_diff/index.html index 6c65005e..b4744621 100644 --- a/dev/ocaml/Includemod/Functor_app_diff/index.html +++ b/dev/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/dev/ocaml/Includemod/Functor_inclusion_diff/Defs/index.html b/dev/ocaml/Includemod/Functor_inclusion_diff/Defs/index.html index 14a3b218..40715511 100644 --- a/dev/ocaml/Includemod/Functor_inclusion_diff/Defs/index.html +++ b/dev/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/dev/ocaml/Includemod/Functor_inclusion_diff/index.html b/dev/ocaml/Includemod/Functor_inclusion_diff/index.html index 819c6267..18e7f83e 100644 --- a/dev/ocaml/Includemod/Functor_inclusion_diff/index.html +++ b/dev/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/dev/ocaml/Includemod/index.html b/dev/ocaml/Includemod/index.html index 6b9f82e6..c321ff2d 100644 --- a/dev/ocaml/Includemod/index.html +++ b/dev/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/dev/ocaml/Includemod_errorprinter/index.html b/dev/ocaml/Includemod_errorprinter/index.html index bc2645c3..8fab650f 100644 --- a/dev/ocaml/Includemod_errorprinter/index.html +++ b/dev/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/dev/ocaml/Inconstant_idents/index.html b/dev/ocaml/Inconstant_idents/index.html index 6e095365..ae6e64e4 100644 --- a/dev/ocaml/Inconstant_idents/index.html +++ b/dev/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/dev/ocaml/Initialize_symbol_to_let_symbol/index.html b/dev/ocaml/Initialize_symbol_to_let_symbol/index.html index 2ad0fe8f..9255f842 100644 --- a/dev/ocaml/Initialize_symbol_to_let_symbol/index.html +++ b/dev/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/dev/ocaml/Inline_and_simplify/index.html b/dev/ocaml/Inline_and_simplify/index.html index 556f4ce2..d36486cc 100644 --- a/dev/ocaml/Inline_and_simplify/index.html +++ b/dev/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/dev/ocaml/Inline_and_simplify_aux/Env/index.html b/dev/ocaml/Inline_and_simplify_aux/Env/index.html index 56300f16..10fb83ec 100644 --- a/dev/ocaml/Inline_and_simplify_aux/Env/index.html +++ b/dev/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/dev/ocaml/Inline_and_simplify_aux/Result/index.html b/dev/ocaml/Inline_and_simplify_aux/Result/index.html index c2f41019..06c5e7e4 100644 --- a/dev/ocaml/Inline_and_simplify_aux/Result/index.html +++ b/dev/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/dev/ocaml/Inline_and_simplify_aux/index.html b/dev/ocaml/Inline_and_simplify_aux/index.html index fd394c0e..b9289294 100644 --- a/dev/ocaml/Inline_and_simplify_aux/index.html +++ b/dev/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/dev/ocaml/Inlining_cost/Benefit/index.html b/dev/ocaml/Inlining_cost/Benefit/index.html index 4d4d5b0c..5e7fe3ae 100644 --- a/dev/ocaml/Inlining_cost/Benefit/index.html +++ b/dev/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/dev/ocaml/Inlining_cost/Threshold/index.html b/dev/ocaml/Inlining_cost/Threshold/index.html index 784bbd23..110d5d50 100644 --- a/dev/ocaml/Inlining_cost/Threshold/index.html +++ b/dev/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/dev/ocaml/Inlining_cost/Whether_sufficient_benefit/index.html b/dev/ocaml/Inlining_cost/Whether_sufficient_benefit/index.html index 402d54c3..189d0eb3 100644 --- a/dev/ocaml/Inlining_cost/Whether_sufficient_benefit/index.html +++ b/dev/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/dev/ocaml/Inlining_cost/index.html b/dev/ocaml/Inlining_cost/index.html index 94e858ba..62075a9b 100644 --- a/dev/ocaml/Inlining_cost/index.html +++ b/dev/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/dev/ocaml/Inlining_decision/index.html b/dev/ocaml/Inlining_decision/index.html index 125d36a2..342e6a28 100644 --- a/dev/ocaml/Inlining_decision/index.html +++ b/dev/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/dev/ocaml/Inlining_decision_intf/index.html b/dev/ocaml/Inlining_decision_intf/index.html index cdeaf953..afd5c42e 100644 --- a/dev/ocaml/Inlining_decision_intf/index.html +++ b/dev/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/dev/ocaml/Inlining_stats/Closure_stack/index.html b/dev/ocaml/Inlining_stats/Closure_stack/index.html index b38c9baf..483194dc 100644 --- a/dev/ocaml/Inlining_stats/Closure_stack/index.html +++ b/dev/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/dev/ocaml/Inlining_stats/index.html b/dev/ocaml/Inlining_stats/index.html index dc3c9800..2f1ff3ba 100644 --- a/dev/ocaml/Inlining_stats/index.html +++ b/dev/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/dev/ocaml/Inlining_stats_types/Decision/index.html b/dev/ocaml/Inlining_stats_types/Decision/index.html index dde74637..b16b5a2a 100644 --- a/dev/ocaml/Inlining_stats_types/Decision/index.html +++ b/dev/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/dev/ocaml/Inlining_stats_types/Inlined/index.html b/dev/ocaml/Inlining_stats_types/Inlined/index.html index 1f7fee9a..00842316 100644 --- a/dev/ocaml/Inlining_stats_types/Inlined/index.html +++ b/dev/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/dev/ocaml/Inlining_stats_types/Not_inlined/index.html b/dev/ocaml/Inlining_stats_types/Not_inlined/index.html index 0ef86102..562b0e57 100644 --- a/dev/ocaml/Inlining_stats_types/Not_inlined/index.html +++ b/dev/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/dev/ocaml/Inlining_stats_types/Not_specialised/index.html b/dev/ocaml/Inlining_stats_types/Not_specialised/index.html index e2e71756..484bc1de 100644 --- a/dev/ocaml/Inlining_stats_types/Not_specialised/index.html +++ b/dev/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/dev/ocaml/Inlining_stats_types/Prevented/index.html b/dev/ocaml/Inlining_stats_types/Prevented/index.html index e6b70645..53415144 100644 --- a/dev/ocaml/Inlining_stats_types/Prevented/index.html +++ b/dev/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/dev/ocaml/Inlining_stats_types/Specialised/index.html b/dev/ocaml/Inlining_stats_types/Specialised/index.html index bb69fb62..ab711252 100644 --- a/dev/ocaml/Inlining_stats_types/Specialised/index.html +++ b/dev/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/dev/ocaml/Inlining_stats_types/index.html b/dev/ocaml/Inlining_stats_types/index.html index 3c1171dd..c02a9744 100644 --- a/dev/ocaml/Inlining_stats_types/index.html +++ b/dev/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/dev/ocaml/Inlining_transforms/index.html b/dev/ocaml/Inlining_transforms/index.html index c0077c08..e7e922dc 100644 --- a/dev/ocaml/Inlining_transforms/index.html +++ b/dev/ocaml/Inlining_transforms/index.html @@ -1,32 +1,32 @@ -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 -> + 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 + non-recursive
    is not sufficient.

    diff --git a/dev/ocaml/Instruct/index.html b/dev/ocaml/Instruct/index.html index cba65722..a4562663 100644 --- a/dev/ocaml/Instruct/index.html +++ b/dev/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. | 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. | Kstop
    val immed_min : int
    val immed_max : int
    diff --git a/dev/ocaml/Int_replace_polymorphic_compare/index.html b/dev/ocaml/Int_replace_polymorphic_compare/index.html index 454b0f99..2d3b4c11 100644 --- a/dev/ocaml/Int_replace_polymorphic_compare/index.html +++ b/dev/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/dev/ocaml/Interf/index.html b/dev/ocaml/Interf/index.html index 33bf666a..410945cf 100644 --- a/dev/ocaml/Interf/index.html +++ b/dev/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/dev/ocaml/Internal_variable_names/index.html b/dev/ocaml/Internal_variable_names/index.html index 7a5effff..3ee539da 100644 --- a/dev/ocaml/Internal_variable_names/index.html +++ b/dev/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/dev/ocaml/Interval/index.html b/dev/ocaml/Interval/index.html index 937ac8f4..c69bec28 100644 --- a/dev/ocaml/Interval/index.html +++ b/dev/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;
    }
    val all_intervals : unit -> t list
    val all_fixed_intervals : unit -> 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 -> unit
    \ 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;
    }
    val all_intervals : unit -> t list
    val all_fixed_intervals : unit -> 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 -> unit
    diff --git a/dev/ocaml/Invariant_params/index.html b/dev/ocaml/Invariant_params/index.html index eae580e3..0b8bba9a 100644 --- a/dev/ocaml/Invariant_params/index.html +++ b/dev/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/dev/ocaml/Lambda/index.html b/dev/ocaml/Lambda/index.html index c1a73a09..f26ca08d 100644 --- a/dev/ocaml/Lambda/index.html +++ b/dev/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
    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. | 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 * Asttypes.mutable_flag
    55. | 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.

      *)
    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_16 of bool
    83. | Pstring_load_32 of bool
    84. | Pstring_load_64 of bool
    85. | Pbytes_load_16 of bool
    86. | Pbytes_load_32 of bool
    87. | Pbytes_load_64 of bool
    88. | Pbytes_set_16 of bool
    89. | Pbytes_set_32 of bool
    90. | Pbytes_set_64 of bool
    91. | Pbigstring_load_16 of bool
    92. | Pbigstring_load_32 of bool
    93. | Pbigstring_load_64 of bool
    94. | Pbigstring_set_16 of bool
    95. | Pbigstring_set_32 of bool
    96. | Pbigstring_set_64 of bool
    97. | Pctconst of compile_time_constant
    98. | Pbswap16
    99. | Pbbswap of boxed_integer
    100. | Pint_as_pointer
    101. | Popaque
    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
    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. | 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 * Asttypes.mutable_flag
    55. | 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.

      *)
    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_16 of bool
    83. | Pstring_load_32 of bool
    84. | Pstring_load_64 of bool
    85. | Pbytes_load_16 of bool
    86. | Pbytes_load_32 of bool
    87. | Pbytes_load_64 of bool
    88. | Pbytes_set_16 of bool
    89. | Pbytes_set_32 of bool
    90. | Pbytes_set_64 of bool
    91. | Pbigstring_load_16 of bool
    92. | Pbigstring_load_32 of bool
    93. | Pbigstring_load_64 of bool
    94. | Pbigstring_set_16 of bool
    95. | Pbigstring_set_32 of bool
    96. | Pbigstring_set_64 of bool
    97. | Pctconst of compile_time_constant
    98. | Pbswap16
    99. | Pbbswap of boxed_integer
    100. | Pint_as_pointer
    101. | Popaque
    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
    5. | Lev_module_definition of Ident.t
    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 : (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/dev/ocaml/Lazy_backtrack/index.html b/dev/ocaml/Lazy_backtrack/index.html index cff72444..52fdbaa4 100644 --- a/dev/ocaml/Lazy_backtrack/index.html +++ b/dev/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/dev/ocaml/Lexer/index.html b/dev/ocaml/Lexer/index.html index 699ca0ec..66807b5f 100644 --- a/dev/ocaml/Lexer/index.html +++ b/dev/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/dev/ocaml/Lift_code/index.html b/dev/ocaml/Lift_code/index.html index 9dc58cc5..8ea699fc 100644 --- a/dev/ocaml/Lift_code/index.html +++ b/dev/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/dev/ocaml/Lift_constants/index.html b/dev/ocaml/Lift_constants/index.html index 8a6e3193..bce3292f 100644 --- a/dev/ocaml/Lift_constants/index.html +++ b/dev/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/dev/ocaml/Lift_let_to_initialize_symbol/index.html b/dev/ocaml/Lift_let_to_initialize_symbol/index.html index 42d69ef7..0c355748 100644 --- a/dev/ocaml/Lift_let_to_initialize_symbol/index.html +++ b/dev/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/dev/ocaml/Linear/index.html b/dev/ocaml/Linear/index.html index 5f822967..0ed73bcd 100644 --- a/dev/ocaml/Linear/index.html +++ b/dev/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_body : instruction;
    3. fun_fast : bool;
    4. fun_dbg : Debuginfo.t;
    5. fun_tailrec_entry_point_label : label;
    6. fun_contains_calls : bool;
    7. fun_num_stack_slots : int array;
    8. fun_frame_required : bool;
    9. 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_body : instruction;
    3. fun_fast : bool;
    4. fun_dbg : Debuginfo.t;
    5. fun_tailrec_entry_point_label : label;
    6. fun_contains_calls : bool;
    7. fun_num_stack_slots : int array;
    8. fun_frame_required : bool;
    9. fun_prologue_required : bool;
    }
    diff --git a/dev/ocaml/Linear_format/index.html b/dev/ocaml/Linear_format/index.html index 11ada3d2..66156520 100644 --- a/dev/ocaml/Linear_format/index.html +++ b/dev/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/dev/ocaml/Linearize/index.html b/dev/ocaml/Linearize/index.html index 6d3e7a88..e9cd6fc8 100644 --- a/dev/ocaml/Linearize/index.html +++ b/dev/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/dev/ocaml/Linkage_name/Map/index.html b/dev/ocaml/Linkage_name/Map/index.html index 40d8f946..d074a5e8 100644 --- a/dev/ocaml/Linkage_name/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Linkage_name/Set/index.html b/dev/ocaml/Linkage_name/Set/index.html index 0f811ff9..ec7eb4c0 100644 --- a/dev/ocaml/Linkage_name/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Linkage_name/T/index.html b/dev/ocaml/Linkage_name/T/index.html index 3189bba5..e0891ae6 100644 --- a/dev/ocaml/Linkage_name/T/index.html +++ b/dev/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/dev/ocaml/Linkage_name/Tbl/index.html b/dev/ocaml/Linkage_name/Tbl/index.html index fb3cc599..7e066fb1 100644 --- a/dev/ocaml/Linkage_name/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Linkage_name/index.html b/dev/ocaml/Linkage_name/index.html index f35a0b46..a7652aef 100644 --- a/dev/ocaml/Linkage_name/index.html +++ b/dev/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/dev/ocaml/Linscan/index.html b/dev/ocaml/Linscan/index.html index 0f8158d0..63d1bdcb 100644 --- a/dev/ocaml/Linscan/index.html +++ b/dev/ocaml/Linscan/index.html @@ -1,2 +1,2 @@ -Linscan (ocaml.Linscan)

    Module Linscan

    val allocate_registers : unit -> int array
    \ No newline at end of file +Linscan (ocaml.Linscan)

    Module Linscan

    val allocate_registers : unit -> int array
    diff --git a/dev/ocaml/Liveness/index.html b/dev/ocaml/Liveness/index.html index c202566c..697d8c3d 100644 --- a/dev/ocaml/Liveness/index.html +++ b/dev/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/dev/ocaml/Load_path/Dir/index.html b/dev/ocaml/Load_path/Dir/index.html index 77c6179b..d26b6346 100644 --- a/dev/ocaml/Load_path/Dir/index.html +++ b/dev/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.

    \ 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.

    diff --git a/dev/ocaml/Load_path/index.html b/dev/ocaml/Load_path/index.html index d51aacd9..3acc7497 100644 --- a/dev/ocaml/Load_path/index.html +++ b/dev/ocaml/Load_path/index.html @@ -1,2 +1,2 @@ -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

    val init : string list -> unit

    init l is the same as reset (); List.iter add_dir (List.rev l)

    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.

    module Dir : sig ... end
    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 +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

    val init : string list -> unit

    init l is the same as reset (); List.iter add_dir (List.rev l)

    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.

    module Dir : sig ... end
    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/dev/ocaml/Local_store/index.html b/dev/ocaml/Local_store/index.html index d1a64ce8..7af63daa 100644 --- a/dev/ocaml/Local_store/index.html +++ b/dev/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 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 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/dev/ocaml/Location/index.html b/dev/ocaml/Location/index.html index cc6be7a6..802de4e0 100644 --- a/dev/ocaml/Location/index.html +++ b/dev/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 reset : unit -> unit

    Printing locations

    val rewrite_absolute_path : string -> string

    rewrite absolute path to honor the BUILD_PATH_PREFIX_MAP variable (https://reproducible-builds.org/specs/build-path-prefix-map/) if it is set.

    val absolute_path : string -> string
    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 reset : unit -> unit

    Printing locations

    val rewrite_absolute_path : string -> string

    rewrite absolute path to honor the BUILD_PATH_PREFIX_MAP variable (https://reproducible-builds.org/specs/build-path-prefix-map/) if it is set.

    val absolute_path : string -> string
    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.

    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.

    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/dev/ocaml/Longident/index.html b/dev/ocaml/Longident/index.html index d7e753f5..515d94b1 100644 --- a/dev/ocaml/Longident/index.html +++ b/dev/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/dev/ocaml/Mach/index.html b/dev/ocaml/Mach/index.html index 6edaa79f..291e6b9a 100644 --- a/dev/ocaml/Mach/index.html +++ b/dev/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;
      }
    12. | Istackoffset of int
    13. | Iload of Cmm.memory_chunk * Arch.addressing_mode * Asttypes.mutable_flag
    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. | Inegf
    19. | Iabsf
    20. | Iaddf
    21. | Isubf
    22. | Imulf
    23. | Idivf
    24. | Ifloatofint
    25. | Iintoffloat
    26. | Iopaque
    27. | Ispecific of Arch.specific_operation
    28. | Ipoll of {
      1. return_label : Cmm.label option;
      }
    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;
      }
    12. | Istackoffset of int
    13. | Iload of Cmm.memory_chunk * Arch.addressing_mode * Asttypes.mutable_flag
    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. | Inegf
    19. | Iabsf
    20. | Iaddf
    21. | Isubf
    22. | Imulf
    23. | Idivf
    24. | Ifloatofint
    25. | Iintoffloat
    26. | Iopaque
    27. | Ispecific of Arch.specific_operation
    28. | Ipoll of {
      1. return_label : Cmm.label option;
      }
    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/dev/ocaml/Main/index.html b/dev/ocaml/Main/index.html index 98d72f95..07b80c73 100644 --- a/dev/ocaml/Main/index.html +++ b/dev/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/dev/ocaml/Main_args/Default/Main/index.html b/dev/ocaml/Main_args/Default/Main/index.html index bcfee619..04c09357 100644 --- a/dev/ocaml/Main_args/Default/Main/index.html +++ b/dev/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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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/dev/ocaml/Main_args/Default/Odoc_args/index.html b/dev/ocaml/Main_args/Default/Odoc_args/index.html index 5d6d5e57..33ef8d8a 100644 --- a/dev/ocaml/Main_args/Default/Odoc_args/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/Default/Optmain/index.html b/dev/ocaml/Main_args/Default/Optmain/index.html index 1ac48abe..ea8cbba6 100644 --- a/dev/ocaml/Main_args/Default/Optmain/index.html +++ b/dev/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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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/dev/ocaml/Main_args/Default/Opttopmain/index.html b/dev/ocaml/Main_args/Default/Opttopmain/index.html index bf48ca5f..a173eacb 100644 --- a/dev/ocaml/Main_args/Default/Opttopmain/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/Default/Topmain/index.html b/dev/ocaml/Main_args/Default/Topmain/index.html index 9974b9be..08d5d648 100644 --- a/dev/ocaml/Main_args/Default/Topmain/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/Default/index.html b/dev/ocaml/Main_args/Default/index.html index e327c5da..06389c80 100644 --- a/dev/ocaml/Main_args/Default/index.html +++ b/dev/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/dev/ocaml/Main_args/Make_bytecomp_options/argument-1-_/index.html b/dev/ocaml/Main_args/Make_bytecomp_options/argument-1-_/index.html index 15dd2e6e..3df375e0 100644 --- a/dev/ocaml/Main_args/Make_bytecomp_options/argument-1-_/index.html +++ b/dev/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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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/dev/ocaml/Main_args/Make_bytecomp_options/index.html b/dev/ocaml/Main_args/Make_bytecomp_options/index.html index e1f2d7f5..332bf93c 100644 --- a/dev/ocaml/Main_args/Make_bytecomp_options/index.html +++ b/dev/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/dev/ocaml/Main_args/Make_bytetop_options/argument-1-_/index.html b/dev/ocaml/Main_args/Make_bytetop_options/argument-1-_/index.html index abad6b58..5d96eba2 100644 --- a/dev/ocaml/Main_args/Make_bytetop_options/argument-1-_/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/Make_bytetop_options/index.html b/dev/ocaml/Main_args/Make_bytetop_options/index.html index f31f1925..27cf7c8e 100644 --- a/dev/ocaml/Main_args/Make_bytetop_options/index.html +++ b/dev/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/dev/ocaml/Main_args/Make_ocamldoc_options/argument-1-_/index.html b/dev/ocaml/Main_args/Make_ocamldoc_options/argument-1-_/index.html index 8787a018..a8f3c9fa 100644 --- a/dev/ocaml/Main_args/Make_ocamldoc_options/argument-1-_/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/Make_ocamldoc_options/index.html b/dev/ocaml/Main_args/Make_ocamldoc_options/index.html index 92ac9e73..53c63f03 100644 --- a/dev/ocaml/Main_args/Make_ocamldoc_options/index.html +++ b/dev/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/dev/ocaml/Main_args/Make_optcomp_options/argument-1-_/index.html b/dev/ocaml/Main_args/Make_optcomp_options/argument-1-_/index.html index 981d7141..88de9758 100644 --- a/dev/ocaml/Main_args/Make_optcomp_options/argument-1-_/index.html +++ b/dev/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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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/dev/ocaml/Main_args/Make_optcomp_options/index.html b/dev/ocaml/Main_args/Make_optcomp_options/index.html index 389e05b3..56f4f112 100644 --- a/dev/ocaml/Main_args/Make_optcomp_options/index.html +++ b/dev/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/dev/ocaml/Main_args/Make_opttop_options/argument-1-_/index.html b/dev/ocaml/Main_args/Make_opttop_options/argument-1-_/index.html index 7be4db0c..aafdc304 100644 --- a/dev/ocaml/Main_args/Make_opttop_options/argument-1-_/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/Make_opttop_options/index.html b/dev/ocaml/Main_args/Make_opttop_options/index.html index bf11e185..68a768f7 100644 --- a/dev/ocaml/Main_args/Make_opttop_options/index.html +++ b/dev/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/dev/ocaml/Main_args/index.html b/dev/ocaml/Main_args/index.html index 51a4563a..024913df 100644 --- a/dev/ocaml/Main_args/index.html +++ b/dev/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/dev/ocaml/Main_args/module-type-Arg_list/index.html b/dev/ocaml/Main_args/module-type-Arg_list/index.html index 8f483951..a5fac7c7 100644 --- a/dev/ocaml/Main_args/module-type-Arg_list/index.html +++ b/dev/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/dev/ocaml/Main_args/module-type-Bytecomp_options/index.html b/dev/ocaml/Main_args/module-type-Bytecomp_options/index.html index fba352d9..a25dcc02 100644 --- a/dev/ocaml/Main_args/module-type-Bytecomp_options/index.html +++ b/dev/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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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/dev/ocaml/Main_args/module-type-Bytetop_options/index.html b/dev/ocaml/Main_args/module-type-Bytetop_options/index.html index 051e0d65..6c79791b 100644 --- a/dev/ocaml/Main_args/module-type-Bytetop_options/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/module-type-Common_options/index.html b/dev/ocaml/Main_args/module-type-Common_options/index.html index d25e8342..5fa2364b 100644 --- a/dev/ocaml/Main_args/module-type-Common_options/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    diff --git a/dev/ocaml/Main_args/module-type-Compiler_options/index.html b/dev/ocaml/Main_args/module-type-Compiler_options/index.html index 5fe52b46..dc81e055 100644 --- a/dev/ocaml/Main_args/module-type-Compiler_options/index.html +++ b/dev/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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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/dev/ocaml/Main_args/module-type-Core_options/index.html b/dev/ocaml/Main_args/module-type-Core_options/index.html index c026a489..d46a2401 100644 --- a/dev/ocaml/Main_args/module-type-Core_options/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/module-type-Ocamldoc_options/index.html b/dev/ocaml/Main_args/module-type-Ocamldoc_options/index.html index 350621c9..947355e2 100644 --- a/dev/ocaml/Main_args/module-type-Ocamldoc_options/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/module-type-Optcommon_options/index.html b/dev/ocaml/Main_args/module-type-Optcommon_options/index.html index 9945b282..5b86b7cc 100644 --- a/dev/ocaml/Main_args/module-type-Optcommon_options/index.html +++ b/dev/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/dev/ocaml/Main_args/module-type-Optcomp_options/index.html b/dev/ocaml/Main_args/module-type-Optcomp_options/index.html index d009f253..a0f55231 100644 --- a/dev/ocaml/Main_args/module-type-Optcomp_options/index.html +++ b/dev/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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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 _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 _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : 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 _unsafe_string : 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 _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _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 _safe_string : 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/dev/ocaml/Main_args/module-type-Opttop_options/index.html b/dev/ocaml/Main_args/module-type-Opttop_options/index.html index b0f730fa..1838af22 100644 --- a/dev/ocaml/Main_args/module-type-Opttop_options/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Main_args/module-type-Toplevel_options/index.html b/dev/ocaml/Main_args/module-type-Toplevel_options/index.html index da644485..7e1fd376 100644 --- a/dev/ocaml/Main_args/module-type-Toplevel_options/index.html +++ b/dev/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 _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 _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 _safe_string : 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 _unsafe_string : 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 _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 _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 _safe_string : 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 _unsafe_string : 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/dev/ocaml/Maindriver/index.html b/dev/ocaml/Maindriver/index.html index 587f871e..29a8c544 100644 --- a/dev/ocaml/Maindriver/index.html +++ b/dev/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/dev/ocaml/Makedepend/index.html b/dev/ocaml/Makedepend/index.html index 5bff08cd..b6107c14 100644 --- a/dev/ocaml/Makedepend/index.html +++ b/dev/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/dev/ocaml/Matching/index.html b/dev/ocaml/Matching/index.html index 95fb05fc..f7155dc8 100644 --- a/dev/ocaml/Matching/index.html +++ b/dev/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/dev/ocaml/Meta/index.html b/dev/ocaml/Meta/index.html index f7aa1423..405b60e1 100644 --- a/dev/ocaml/Meta/index.html +++ b/dev/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/dev/ocaml/Misc/Color/index.html b/dev/ocaml/Misc/Color/index.html index 2e7c2380..8f9e3253 100644 --- a/dev/ocaml/Misc/Color/index.html +++ b/dev/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;
    }
    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;
    }
    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/dev/ocaml/Misc/Error_style/index.html b/dev/ocaml/Misc/Error_style/index.html index f1d6c61c..d283a0ee 100644 --- a/dev/ocaml/Misc/Error_style/index.html +++ b/dev/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/dev/ocaml/Misc/Int_literal_converter/index.html b/dev/ocaml/Misc/Int_literal_converter/index.html index a2fb303f..e71ee7ee 100644 --- a/dev/ocaml/Misc/Int_literal_converter/index.html +++ b/dev/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
    val int32 : string -> int32
    val int64 : string -> int64
    val nativeint : string -> nativeint
    \ No newline at end of file +Int_literal_converter (ocaml.Misc.Int_literal_converter)

    Module Misc.Int_literal_converter

    val int : string -> int
    val int32 : string -> int32
    val int64 : string -> int64
    val nativeint : string -> nativeint
    diff --git a/dev/ocaml/Misc/LongString/index.html b/dev/ocaml/Misc/LongString/index.html index ad137ccc..6a2fdb65 100644 --- a/dev/ocaml/Misc/LongString/index.html +++ b/dev/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/dev/ocaml/Misc/Magic_number/index.html b/dev/ocaml/Misc/Magic_number/index.html index 6cfb29c7..bb5a1fed 100644 --- a/dev/ocaml/Misc/Magic_number/index.html +++ b/dev/ocaml/Misc/Magic_number/index.html @@ -1,5 +1,5 @@ -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
    +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
    @@ -12,6 +12,6 @@ begin
       | 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.0
    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 -> + 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.

    \ 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.

    diff --git a/dev/ocaml/Misc/Stdlib/Array/index.html b/dev/ocaml/Misc/Stdlib/Array/index.html index ffe340e7..203226ac 100644 --- a/dev/ocaml/Misc/Stdlib/Array/index.html +++ b/dev/ocaml/Misc/Stdlib/Array/index.html @@ -1,2 +1,2 @@ -Array (ocaml.Misc.Stdlib.Array)

    Module Stdlib.Array

    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

    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/dev/ocaml/Misc/Stdlib/List/index.html b/dev/ocaml/Misc/Stdlib/List/index.html index 081713c3..94006177 100644 --- a/dev/ocaml/Misc/Stdlib/List/index.html +++ b/dev/ocaml/Misc/Stdlib/List/index.html @@ -1,6 +1,6 @@ -List (ocaml.Misc.Stdlib.List)

    Module Stdlib.List

    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

    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/dev/ocaml/Misc/Stdlib/Option/index.html b/dev/ocaml/Misc/Stdlib/Option/index.html index 1c0a5d40..cb416a8f 100644 --- a/dev/ocaml/Misc/Stdlib/Option/index.html +++ b/dev/ocaml/Misc/Stdlib/Option/index.html @@ -1,6 +1,6 @@ -Option (ocaml.Misc.Stdlib.Option)

    Module Stdlib.Option

    type 'a t = 'a option
    val print : +Option (ocaml.Misc.Stdlib.Option)

    Module Stdlib.Option

    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/dev/ocaml/Misc/Stdlib/String/Map/index.html b/dev/ocaml/Misc/Stdlib/String/Map/index.html index b74f42bd..f64ab74d 100644 --- a/dev/ocaml/Misc/Stdlib/String/Map/index.html +++ b/dev/ocaml/Misc/Stdlib/String/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Misc.Stdlib.String.Map)

    Module String.Map

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Misc/Stdlib/String/Set/index.html b/dev/ocaml/Misc/Stdlib/String/Set/index.html index 0451b9e9..1674009d 100644 --- a/dev/ocaml/Misc/Stdlib/String/Set/index.html +++ b/dev/ocaml/Misc/Stdlib/String/Set/index.html @@ -1,3 +1,3 @@ -Set (ocaml.Misc.Stdlib.String.Set)

    Module String.Set

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Misc/Stdlib/String/Tbl/index.html b/dev/ocaml/Misc/Stdlib/String/Tbl/index.html index ca598412..cf1d305b 100644 --- a/dev/ocaml/Misc/Stdlib/String/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Misc/Stdlib/String/index.html b/dev/ocaml/Misc/Stdlib/String/index.html index cc85d580..6b8fc6b1 100644 --- a/dev/ocaml/Misc/Stdlib/String/index.html +++ b/dev/ocaml/Misc/Stdlib/String/index.html @@ -1,3 +1,3 @@ -String (ocaml.Misc.Stdlib.String)

    Module Stdlib.String

    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.0
    val empty : string

    The empty string.

    • since 4.13.0
    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13.0
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13.0
    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.

    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.0

    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.0 (4.05.0 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.0
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13.0
    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.0 (4.05.0 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.0
    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.0
    val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a

    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.0
    val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a

    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.0
    val exists : (char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13.0
    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.0
    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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0

    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.

    Deprecated functions

    val create : int -> bytes

    create n returns a fresh 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.

    • deprecated

      This is a deprecated alias of Bytes.create/BytesLabels.create.

    val set : bytes -> int -> char -> unit

    set s n c modifies byte sequence s in place, replacing the byte at index n with c. You can also write s.[n] <- c instead of set s n c.

    • raises Invalid_argument

      if n is not a valid index in s.

    • deprecated

      This is a deprecated alias of Bytes.set/BytesLabels.set.

    val blit : string -> int -> bytes -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len bytes from the string src, starting at index src_pos, to byte sequence dst, starting at character number 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.

    val copy : string -> string

    Return a copy of the given string.

    • deprecated

      Because strings are immutable, it doesn't make much sense to make identical copies of them.

    val fill : bytes -> int -> int -> char -> unit

    fill s pos len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    • deprecated

      This is a deprecated alias of Bytes.fill/BytesLabels.fill.

    val uppercase : string -> string

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : string -> string

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : string -> string

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : string -> string

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.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.0
    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.0
    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.0
    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.0
    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.0
    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

    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.0
    val empty : string

    The empty string.

    • since 4.13.0
    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13.0
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13.0
    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.

    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.0

    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.0 (4.05.0 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.0
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13.0
    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.0 (4.05.0 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.0
    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.0
    val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a

    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.0
    val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a

    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.0
    val exists : (char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13.0
    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.0
    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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0

    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.

    Deprecated functions

    val create : int -> bytes

    create n returns a fresh 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.

    • deprecated

      This is a deprecated alias of Bytes.create/BytesLabels.create.

    val set : bytes -> int -> char -> unit

    set s n c modifies byte sequence s in place, replacing the byte at index n with c. You can also write s.[n] <- c instead of set s n c.

    • raises Invalid_argument

      if n is not a valid index in s.

    • deprecated

      This is a deprecated alias of Bytes.set/BytesLabels.set.

    val blit : string -> int -> bytes -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len bytes from the string src, starting at index src_pos, to byte sequence dst, starting at character number 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.

    val copy : string -> string

    Return a copy of the given string.

    • deprecated

      Because strings are immutable, it doesn't make much sense to make identical copies of them.

    val fill : bytes -> int -> int -> char -> unit

    fill s pos len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    • deprecated

      This is a deprecated alias of Bytes.fill/BytesLabels.fill.

    val uppercase : string -> string

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : string -> string

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : string -> string

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : string -> string

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.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.0
    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.0
    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.0
    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.0
    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.0
    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/dev/ocaml/Misc/Stdlib/index.html b/dev/ocaml/Misc/Stdlib/index.html index 0522ba5e..83ea66c6 100644 --- a/dev/ocaml/Misc/Stdlib/index.html +++ b/dev/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/dev/ocaml/Misc/index.html b/dev/ocaml/Misc/index.html index b7599f5e..7f7d8f5c 100644 --- a/dev/ocaml/Misc/index.html +++ b/dev/ocaml/Misc/index.html @@ -1,7 +1,7 @@ -Misc (ocaml.Misc)

    Module Misc

    Miscellaneous useful types and functions

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

    val fatal_error : string -> 'a
    val fatal_errorf : ('a, Stdlib.Format.formatter, unit, 'b) format4 -> 'a
    exception Fatal_error
    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.

    val fatal_error : string -> 'a
    val fatal_errorf : ('a, Stdlib.Format.formatter, unit, 'b) format4 -> 'a
    exception Fatal_error
    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
    @@ -12,14 +12,14 @@ Misc.try_finally
              (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.

    val map_end : ('a -> 'b) -> 'a list -> 'b list -> 'b list
    val map_left_right : ('a -> 'b) -> 'a list -> 'b list
    val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
    val replicate_list : 'a -> int -> 'a list
    val list_remove : 'a -> 'a list -> 'a list
    val split_last : 'a list -> 'a list * 'a
    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.

    module Stdlib : sig ... end
    val find_in_path : string list -> string -> string
    val find_in_path_rel : string list -> string -> string
    val find_in_path_uncap : string list -> string -> string
    val remove_file : string -> unit
    val expand_directory : string -> string -> string
    val split_path_contents : ?sep:char -> string -> string list
    val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t
    val copy_file : in_channel -> out_channel -> unit
    val copy_file_chunk : in_channel -> out_channel -> int -> unit
    val string_of_file : in_channel -> string
    val output_to_file_via_temporary : - ?mode:open_flag list -> + ~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.

    val map_end : ('a -> 'b) -> 'a list -> 'b list -> 'b list
    val map_left_right : ('a -> 'b) -> 'a list -> 'b list
    val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool
    val replicate_list : 'a -> int -> 'a list
    val list_remove : 'a -> 'a list -> 'a list
    val split_last : 'a list -> 'a list * 'a
    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.

    module Stdlib : sig ... end
    val find_in_path : string list -> string -> string
    val find_in_path_rel : string list -> string -> string
    val find_in_path_uncap : string list -> string -> string
    val remove_file : string -> unit
    val expand_directory : string -> string -> string
    val split_path_contents : ?sep:char -> string -> string list
    val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t
    val copy_file : in_channel -> out_channel -> unit
    val copy_file_chunk : in_channel -> out_channel -> int -> unit
    val string_of_file : in_channel -> string
    val output_to_file_via_temporary : + ?mode:open_flag list -> string -> (string -> out_channel -> 'a) -> - 'a
    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 log2 : int -> int
    val align : int -> int -> int
    val no_overflow_add : int -> int -> bool
    val no_overflow_sub : int -> int -> bool
    val no_overflow_mul : int -> int -> bool
    val no_overflow_lsl : int -> int -> bool
    module Int_literal_converter : sig ... end
    val chop_extensions : string -> string
    val search_substring : string -> string -> int -> int
    val replace_substring : before:string -> after:string -> string -> string
    val rev_split_words : string -> string list
    val get_ref : 'a list ref -> 'a list
    val set_or_ignore : ('a -> 'b option) -> 'b option ref -> 'a -> unit
    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
    module LongString : sig ... end
    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.

    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 + 'a

    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 log2 : int -> int
    val align : int -> int -> int
    val no_overflow_add : int -> int -> bool
    val no_overflow_sub : int -> int -> bool
    val no_overflow_mul : int -> int -> bool
    val no_overflow_lsl : int -> int -> bool
    module Int_literal_converter : sig ... end
    val chop_extensions : string -> string
    val search_substring : string -> string -> int -> int
    val replace_substring : before:string -> after:string -> string -> string
    val rev_split_words : string -> string list
    val get_ref : 'a list ref -> 'a list
    val set_or_ignore : ('a -> 'b option) -> 'b option ref -> 'a -> unit
    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
    module LongString : sig ... end
    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.

    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.

    module Color : sig ... end
    module Error_style : sig ... end
    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.

    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 [
    @@ -34,4 +34,4 @@ Misc.try_finally
       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.

    type filepath = string
    type modname = string
    type crcs = (modname * Stdlib.Digest.t option) list
    type alerts = string Stdlib.String.Map.t
    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.

    \ No newline at end of file + 'a

    print_if ppf flag fmt x prints x with fmt on ppf if b is true.

    type filepath = string
    type modname = string
    type crcs = (modname * Stdlib.Digest.t option) list
    type alerts = string Stdlib.String.Map.t
    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.

    diff --git a/dev/ocaml/Mtype/index.html b/dev/ocaml/Mtype/index.html index a820b79c..38984342 100644 --- a/dev/ocaml/Mtype/index.html +++ b/dev/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/dev/ocaml/Mutable_variable/Map/index.html b/dev/ocaml/Mutable_variable/Map/index.html index 2d504466..a7f78463 100644 --- a/dev/ocaml/Mutable_variable/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Mutable_variable/Set/index.html b/dev/ocaml/Mutable_variable/Set/index.html index 296ca91c..1144e7b1 100644 --- a/dev/ocaml/Mutable_variable/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Mutable_variable/T/index.html b/dev/ocaml/Mutable_variable/T/index.html index b6964587..1ba7c1cb 100644 --- a/dev/ocaml/Mutable_variable/T/index.html +++ b/dev/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/dev/ocaml/Mutable_variable/Tbl/index.html b/dev/ocaml/Mutable_variable/Tbl/index.html index d28dd33b..a4003ec9 100644 --- a/dev/ocaml/Mutable_variable/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Mutable_variable/index.html b/dev/ocaml/Mutable_variable/index.html index 7b59ed3f..5fc522af 100644 --- a/dev/ocaml/Mutable_variable/index.html +++ b/dev/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/dev/ocaml/Mutex/index.html b/dev/ocaml/Mutex/index.html index 04278168..f61dfd92 100644 --- a/dev/ocaml/Mutex/index.html +++ b/dev/ocaml/Mutex/index.html @@ -1,4 +1,4 @@ -Mutex (ocaml.Mutex)

    Module 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;
    +Mutex (ocaml.Mutex)

    Module 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.

    \ No newline at end of file +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.

    diff --git a/dev/ocaml/Numbers/Float/Map/index.html b/dev/ocaml/Numbers/Float/Map/index.html index 0df22dac..a471444a 100644 --- a/dev/ocaml/Numbers/Float/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Numbers/Float/Set/index.html b/dev/ocaml/Numbers/Float/Set/index.html index 03f1c84c..43bf2679 100644 --- a/dev/ocaml/Numbers/Float/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Numbers/Float/T/index.html b/dev/ocaml/Numbers/Float/T/index.html index d4ba8c18..3f5e2ede 100644 --- a/dev/ocaml/Numbers/Float/T/index.html +++ b/dev/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/dev/ocaml/Numbers/Float/Tbl/index.html b/dev/ocaml/Numbers/Float/Tbl/index.html index 6e9b8c70..90a4f54a 100644 --- a/dev/ocaml/Numbers/Float/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Numbers/Float/index.html b/dev/ocaml/Numbers/Float/index.html index 43d2abe0..1bc75f03 100644 --- a/dev/ocaml/Numbers/Float/index.html +++ b/dev/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/dev/ocaml/Numbers/Int/Map/index.html b/dev/ocaml/Numbers/Int/Map/index.html index 9b18dc61..58e9116b 100644 --- a/dev/ocaml/Numbers/Int/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Numbers/Int/Set/index.html b/dev/ocaml/Numbers/Int/Set/index.html index 72ed6682..68598dc6 100644 --- a/dev/ocaml/Numbers/Int/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Numbers/Int/T/index.html b/dev/ocaml/Numbers/Int/T/index.html index fef390d5..4b7d43d2 100644 --- a/dev/ocaml/Numbers/Int/T/index.html +++ b/dev/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/dev/ocaml/Numbers/Int/Tbl/index.html b/dev/ocaml/Numbers/Int/Tbl/index.html index 93479d5a..cfe5f579 100644 --- a/dev/ocaml/Numbers/Int/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Numbers/Int/index.html b/dev/ocaml/Numbers/Int/index.html index 389b8606..8566ceb9 100644 --- a/dev/ocaml/Numbers/Int/index.html +++ b/dev/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/dev/ocaml/Numbers/Int16/index.html b/dev/ocaml/Numbers/Int16/index.html index 81ffef5e..e7dc15a4 100644 --- a/dev/ocaml/Numbers/Int16/index.html +++ b/dev/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/dev/ocaml/Numbers/Int8/index.html b/dev/ocaml/Numbers/Int8/index.html index 547ddd9c..bfa7c614 100644 --- a/dev/ocaml/Numbers/Int8/index.html +++ b/dev/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/dev/ocaml/Numbers/index.html b/dev/ocaml/Numbers/index.html index 850bc18a..a2e0325f 100644 --- a/dev/ocaml/Numbers/index.html +++ b/dev/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/dev/ocaml/Odoc/index.html b/dev/ocaml/Odoc/index.html index ae4e28fe..93387302 100644 --- a/dev/ocaml/Odoc/index.html +++ b/dev/ocaml/Odoc/index.html @@ -1,2 +1,2 @@ -Odoc (ocaml.Odoc)

    Module Odoc

    module M = Odoc_messages
    val arg_list : string list
    val plugins : string list
    val paths : string list
    val get_real_filename : string -> string
    val load_plugin : string -> unit
    val loaded_modules : Odoc_module.t_module list
    val modules : Odoc_module.t_module list
    \ No newline at end of file +Odoc (ocaml.Odoc)

    Module Odoc

    module M = Odoc_messages
    val arg_list : string list
    val plugins : string list
    val paths : string list
    val get_real_filename : string -> string
    val load_plugin : string -> unit
    val loaded_modules : Odoc_module.t_module list
    val modules : Odoc_module.t_module list
    diff --git a/dev/ocaml/Odoc_analyse/index.html b/dev/ocaml/Odoc_analyse/index.html index f96ef6b6..48857666 100644 --- a/dev/ocaml/Odoc_analyse/index.html +++ b/dev/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/dev/ocaml/Odoc_args/index.html b/dev/ocaml/Odoc_args/index.html index 207a5790..cd116c9c 100644 --- a/dev/ocaml/Odoc_args/index.html +++ b/dev/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/dev/ocaml/Odoc_ast/Analyser/argument-1-_/index.html b/dev/ocaml/Odoc_ast/Analyser/argument-1-_/index.html index 556171b4..572912e5 100644 --- a/dev/ocaml/Odoc_ast/Analyser/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Odoc_ast/Analyser/index.html b/dev/ocaml/Odoc_ast/Analyser/index.html index b3c7ea75..4f5647f2 100644 --- a/dev/ocaml/Odoc_ast/Analyser/index.html +++ b/dev/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/dev/ocaml/Odoc_ast/Typedtree_search/index.html b/dev/ocaml/Odoc_ast/Typedtree_search/index.html index 0fe80ae0..33ac7884 100644 --- a/dev/ocaml/Odoc_ast/Typedtree_search/index.html +++ b/dev/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/dev/ocaml/Odoc_ast/index.html b/dev/ocaml/Odoc_ast/index.html index 65e5b824..b0d7d2bf 100644 --- a/dev/ocaml/Odoc_ast/index.html +++ b/dev/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/dev/ocaml/Odoc_class/index.html b/dev/ocaml/Odoc_class/index.html index bfab6ad7..5c778906 100644 --- a/dev/ocaml/Odoc_class/index.html +++ b/dev/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/dev/ocaml/Odoc_comments/Basic_info_retriever/index.html b/dev/ocaml/Odoc_comments/Basic_info_retriever/index.html index 21384ffb..8487e4e2 100644 --- a/dev/ocaml/Odoc_comments/Basic_info_retriever/index.html +++ b/dev/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/dev/ocaml/Odoc_comments/index.html b/dev/ocaml/Odoc_comments/index.html index 5f413dd1..44315a4b 100644 --- a/dev/ocaml/Odoc_comments/index.html +++ b/dev/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/dev/ocaml/Odoc_comments/module-type-Texter/index.html b/dev/ocaml/Odoc_comments/module-type-Texter/index.html index 32f1b9b5..d9197d33 100644 --- a/dev/ocaml/Odoc_comments/module-type-Texter/index.html +++ b/dev/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/dev/ocaml/Odoc_comments_global/index.html b/dev/ocaml/Odoc_comments_global/index.html index a1d2aa35..31371ab1 100644 --- a/dev/ocaml/Odoc_comments_global/index.html +++ b/dev/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/dev/ocaml/Odoc_config/index.html b/dev/ocaml/Odoc_config/index.html index d3fec08c..0b6ef8c3 100644 --- a/dev/ocaml/Odoc_config/index.html +++ b/dev/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/dev/ocaml/Odoc_control/index.html b/dev/ocaml/Odoc_control/index.html index 9882d6ee..077251c7 100644 --- a/dev/ocaml/Odoc_control/index.html +++ b/dev/ocaml/Odoc_control/index.html @@ -1,2 +1,2 @@ -Odoc_control (ocaml.Odoc_control)

    Module Odoc_control

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

    Module Odoc_control

    diff --git a/dev/ocaml/Odoc_cross/index.html b/dev/ocaml/Odoc_cross/index.html index c48ec2c9..f32ffa59 100644 --- a/dev/ocaml/Odoc_cross/index.html +++ b/dev/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/dev/ocaml/Odoc_dag2html/index.html b/dev/ocaml/Odoc_dag2html/index.html index 1e3151aa..eb44d071 100644 --- a/dev/ocaml/Odoc_dag2html/index.html +++ b/dev/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/dev/ocaml/Odoc_dep/Dep/index.html b/dev/ocaml/Odoc_dep/Dep/index.html index fe8d56ff..3974d065 100644 --- a/dev/ocaml/Odoc_dep/Dep/index.html +++ b/dev/ocaml/Odoc_dep/Dep/index.html @@ -1,2 +1,2 @@ -Dep (ocaml.Odoc_dep.Dep)

    Module Odoc_dep.Dep

    type id = string
    val set_to_list : String.Set.t -> String.Set.elt list
    type node = {
    1. id : id;
    2. mutable near : String.Set.t;
    3. mutable far : (id * String.Set.t) list;
    4. reflex : bool;
    }
    type graph = node list
    val make_node : id -> id list -> node
    val get_node : node list -> id -> node
    val trans_closure : node list -> String.Set.t -> node -> String.Set.t
    val node_trans_closure : node list -> node -> unit
    val compute_trans_closure : node list -> unit
    val prune_node : node list -> node -> unit
    val kernel : node list -> node list
    \ No newline at end of file +Dep (ocaml.Odoc_dep.Dep)

    Module Odoc_dep.Dep

    type id = string
    val set_to_list : String.Set.t -> String.Set.elt list
    type node = {
    1. id : id;
    2. mutable near : String.Set.t;
    3. mutable far : (id * String.Set.t) list;
    4. reflex : bool;
    }
    type graph = node list
    val make_node : id -> id list -> node
    val get_node : node list -> id -> node
    val trans_closure : node list -> String.Set.t -> node -> String.Set.t
    val node_trans_closure : node list -> node -> unit
    val compute_trans_closure : node list -> unit
    val prune_node : node list -> node -> unit
    val kernel : node list -> node list
    diff --git a/dev/ocaml/Odoc_dep/index.html b/dev/ocaml/Odoc_dep/index.html index 45f196af..8f425543 100644 --- a/dev/ocaml/Odoc_dep/index.html +++ b/dev/ocaml/Odoc_dep/index.html @@ -1,5 +1,5 @@ -Odoc_dep (ocaml.Odoc_dep)

    Module Odoc_dep

    module Module = Odoc_module
    module Type = Odoc_type
    module String = Misc.Stdlib.String
    val set_to_list : String.Set.t -> String.Set.elt list
    val impl_dependencies : Parsetree.structure -> String.Set.elt list
    val intf_dependencies : Parsetree.signature -> String.Set.elt list
    module Dep : sig ... end
    val type_deps : Odoc_type.t_type -> string list
    val kernel_deps_of_modules : Module.t_module list -> unit
    val deps_of_types : - ?kernel:bool -> +Odoc_dep (ocaml.Odoc_dep)

    Module Odoc_dep

    module Module = Odoc_module
    module Type = Odoc_type
    module String = Misc.Stdlib.String
    val set_to_list : String.Set.t -> String.Set.elt list
    val impl_dependencies : Parsetree.structure -> String.Set.elt list
    val intf_dependencies : Parsetree.signature -> String.Set.elt list
    module Dep : sig ... end
    val type_deps : Odoc_type.t_type -> string list
    val kernel_deps_of_modules : Module.t_module list -> unit
    val deps_of_types : + ?kernel:bool -> Type.t_type list -> - (Type.t_type * String.Set.elt list) list
    \ No newline at end of file + (Type.t_type * String.Set.elt list) list
    diff --git a/dev/ocaml/Odoc_dot/Generator/class-dot/index.html b/dev/ocaml/Odoc_dot/Generator/class-dot/index.html index db22ba52..617cae1e 100644 --- a/dev/ocaml/Odoc_dot/Generator/class-dot/index.html +++ b/dev/ocaml/Odoc_dot/Generator/class-dot/index.html @@ -1,7 +1,7 @@ -dot (ocaml.Odoc_dot.Generator.dot)

    Class Generator.dot

    val mutable modules : Odoc_info.Module.t_module list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable colors : string list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : F.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : F.formatter -> +dot (ocaml.Odoc_dot.Generator.dot)

    Class Generator.dot

    val mutable modules : Odoc_info.Module.t_module list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable colors : string list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : F.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : F.formatter -> (Odoc_info.Type.t_type * Odoc_info.Name.t list) -> unit
    method generate_modules : Odoc_info.Module.t_module list -> unit
    method generate_types : Odoc_info.Type.t_type list -> unit
    method get_one_color : string option
    method header : string
    method node_color : Odoc_info.Name.t -> string option
    method print_module_atts : F.formatter -> Odoc_info.Module.t_module -> unit
    method print_one_dep : F.formatter -> Odoc_info.Name.t -> Odoc_info.Name.t -> - unit
    method print_type_atts : F.formatter -> Odoc_info.Type.t_type -> unit
    \ No newline at end of file + unit
    method print_type_atts : F.formatter -> Odoc_info.Type.t_type -> unit
    diff --git a/dev/ocaml/Odoc_dot/Generator/index.html b/dev/ocaml/Odoc_dot/Generator/index.html index 7893db33..a9219998 100644 --- a/dev/ocaml/Odoc_dot/Generator/index.html +++ b/dev/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/dev/ocaml/Odoc_dot/index.html b/dev/ocaml/Odoc_dot/index.html index 1d407499..4d033e79 100644 --- a/dev/ocaml/Odoc_dot/index.html +++ b/dev/ocaml/Odoc_dot/index.html @@ -1,2 +1,2 @@ -Odoc_dot (ocaml.Odoc_dot)

    Module Odoc_dot

    module F = Stdlib.Format
    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

    module F = Stdlib.Format
    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/dev/ocaml/Odoc_dot/module-type-Dot_generator/class-dot/index.html b/dev/ocaml/Odoc_dot/module-type-Dot_generator/class-dot/index.html index 8e6e5ac0..50ac77d5 100644 --- a/dev/ocaml/Odoc_dot/module-type-Dot_generator/class-dot/index.html +++ b/dev/ocaml/Odoc_dot/module-type-Dot_generator/class-dot/index.html @@ -1,7 +1,7 @@ -dot (ocaml.Odoc_dot.Dot_generator.dot)

    Class Dot_generator.dot

    val mutable modules : Odoc_info.Module.t_module list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable colors : string list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : F.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : F.formatter -> +dot (ocaml.Odoc_dot.Dot_generator.dot)

    Class Dot_generator.dot

    val mutable modules : Odoc_info.Module.t_module list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable colors : string list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : F.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : F.formatter -> (Odoc_info.Type.t_type * Odoc_info.Name.t list) -> unit
    method generate_modules : Odoc_info.Module.t_module list -> unit
    method generate_types : Odoc_info.Type.t_type list -> unit
    method get_one_color : string option
    method header : string
    method node_color : Odoc_info.Name.t -> string option
    method print_module_atts : F.formatter -> Odoc_info.Module.t_module -> unit
    method print_one_dep : F.formatter -> Odoc_info.Name.t -> Odoc_info.Name.t -> - unit
    method print_type_atts : F.formatter -> Odoc_info.Type.t_type -> unit
    \ No newline at end of file + unit
    method print_type_atts : F.formatter -> Odoc_info.Type.t_type -> unit
    diff --git a/dev/ocaml/Odoc_dot/module-type-Dot_generator/index.html b/dev/ocaml/Odoc_dot/module-type-Dot_generator/index.html index 08d60805..121cfddf 100644 --- a/dev/ocaml/Odoc_dot/module-type-Dot_generator/index.html +++ b/dev/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/dev/ocaml/Odoc_env/index.html b/dev/ocaml/Odoc_env/index.html index 3fe88088..929b5176 100644 --- a/dev/ocaml/Odoc_env/index.html +++ b/dev/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/dev/ocaml/Odoc_exception/index.html b/dev/ocaml/Odoc_exception/index.html index bfa324b9..cf4bf887 100644 --- a/dev/ocaml/Odoc_exception/index.html +++ b/dev/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/dev/ocaml/Odoc_extension/index.html b/dev/ocaml/Odoc_extension/index.html index 52a97f6b..6cef5200 100644 --- a/dev/ocaml/Odoc_extension/index.html +++ b/dev/ocaml/Odoc_extension/index.html @@ -1,2 +1,2 @@ -Odoc_extension (ocaml.Odoc_extension)

    Module Odoc_extension

    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

    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/dev/ocaml/Odoc_gen/Base_generator/class-generator/index.html b/dev/ocaml/Odoc_gen/Base_generator/class-generator/index.html index 9d506f77..5b8a7d56 100644 --- a/dev/ocaml/Odoc_gen/Base_generator/class-generator/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/Base_generator/index.html b/dev/ocaml/Odoc_gen/Base_generator/index.html index 6ecdedf6..adf44206 100644 --- a/dev/ocaml/Odoc_gen/Base_generator/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/class-type-doc_generator/index.html b/dev/ocaml/Odoc_gen/class-type-doc_generator/index.html index e8c1c648..efc44c77 100644 --- a/dev/ocaml/Odoc_gen/class-type-doc_generator/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/index.html b/dev/ocaml/Odoc_gen/index.html index 20390ec6..fd7c8961 100644 --- a/dev/ocaml/Odoc_gen/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Base/class-generator/index.html b/dev/ocaml/Odoc_gen/module-type-Base/class-generator/index.html index 20c70684..9e04451a 100644 --- a/dev/ocaml/Odoc_gen/module-type-Base/class-generator/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Base/index.html b/dev/ocaml/Odoc_gen/module-type-Base/index.html index 1a339673..20474781 100644 --- a/dev/ocaml/Odoc_gen/module-type-Base/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/class-generator/index.html b/dev/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/class-generator/index.html index 48fd42ea..054e4d43 100644 --- a/dev/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/class-generator/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/index.html b/dev/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/index.html index 3b900301..0aa01011 100644 --- a/dev/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Base_functor/class-generator/index.html b/dev/ocaml/Odoc_gen/module-type-Base_functor/class-generator/index.html index b5ac697f..25fd4570 100644 --- a/dev/ocaml/Odoc_gen/module-type-Base_functor/class-generator/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Base_functor/index.html b/dev/ocaml/Odoc_gen/module-type-Base_functor/index.html index fb99a8c1..1ba1d4f6 100644 --- a/dev/ocaml/Odoc_gen/module-type-Base_functor/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/class-dot/index.html b/dev/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/class-dot/index.html index 6cba1912..91743727 100644 --- a/dev/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/class-dot/index.html +++ b/dev/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 modules : Odoc_info.Module.t_module list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable colors : string list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Odoc_dot.F.formatter -> +dot (ocaml.Odoc_gen.Dot_functor._.dot)

    Class _.dot

    val mutable modules : Odoc_info.Module.t_module list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable colors : string list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Odoc_dot.F.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : Odoc_dot.F.formatter -> (Odoc_info.Type.t_type * Odoc_info.Name.t list) -> @@ -8,4 +8,4 @@ unit
    method print_one_dep : Odoc_dot.F.formatter -> Odoc_info.Name.t -> Odoc_info.Name.t -> - unit
    method print_type_atts : Odoc_dot.F.formatter -> Odoc_info.Type.t_type -> unit
    \ No newline at end of file + unit
    method print_type_atts : Odoc_dot.F.formatter -> Odoc_info.Type.t_type -> unit
    diff --git a/dev/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/index.html b/dev/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/index.html index 15dc5082..7849ff9a 100644 --- a/dev/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Dot_functor/class-dot/index.html b/dev/ocaml/Odoc_gen/module-type-Dot_functor/class-dot/index.html index 68f3bf03..dcb9f9f4 100644 --- a/dev/ocaml/Odoc_gen/module-type-Dot_functor/class-dot/index.html +++ b/dev/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 modules : Odoc_info.Module.t_module list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable colors : string list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Odoc_dot.F.formatter -> +dot (ocaml.Odoc_gen.Dot_functor.dot)

    Class Dot_functor.dot

    val mutable modules : Odoc_info.Module.t_module list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable colors : string list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Odoc_dot.F.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : Odoc_dot.F.formatter -> (Odoc_info.Type.t_type * Odoc_info.Name.t list) -> @@ -8,4 +8,4 @@ unit
    method print_one_dep : Odoc_dot.F.formatter -> Odoc_info.Name.t -> Odoc_info.Name.t -> - unit
    method print_type_atts : Odoc_dot.F.formatter -> Odoc_info.Type.t_type -> unit
    \ No newline at end of file + unit
    method print_type_atts : Odoc_dot.F.formatter -> Odoc_info.Type.t_type -> unit
    diff --git a/dev/ocaml/Odoc_gen/module-type-Dot_functor/index.html b/dev/ocaml/Odoc_gen/module-type-Dot_functor/index.html index 5fb092a2..df727a09 100644 --- a/dev/ocaml/Odoc_gen/module-type-Dot_functor/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/class-html/index.html b/dev/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/class-html/index.html index 71d57b70..7e106d8b 100644 --- a/dev/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/class-html/index.html +++ b/dev/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 tag_functions : (string * (Odoc_info.text -> string)) list
    val mutable style_file : string
    val mutable style : string
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable known_types_names : Odoc_html.String.Set.t
    val mutable known_modules_names : Odoc_html.String.Set.t
    val mutable known_classes_names : Odoc_html.String.Set.t
    val mutable header : Buffer.t -> - ?nav: +html (ocaml.Odoc_gen.Html_functor._.html)

    Class _.html

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    val mutable style_file : string
    val mutable style : string
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable known_types_names : Odoc_html.String.Set.t
    val mutable known_modules_names : Odoc_html.String.Set.t
    val mutable known_classes_names : Odoc_html.String.Set.t
    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 doctype : string
    val mutable default_style_options : 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. ('a option -> 'a option -> 'a -> unit) -> 'a list -> - unit
    method generate_elements_index : 'a. ?strip_libname:bool -> + unit
    method generate_elements_index : 'a. ?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_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 -> @@ -150,13 +150,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/dev/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/index.html b/dev/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/index.html index 8c586cd2..1702a981 100644 --- a/dev/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Html_functor/class-html/index.html b/dev/ocaml/Odoc_gen/module-type-Html_functor/class-html/index.html index 8b1a46bc..89a48b8d 100644 --- a/dev/ocaml/Odoc_gen/module-type-Html_functor/class-html/index.html +++ b/dev/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 tag_functions : (string * (Odoc_info.text -> string)) list
    val mutable style_file : string
    val mutable style : string
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable known_types_names : Odoc_html.String.Set.t
    val mutable known_modules_names : Odoc_html.String.Set.t
    val mutable known_classes_names : Odoc_html.String.Set.t
    val mutable header : Buffer.t -> - ?nav: +html (ocaml.Odoc_gen.Html_functor.html)

    Class Html_functor.html

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    val mutable style_file : string
    val mutable style : string
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable known_types_names : Odoc_html.String.Set.t
    val mutable known_modules_names : Odoc_html.String.Set.t
    val mutable known_classes_names : Odoc_html.String.Set.t
    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 doctype : string
    val mutable default_style_options : 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. ('a option -> 'a option -> 'a -> unit) -> 'a list -> - unit
    method generate_elements_index : 'a. ?strip_libname:bool -> + unit
    method generate_elements_index : 'a. ?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_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 -> @@ -150,13 +150,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/dev/ocaml/Odoc_gen/module-type-Html_functor/index.html b/dev/ocaml/Odoc_gen/module-type-Html_functor/index.html index b35d93a4..0ecdffd9 100644 --- a/dev/ocaml/Odoc_gen/module-type-Html_functor/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/class-latex/index.html b/dev/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/class-latex/index.html index 4a2b0347..86195926 100644 --- a/dev/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/class-latex/index.html +++ b/dev/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 mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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 mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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_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_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/dev/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/index.html b/dev/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/index.html index 2bf68641..8ba16e36 100644 --- a/dev/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Latex_functor/class-latex/index.html b/dev/ocaml/Odoc_gen/module-type-Latex_functor/class-latex/index.html index 55ed3e1f..e6e95198 100644 --- a/dev/ocaml/Odoc_gen/module-type-Latex_functor/class-latex/index.html +++ b/dev/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 mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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 mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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_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_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/dev/ocaml/Odoc_gen/module-type-Latex_functor/index.html b/dev/ocaml/Odoc_gen/module-type-Latex_functor/index.html index fb49d38c..363cdc58 100644 --- a/dev/ocaml/Odoc_gen/module-type-Latex_functor/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/class-man/index.html b/dev/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/class-man/index.html index 1f88cdc8..01b33a7e 100644 --- a/dev/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/class-man/index.html +++ b/dev/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_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_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/dev/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/index.html b/dev/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/index.html index 090c5dcb..fad4042a 100644 --- a/dev/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Man_functor/class-man/index.html b/dev/ocaml/Odoc_gen/module-type-Man_functor/class-man/index.html index 4d9a05f7..c718e904 100644 --- a/dev/ocaml/Odoc_gen/module-type-Man_functor/class-man/index.html +++ b/dev/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_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_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/dev/ocaml/Odoc_gen/module-type-Man_functor/index.html b/dev/ocaml/Odoc_gen/module-type-Man_functor/index.html index ec7655ac..0ecd90ec 100644 --- a/dev/ocaml/Odoc_gen/module-type-Man_functor/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/class-texi/index.html b/dev/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/class-texi/index.html index 832505bf..44efa13f 100644 --- a/dev/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/class-texi/index.html +++ b/dev/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 tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val node_tbl : (Odoc_info.Name.t, unit) Hashtbl.t
    val maxdepth : int
    val linebreak : Odoc_info.text_element
    val mutable indices_to_build : [ `Class +texi (ocaml.Odoc_gen.Texi_functor._.texi)

    Class _.texi

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val node_tbl : (Odoc_info.Name.t, unit) Hashtbl.t
    val maxdepth : int
    val linebreak : Odoc_info.text_element
    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 -> @@ -50,8 +50,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 -> @@ -71,14 +71,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 -> @@ -92,4 +92,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/dev/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/index.html b/dev/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/index.html index eda01e49..a1c71b19 100644 --- a/dev/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Odoc_gen/module-type-Texi_functor/class-texi/index.html b/dev/ocaml/Odoc_gen/module-type-Texi_functor/class-texi/index.html index c93883e1..6cdb5153 100644 --- a/dev/ocaml/Odoc_gen/module-type-Texi_functor/class-texi/index.html +++ b/dev/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 tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val node_tbl : (Odoc_info.Name.t, unit) Hashtbl.t
    val maxdepth : int
    val linebreak : Odoc_info.text_element
    val mutable indices_to_build : [ `Class +texi (ocaml.Odoc_gen.Texi_functor.texi)

    Class Texi_functor.texi

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val node_tbl : (Odoc_info.Name.t, unit) Hashtbl.t
    val maxdepth : int
    val linebreak : Odoc_info.text_element
    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 -> @@ -50,8 +50,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 -> @@ -71,14 +71,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 -> @@ -92,4 +92,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/dev/ocaml/Odoc_gen/module-type-Texi_functor/index.html b/dev/ocaml/Odoc_gen/module-type-Texi_functor/index.html index 2dbb8631..163292f4 100644 --- a/dev/ocaml/Odoc_gen/module-type-Texi_functor/index.html +++ b/dev/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/dev/ocaml/Odoc_global/index.html b/dev/ocaml/Odoc_global/index.html index 66e867f6..d9b110d7 100644 --- a/dev/ocaml/Odoc_global/index.html +++ b/dev/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/dev/ocaml/Odoc_html/Generator/class-html/index.html b/dev/ocaml/Odoc_html/Generator/class-html/index.html index 3a7b894a..973bee9f 100644 --- a/dev/ocaml/Odoc_html/Generator/class-html/index.html +++ b/dev/ocaml/Odoc_html/Generator/class-html/index.html @@ -1,9 +1,9 @@ -html (ocaml.Odoc_html.Generator.html)

    Class Generator.html

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    val mutable style_file : string
    val mutable style : string
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable known_types_names : String.Set.t
    val mutable known_modules_names : String.Set.t
    val mutable known_classes_names : String.Set.t
    val mutable header : Buffer.t -> - ?nav: +html (ocaml.Odoc_html.Generator.html)

    Class Generator.html

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    val mutable style_file : string
    val mutable style : string
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable known_types_names : String.Set.t
    val mutable known_modules_names : String.Set.t
    val mutable known_classes_names : String.Set.t
    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 doctype : string
    val mutable default_style_options : 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. ('a option -> 'a option -> 'a -> unit) -> 'a list -> - unit
    method generate_elements_index : 'a. ?strip_libname:bool -> + unit
    method generate_elements_index : 'a. ?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_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 -> @@ -150,13 +150,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/dev/ocaml/Odoc_html/Generator/index.html b/dev/ocaml/Odoc_html/Generator/index.html index 7e629029..a1810412 100644 --- a/dev/ocaml/Odoc_html/Generator/index.html +++ b/dev/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/dev/ocaml/Odoc_html/Naming/index.html b/dev/ocaml/Odoc_html/Naming/index.html index 13d9cee6..d1c4ca41 100644 --- a/dev/ocaml/Odoc_html/Naming/index.html +++ b/dev/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/dev/ocaml/Odoc_html/class-info/index.html b/dev/ocaml/Odoc_html/class-info/index.html index 6df5e504..27382aed 100644 --- a/dev/ocaml/Odoc_html/class-info/index.html +++ b/dev/ocaml/Odoc_html/class-info/index.html @@ -1,10 +1,10 @@ -info (ocaml.Odoc_html.info)

    Class Odoc_html.info

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    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_custom : Buffer.t -> (string * Odoc_info.text) list -> unit
    method html_of_info : ?cls:string -> - ?indent:bool -> +info (ocaml.Odoc_html.info)

    Class Odoc_html.info

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    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_custom : Buffer.t -> (string * Odoc_info.text) list -> 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_types.info option -> unit
    method html_of_raised_exceptions : Buffer.t -> (string * Odoc_info.text) 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_version_opt : Buffer.t -> string option -> unit
    \ No newline at end of file + 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_version_opt : Buffer.t -> string option -> unit
    diff --git a/dev/ocaml/Odoc_html/class-ocaml_code/index.html b/dev/ocaml/Odoc_html/class-ocaml_code/index.html index 8eceb3fc..cca48fa8 100644 --- a/dev/ocaml/Odoc_html/class-ocaml_code/index.html +++ b/dev/ocaml/Odoc_html/class-ocaml_code/index.html @@ -1,2 +1,2 @@ -ocaml_code (ocaml.Odoc_html.ocaml_code)

    Class Odoc_html.ocaml_code

    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    \ No newline at end of file +ocaml_code (ocaml.Odoc_html.ocaml_code)

    Class Odoc_html.ocaml_code

    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    diff --git a/dev/ocaml/Odoc_html/class-text/index.html b/dev/ocaml/Odoc_html/class-text/index.html index 11ccd3ab..1ac49e31 100644 --- a/dev/ocaml/Odoc_html/class-text/index.html +++ b/dev/ocaml/Odoc_html/class-text/index.html @@ -1,10 +1,10 @@ -text (ocaml.Odoc_html.text)

    Class Odoc_html.text

    method create_title_label : (int * string option * Odoc_info.text) -> string
    method escape : string -> string
    method html_of_Block : Buffer.t -> Odoc_info.text -> unit
    method html_of_Bold : Buffer.t -> Odoc_info.text -> unit
    method html_of_Center : Buffer.t -> Odoc_info.text -> unit
    method html_of_Code : Buffer.t -> string -> unit
    method html_of_CodePre : Buffer.t -> string -> unit
    method html_of_Emphasize : Buffer.t -> Odoc_info.text -> unit
    method html_of_Enum : Buffer.t -> Odoc_info.text list -> unit
    method html_of_Index_list : Buffer.t -> unit
    method html_of_Italic : Buffer.t -> Odoc_info.text -> unit
    method html_of_Latex : Buffer.t -> string -> unit
    method html_of_Left : Buffer.t -> Odoc_info.text -> unit
    method html_of_List : Buffer.t -> Odoc_info.text list -> unit
    method html_of_Module_list : Buffer.t -> Odoc_info.Name.t list -> unit
    method html_of_Newline : Buffer.t -> unit
    method html_of_Raw : Buffer.t -> string -> unit
    method html_of_Ref : Buffer.t -> +text (ocaml.Odoc_html.text)

    Class Odoc_html.text

    method create_title_label : (int * string option * Odoc_info.text) -> string
    method escape : string -> string
    method html_of_Block : Buffer.t -> Odoc_info.text -> unit
    method html_of_Bold : Buffer.t -> Odoc_info.text -> unit
    method html_of_Center : Buffer.t -> Odoc_info.text -> unit
    method html_of_Code : Buffer.t -> string -> unit
    method html_of_CodePre : Buffer.t -> string -> unit
    method html_of_Emphasize : Buffer.t -> Odoc_info.text -> unit
    method html_of_Enum : Buffer.t -> Odoc_info.text list -> unit
    method html_of_Index_list : Buffer.t -> unit
    method html_of_Italic : Buffer.t -> Odoc_info.text -> unit
    method html_of_Latex : Buffer.t -> string -> unit
    method html_of_Left : Buffer.t -> Odoc_info.text -> unit
    method html_of_List : Buffer.t -> Odoc_info.text list -> unit
    method html_of_Module_list : Buffer.t -> Odoc_info.Name.t list -> unit
    method html_of_Newline : Buffer.t -> unit
    method html_of_Raw : Buffer.t -> string -> unit
    method html_of_Ref : Buffer.t -> 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_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_custom_text : Buffer.t -> string -> Odoc_info.text -> unit
    method html_of_info_first_sentence : Buffer.t -> Odoc_info.info 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 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_types : string
    method index_values : string
    method keep_alpha_num : 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
    \ No newline at end of file + unit
    method html_of_Verbatim : Buffer.t -> string -> unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_custom_text : Buffer.t -> string -> Odoc_info.text -> unit
    method html_of_info_first_sentence : Buffer.t -> Odoc_info.info 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 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_types : string
    method index_values : string
    method keep_alpha_num : 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
    diff --git a/dev/ocaml/Odoc_html/index.html b/dev/ocaml/Odoc_html/index.html index 75d437d2..698d2871 100644 --- a/dev/ocaml/Odoc_html/index.html +++ b/dev/ocaml/Odoc_html/index.html @@ -1,2 +1,2 @@ -Odoc_html (ocaml.Odoc_html)

    Module Odoc_html

    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
    class ocaml_code : object ... end
    val new_buf : unit -> Stdlib.Buffer.t
    val bp : Stdlib.Buffer.t -> ('a, Stdlib.Buffer.t, unit) format -> 'a
    val bs : Stdlib.Buffer.t -> string -> unit
    class virtual text : object ... end
    class virtual info : object ... end
    val opt : ('a -> 'b) -> 'a option -> 'b option
    val print_concat : Stdlib.Buffer.t -> string -> ('a -> unit) -> 'a list -> unit
    val text_to_html : string -> string
    module Generator : sig ... end
    module type Html_generator = sig ... end
    \ No newline at end of file +Odoc_html (ocaml.Odoc_html)

    Module Odoc_html

    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
    class ocaml_code : object ... end
    val new_buf : unit -> Stdlib.Buffer.t
    val bp : Stdlib.Buffer.t -> ('a, Stdlib.Buffer.t, unit) format -> 'a
    val bs : Stdlib.Buffer.t -> string -> unit
    class virtual text : object ... end
    class virtual info : object ... end
    val opt : ('a -> 'b) -> 'a option -> 'b option
    val print_concat : Stdlib.Buffer.t -> string -> ('a -> unit) -> 'a list -> unit
    val text_to_html : string -> string
    module Generator : sig ... end
    module type Html_generator = sig ... end
    diff --git a/dev/ocaml/Odoc_html/module-type-Html_generator/class-html/index.html b/dev/ocaml/Odoc_html/module-type-Html_generator/class-html/index.html index 111a08d9..6082f4ce 100644 --- a/dev/ocaml/Odoc_html/module-type-Html_generator/class-html/index.html +++ b/dev/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 tag_functions : (string * (Odoc_info.text -> string)) list
    val mutable style_file : string
    val mutable style : string
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable known_types_names : String.Set.t
    val mutable known_modules_names : String.Set.t
    val mutable known_classes_names : String.Set.t
    val mutable header : Buffer.t -> - ?nav: +html (ocaml.Odoc_html.Html_generator.html)

    Class Html_generator.html

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    val mutable style_file : string
    val mutable style : string
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable known_types_names : String.Set.t
    val mutable known_modules_names : String.Set.t
    val mutable known_classes_names : String.Set.t
    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 doctype : string
    val mutable default_style_options : 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. ('a option -> 'a option -> 'a -> unit) -> 'a list -> - unit
    method generate_elements_index : 'a. ?strip_libname:bool -> + unit
    method generate_elements_index : 'a. ?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_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 -> @@ -150,13 +150,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/dev/ocaml/Odoc_html/module-type-Html_generator/index.html b/dev/ocaml/Odoc_html/module-type-Html_generator/index.html index 1bdc7dc0..78a303ce 100644 --- a/dev/ocaml/Odoc_html/module-type-Html_generator/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Class/index.html b/dev/ocaml/Odoc_info/Class/index.html index 6790a607..3b1f2914 100644 --- a/dev/ocaml/Odoc_info/Class/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Dep/index.html b/dev/ocaml/Odoc_info/Dep/index.html index 7284d539..e2b3154c 100644 --- a/dev/ocaml/Odoc_info/Dep/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Exception/index.html b/dev/ocaml/Odoc_info/Exception/index.html index a1e5385f..cefcf49b 100644 --- a/dev/ocaml/Odoc_info/Exception/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Extension/index.html b/dev/ocaml/Odoc_info/Extension/index.html index d8855cb2..b2106b56 100644 --- a/dev/ocaml/Odoc_info/Extension/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Global/index.html b/dev/ocaml/Odoc_info/Global/index.html index eca5df56..718db171 100644 --- a/dev/ocaml/Odoc_info/Global/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Module/index.html b/dev/ocaml/Odoc_info/Module/index.html index b4e1ce79..ef58965c 100644 --- a/dev/ocaml/Odoc_info/Module/index.html +++ b/dev/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_with of module_type_kind * string
      (*

      A module whose type is a with ... constraint. Should appear in interface files only.

      *)
    6. | Module_constraint of module_kind * module_type_kind
      (*

      A module constraint by a module type.

      *)
    7. | Module_typeof of string
      (*

      by now only the code of the module expression

      *)
    8. | 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_with of module_type_kind * string
      (*

      A module whose type is a with ... constraint. Should appear in interface files only.

      *)
    6. | Module_constraint of module_kind * module_type_kind
      (*

      A module constraint by a module type.

      *)
    7. | Module_typeof of string
      (*

      by now only the code of the module expression

      *)
    8. | 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/dev/ocaml/Odoc_info/Name/index.html b/dev/ocaml/Odoc_info/Name/index.html index 7322addc..be2224e2 100644 --- a/dev/ocaml/Odoc_info/Name/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Parameter/index.html b/dev/ocaml/Odoc_info/Parameter/index.html index 1b1bb2ea..b8764f47 100644 --- a/dev/ocaml/Odoc_info/Parameter/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Scan/class-scanner/index.html b/dev/ocaml/Odoc_info/Scan/class-scanner/index.html index 5cb73db4..7ddf14a4 100644 --- a/dev/ocaml/Odoc_info/Scan/class-scanner/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Scan/index.html b/dev/ocaml/Odoc_info/Scan/index.html index e442fa98..50c2b0f3 100644 --- a/dev/ocaml/Odoc_info/Scan/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Search/index.html b/dev/ocaml/Odoc_info/Search/index.html index 96532435..0f179e47 100644 --- a/dev/ocaml/Odoc_info/Search/index.html +++ b/dev/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/dev/ocaml/Odoc_info/Type/index.html b/dev/ocaml/Odoc_info/Type/index.html index b6eafa33..b18906af 100644 --- a/dev/ocaml/Odoc_info/Type/index.html +++ b/dev/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 * bool * bool) list;
      (*

      type parameters: (type, covariant, contravariant)

      *)
    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 * bool * bool) list;
      (*

      type parameters: (type, covariant, contravariant)

      *)
    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/dev/ocaml/Odoc_info/Value/index.html b/dev/ocaml/Odoc_info/Value/index.html index e2df8c52..2c9ea3bb 100644 --- a/dev/ocaml/Odoc_info/Value/index.html +++ b/dev/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/dev/ocaml/Odoc_info/index.html b/dev/ocaml/Odoc_info/index.html index 141b9725..e323e9dd 100644 --- a/dev/ocaml/Odoc_info/index.html +++ b/dev/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 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.

      *)
    }

    Information in a special comment

    • before 3.12.0

      @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 -> (bool * bool) -> string

    string_of_variance t (covariant, invariant) returns "+" if the given information means "covariant", "-" if it means "contravariant", orelse "", and always "" if the given type is not an abstract type with no manifest (i.e. no need for the variance to be printed).

    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 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.

      *)
    }

    Information in a special comment

    • before 3.12.0

      @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 -> (bool * bool) -> string

    string_of_variance t (covariant, invariant) returns "+" if the given information means "covariant", "-" if it means "contravariant", orelse "", and always "" if the given type is not an abstract type with no manifest (i.e. no need for the variance to be printed).

    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_string_of_info : info -> string

    info_string_of_info info returns the string representing the given info. This string can then be parsed again by Odoc_info.info_of_string.

    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_string_of_info : info -> string

    info_string_of_info info returns the string representing the given info. This string can then be parsed again by Odoc_info.info_of_string.

    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/dev/ocaml/Odoc_inherit/index.html b/dev/ocaml/Odoc_inherit/index.html index e1971e1c..b93d1020 100644 --- a/dev/ocaml/Odoc_inherit/index.html +++ b/dev/ocaml/Odoc_inherit/index.html @@ -1,2 +1,2 @@ -Odoc_inherit (ocaml.Odoc_inherit)

    Module Odoc_inherit

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

    Module Odoc_inherit

    diff --git a/dev/ocaml/Odoc_latex/Generator/class-latex/index.html b/dev/ocaml/Odoc_latex/Generator/class-latex/index.html index be801886..1dfe2d6e 100644 --- a/dev/ocaml/Odoc_latex/Generator/class-latex/index.html +++ b/dev/ocaml/Odoc_latex/Generator/class-latex/index.html @@ -1,7 +1,7 @@ -latex (ocaml.Odoc_latex.Generator.latex)

    Class Generator.latex

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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 mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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_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_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/dev/ocaml/Odoc_latex/Generator/index.html b/dev/ocaml/Odoc_latex/Generator/index.html index 5f9ed992..7e248a22 100644 --- a/dev/ocaml/Odoc_latex/Generator/index.html +++ b/dev/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/dev/ocaml/Odoc_latex/class-info/index.html b/dev/ocaml/Odoc_latex/class-info/index.html index 340c8bbd..79092e85 100644 --- a/dev/ocaml/Odoc_latex/class-info/index.html +++ b/dev/ocaml/Odoc_latex/class-info/index.html @@ -1,5 +1,5 @@ -info (ocaml.Odoc_latex.info)

    Class Odoc_latex.info

    method latex_of_info : Format.formatter -> - ?block:bool -> +info (ocaml.Odoc_latex.info)

    Class Odoc_latex.info

    method latex_of_info : Format.formatter -> + ?block:bool -> Odoc_info.info option -> - unit
    method latex_of_text : Format.formatter -> Odoc_info.text -> unit
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    \ No newline at end of file + unit
    method latex_of_text : Format.formatter -> Odoc_info.text -> unit
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    diff --git a/dev/ocaml/Odoc_latex/class-text/index.html b/dev/ocaml/Odoc_latex/class-text/index.html index 5129f1f7..aadd233e 100644 --- a/dev/ocaml/Odoc_latex/class-text/index.html +++ b/dev/ocaml/Odoc_latex/class-text/index.html @@ -1,11 +1,11 @@ -text (ocaml.Odoc_latex.text)

    Class Odoc_latex.text

    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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 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 label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_of_Block : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Bold : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Center : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Code : Format.formatter -> string -> unit
    method latex_of_CodePre : Format.formatter -> string -> unit
    method latex_of_Emphasize : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Enum : Format.formatter -> Odoc_info.text list -> unit
    method latex_of_Italic : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Latex : Format.formatter -> string -> unit
    method latex_of_Left : Format.formatter -> Odoc_info.text -> unit
    method latex_of_List : Format.formatter -> Odoc_info.text list -> unit
    method latex_of_Newline : Format.formatter -> unit
    method latex_of_Raw : Format.formatter -> string -> unit
    method latex_of_Ref : Format.formatter -> +text (ocaml.Odoc_latex.text)

    Class Odoc_latex.text

    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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 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 label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_of_Block : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Bold : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Center : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Code : Format.formatter -> string -> unit
    method latex_of_CodePre : Format.formatter -> string -> unit
    method latex_of_Emphasize : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Enum : Format.formatter -> Odoc_info.text list -> unit
    method latex_of_Italic : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Latex : Format.formatter -> string -> unit
    method latex_of_Left : Format.formatter -> Odoc_info.text -> unit
    method latex_of_List : Format.formatter -> Odoc_info.text list -> unit
    method latex_of_Newline : Format.formatter -> unit
    method latex_of_Raw : Format.formatter -> string -> unit
    method latex_of_Ref : Format.formatter -> Odoc_info.Name.t -> 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 -> @@ -15,4 +15,4 @@ Odoc_info.text -> unit
    method latex_of_text : Format.formatter -> Odoc_info.text -> unit
    method latex_of_text_element : Format.formatter -> Odoc_info.text_element -> - 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 recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    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 + 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 recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    diff --git a/dev/ocaml/Odoc_latex/index.html b/dev/ocaml/Odoc_latex/index.html index caf59c28..5c198da4 100644 --- a/dev/ocaml/Odoc_latex/index.html +++ b/dev/ocaml/Odoc_latex/index.html @@ -1,5 +1,5 @@ -Odoc_latex (ocaml.Odoc_latex)

    Module Odoc_latex

    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
    val new_buf : unit -> Stdlib.Buffer.t
    val new_fmt : unit -> Stdlib.Format.formatter * (unit -> string)
    val p : +Odoc_latex (ocaml.Odoc_latex)

    Module Odoc_latex

    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
    val new_buf : unit -> Stdlib.Buffer.t
    val new_fmt : unit -> Stdlib.Format.formatter * (unit -> string)
    val ps : Stdlib.Format.formatter -> string -> unit
    val bp : Stdlib.Buffer.t -> ('a, Stdlib.Buffer.t, unit) format -> 'a
    val bs : Stdlib.Buffer.t -> string -> unit
    val merge_codepre : Odoc_info.text_element list -> Odoc_info.text_element list
    val print_concat : @@ -7,4 +7,4 @@ string -> ('a -> unit) -> 'a list -> - unit
    class text : object ... end
    class virtual info : object ... end
    module Generator : sig ... end
    module type Latex_generator = sig ... end
    \ No newline at end of file + unit
    class text : object ... end
    class virtual info : object ... end
    module Generator : sig ... end
    module type Latex_generator = sig ... end
    diff --git a/dev/ocaml/Odoc_latex/module-type-Latex_generator/class-latex/index.html b/dev/ocaml/Odoc_latex/module-type-Latex_generator/class-latex/index.html index 1e1f5727..ccbe56e3 100644 --- a/dev/ocaml/Odoc_latex/module-type-Latex_generator/class-latex/index.html +++ b/dev/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 mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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 mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val subst_strings_simple : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings : (Str.regexp * string) 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_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_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/dev/ocaml/Odoc_latex/module-type-Latex_generator/index.html b/dev/ocaml/Odoc_latex/module-type-Latex_generator/index.html index 277e1491..d79804d4 100644 --- a/dev/ocaml/Odoc_latex/module-type-Latex_generator/index.html +++ b/dev/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/dev/ocaml/Odoc_latex_style/index.html b/dev/ocaml/Odoc_latex_style/index.html index 18ae13c0..99c391a1 100644 --- a/dev/ocaml/Odoc_latex_style/index.html +++ b/dev/ocaml/Odoc_latex_style/index.html @@ -1,2 +1,2 @@ -Odoc_latex_style (ocaml.Odoc_latex_style)

    Module Odoc_latex_style

    val content : string
    \ No newline at end of file +Odoc_latex_style (ocaml.Odoc_latex_style)

    Module Odoc_latex_style

    val content : string
    diff --git a/dev/ocaml/Odoc_lexer/index.html b/dev/ocaml/Odoc_lexer/index.html index 8904e242..ab724dad 100644 --- a/dev/ocaml/Odoc_lexer/index.html +++ b/dev/ocaml/Odoc_lexer/index.html @@ -1,8 +1,8 @@ -Odoc_lexer (ocaml.Odoc_lexer)

    Module Odoc_lexer

    val line_number : int ref
    val string_buffer : Stdlib.Buffer.t
    val reset_string_buffer : unit -> unit
    val add_char_string : char -> unit
    val add_string : string -> unit
    val read_string : unit -> string
    val description : string ref
    val blank : string
    val comments_level : int ref
    val remove_blanks : string -> string
    val remove_stars : string -> string
    val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
    val __ocaml_lex_main_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val special_comment : Stdlib.Lexing.lexbuf -> Odoc_parser.token
    val __ocaml_lex_special_comment_rec : +Odoc_lexer (ocaml.Odoc_lexer)

    Module Odoc_lexer

    val line_number : int ref
    val string_buffer : Stdlib.Buffer.t
    val reset_string_buffer : unit -> unit
    val add_char_string : char -> unit
    val add_string : string -> unit
    val read_string : unit -> string
    val description : string ref
    val blank : string
    val comments_level : int ref
    val remove_blanks : string -> string
    val remove_stars : string -> string
    val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
    val __ocaml_lex_main_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val special_comment : Stdlib.Lexing.lexbuf -> Odoc_parser.token
    val __ocaml_lex_special_comment_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val special_comment_part2 : Stdlib.Lexing.lexbuf -> Odoc_parser.token
    val __ocaml_lex_special_comment_part2_rec : Stdlib.Lexing.lexbuf -> int -> - Odoc_parser.token
    val __ocaml_lex_elements_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_simple_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    \ No newline at end of file + Odoc_parser.token
    val __ocaml_lex_elements_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_simple_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    diff --git a/dev/ocaml/Odoc_man/Generator/class-man/index.html b/dev/ocaml/Odoc_man/Generator/class-man/index.html index c4623f37..c5e4aa91 100644 --- a/dev/ocaml/Odoc_man/Generator/class-man/index.html +++ b/dev/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_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_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/dev/ocaml/Odoc_man/Generator/index.html b/dev/ocaml/Odoc_man/Generator/index.html index f7f0d131..ab5f6591 100644 --- a/dev/ocaml/Odoc_man/Generator/index.html +++ b/dev/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/dev/ocaml/Odoc_man/class-info/index.html b/dev/ocaml/Odoc_man/class-info/index.html index 1ba1a91c..05b9187e 100644 --- a/dev/ocaml/Odoc_man/class-info/index.html +++ b/dev/ocaml/Odoc_man/class-info/index.html @@ -1,2 +1,2 @@ -info (ocaml.Odoc_man.info)

    Class Odoc_man.info

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_text : Buffer.t -> Odoc_info.text -> unit
    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 +info (ocaml.Odoc_man.info)

    Class Odoc_man.info

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_text : Buffer.t -> Odoc_info.text -> unit
    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/dev/ocaml/Odoc_man/index.html b/dev/ocaml/Odoc_man/index.html index e53d1c05..65e466b5 100644 --- a/dev/ocaml/Odoc_man/index.html +++ b/dev/ocaml/Odoc_man/index.html @@ -1,2 +1,2 @@ -Odoc_man (ocaml.Odoc_man)

    Module Odoc_man

    val man_suffix : string ref
    val man_section : string ref
    val man_mini : bool ref
    val new_buf : unit -> Stdlib.Buffer.t
    val bp : Stdlib.Buffer.t -> ('a, Stdlib.Buffer.t, unit) format -> 'a
    val bs : Stdlib.Buffer.t -> string -> unit
    val linebreak : string
    class virtual info : object ... end
    module Generator : sig ... end
    module type Man_generator = sig ... end
    \ No newline at end of file +Odoc_man (ocaml.Odoc_man)

    Module Odoc_man

    val man_suffix : string ref
    val man_section : string ref
    val man_mini : bool ref
    val new_buf : unit -> Stdlib.Buffer.t
    val bp : Stdlib.Buffer.t -> ('a, Stdlib.Buffer.t, unit) format -> 'a
    val bs : Stdlib.Buffer.t -> string -> unit
    val linebreak : string
    class virtual info : object ... end
    module Generator : sig ... end
    module type Man_generator = sig ... end
    diff --git a/dev/ocaml/Odoc_man/module-type-Man_generator/class-man/index.html b/dev/ocaml/Odoc_man/module-type-Man_generator/class-man/index.html index efa56173..98ffb042 100644 --- a/dev/ocaml/Odoc_man/module-type-Man_generator/class-man/index.html +++ b/dev/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_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_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/dev/ocaml/Odoc_man/module-type-Man_generator/index.html b/dev/ocaml/Odoc_man/module-type-Man_generator/index.html index 42973e1c..cd2df70b 100644 --- a/dev/ocaml/Odoc_man/module-type-Man_generator/index.html +++ b/dev/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/dev/ocaml/Odoc_merge/index.html b/dev/ocaml/Odoc_merge/index.html index e23c7c0d..a7c690ca 100644 --- a/dev/ocaml/Odoc_merge/index.html +++ b/dev/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/dev/ocaml/Odoc_messages/index.html b/dev/ocaml/Odoc_messages/index.html index c338f744..3192b396 100644 --- a/dev/ocaml/Odoc_messages/index.html +++ b/dev/ocaml/Odoc_messages/index.html @@ -1,2 +1,2 @@ -Odoc_messages (ocaml.Odoc_messages)

    Module Odoc_messages

    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 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

    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 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/dev/ocaml/Odoc_misc/index.html b/dev/ocaml/Odoc_misc/index.html index a2f4dbdc..85c1a0fa 100644 --- a/dev/ocaml/Odoc_misc/index.html +++ b/dev/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/dev/ocaml/Odoc_module/index.html b/dev/ocaml/Odoc_module/index.html index 9d1bf026..b4b4ef21 100644 --- a/dev/ocaml/Odoc_module/index.html +++ b/dev/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_with of module_type_kind * string
    6. | Module_constraint of module_kind * module_type_kind
    7. | Module_typeof of string
    8. | 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_with of module_type_kind * string
    6. | Module_constraint of module_kind * module_type_kind
    7. | Module_typeof of string
    8. | 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/dev/ocaml/Odoc_name/Map/index.html b/dev/ocaml/Odoc_name/Map/index.html index 04bfed3b..2d1dda61 100644 --- a/dev/ocaml/Odoc_name/Map/index.html +++ b/dev/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 is_empty : 'a t -> bool
    val mem : key -> 'a t -> bool
    val add : key -> 'a -> 'a t -> 'a 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 is_empty : 'a t -> bool
    val mem : key -> 'a t -> bool
    val add : key -> 'a -> 'a t -> 'a 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 compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
    val exists : (key -> 'a -> bool) -> 'a t -> bool
    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 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 split : key -> 'a t -> 'a t * 'a option * 'a t
    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 map : ('a -> 'b) -> 'a t -> 'b t
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b 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 compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
    val exists : (key -> 'a -> bool) -> 'a t -> bool
    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 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 split : key -> 'a t -> 'a t * 'a option * 'a t
    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 map : ('a -> 'b) -> 'a t -> 'b t
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b 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/dev/ocaml/Odoc_name/index.html b/dev/ocaml/Odoc_name/index.html index 48d9e655..e441bb39 100644 --- a/dev/ocaml/Odoc_name/index.html +++ b/dev/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/dev/ocaml/Odoc_ocamlhtml/index.html b/dev/ocaml/Odoc_ocamlhtml/index.html index a4685da3..1b5a6ba1 100644 --- a/dev/ocaml/Odoc_ocamlhtml/index.html +++ b/dev/ocaml/Odoc_ocamlhtml/index.html @@ -1,2 +1,2 @@ -Odoc_ocamlhtml (ocaml.Odoc_ocamlhtml)

    Module Odoc_ocamlhtml

    exception Fatal_error
    val fatal_error : string -> 'a
    type error =
    1. | Illegal_character of char
    2. | Unterminated_comment
    3. | Unterminated_string
    4. | Unterminated_string_in_comment
    5. | Keyword_as_label of string
    exception Error of error * int * int
    val base_escape_strings : (string * string) list
    val prelike_escape_strings : (string * string) list
    val pre : bool ref
    val escape : string -> string
    val escape_base : string -> string
    val print : ?esc:bool -> string -> unit
    val print_class : ?esc:bool -> string -> string -> unit
    val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t
    val html_of_comment : (string -> string) ref
    val keyword_table : (string, string) Stdlib.Hashtbl.t
    val kwsign_class : string
    val constructor_class : string
    val comment_class : string
    val string_class : string
    val code_class : string
    val margin : int ref
    val comment_buffer : Stdlib.Buffer.t
    val reset_comment_buffer : unit -> unit
    val store_comment_char : char -> unit
    val add_comment_string : string -> unit
    val make_margin : unit -> string
    val print_comment : unit -> unit
    val string_buffer : Stdlib.Buffer.t
    val reset_string_buffer : unit -> unit
    val store_string_char : char -> unit
    val get_stored_string : unit -> string
    val char_for_backslash : char -> char
    val char_for_decimal_code : Stdlib.Lexing.lexbuf -> int -> char
    val char_for_hexa_code : Stdlib.Lexing.lexbuf -> int -> char
    val string_start_pos : int ref
    val comment_start_pos : int list ref
    val in_comment : unit -> bool
    val report_error : Stdlib.Format.formatter -> error -> unit
    val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
    val token : Stdlib.Lexing.lexbuf -> unit
    val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> unit
    val comment : Stdlib.Lexing.lexbuf -> unit
    val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> unit
    val string : Stdlib.Lexing.lexbuf -> unit
    val __ocaml_lex_string_rec : Stdlib.Lexing.lexbuf -> int -> unit
    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

    exception Fatal_error
    val fatal_error : string -> 'a
    type error =
    1. | Illegal_character of char
    2. | Unterminated_comment
    3. | Unterminated_string
    4. | Unterminated_string_in_comment
    5. | Keyword_as_label of string
    exception Error of error * int * int
    val base_escape_strings : (string * string) list
    val prelike_escape_strings : (string * string) list
    val pre : bool ref
    val escape : string -> string
    val escape_base : string -> string
    val print : ?esc:bool -> string -> unit
    val print_class : ?esc:bool -> string -> string -> unit
    val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t
    val html_of_comment : (string -> string) ref
    val keyword_table : (string, string) Stdlib.Hashtbl.t
    val kwsign_class : string
    val constructor_class : string
    val comment_class : string
    val string_class : string
    val code_class : string
    val margin : int ref
    val comment_buffer : Stdlib.Buffer.t
    val reset_comment_buffer : unit -> unit
    val store_comment_char : char -> unit
    val add_comment_string : string -> unit
    val make_margin : unit -> string
    val print_comment : unit -> unit
    val string_buffer : Stdlib.Buffer.t
    val reset_string_buffer : unit -> unit
    val store_string_char : char -> unit
    val get_stored_string : unit -> string
    val char_for_backslash : char -> char
    val char_for_decimal_code : Stdlib.Lexing.lexbuf -> int -> char
    val char_for_hexa_code : Stdlib.Lexing.lexbuf -> int -> char
    val string_start_pos : int ref
    val comment_start_pos : int list ref
    val in_comment : unit -> bool
    val report_error : Stdlib.Format.formatter -> error -> unit
    val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
    val token : Stdlib.Lexing.lexbuf -> unit
    val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> unit
    val comment : Stdlib.Lexing.lexbuf -> unit
    val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> unit
    val string : Stdlib.Lexing.lexbuf -> unit
    val __ocaml_lex_string_rec : Stdlib.Lexing.lexbuf -> int -> unit
    val html_of_code : Stdlib.Buffer.t -> ?with_pre:bool -> string -> unit
    diff --git a/dev/ocaml/Odoc_parameter/index.html b/dev/ocaml/Odoc_parameter/index.html index 7d8653c8..13e3387b 100644 --- a/dev/ocaml/Odoc_parameter/index.html +++ b/dev/ocaml/Odoc_parameter/index.html @@ -1,8 +1,8 @@ -Odoc_parameter (ocaml.Odoc_parameter)

    Module Odoc_parameter

    type simple_name = {
    1. sn_name : string;
    2. sn_type : Types.type_expr;
    3. mutable sn_text : Odoc_types.text option;
    }
    type param_info =
    1. | Simple_name of simple_name
    2. | Tuple of param_info list * Types.type_expr
    type parameter = param_info
    val complete_name : param_info -> string
    val update_parameter_text : +Odoc_parameter (ocaml.Odoc_parameter)

    Module Odoc_parameter

    type simple_name = {
    1. sn_name : string;
    2. sn_type : Types.type_expr;
    3. mutable sn_text : Odoc_types.text option;
    }
    type param_info =
    1. | Simple_name of simple_name
    2. | Tuple of param_info list * Types.type_expr
    type parameter = param_info
    val complete_name : param_info -> string
    val update_parameter_text : (string -> Odoc_types.text option) -> param_info -> unit
    val desc_by_name : param_info -> string -> Odoc_types.text option
    val names : param_info -> string list
    val type_by_name : param_info -> string -> Types.type_expr
    val desc_from_info_opt : Odoc_types.info option -> string -> - Odoc_types.text option
    \ No newline at end of file + Odoc_types.text option
    diff --git a/dev/ocaml/Odoc_parser/index.html b/dev/ocaml/Odoc_parser/index.html index fe0f3025..79fdc3fe 100644 --- a/dev/ocaml/Odoc_parser/index.html +++ b/dev/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/dev/ocaml/Odoc_print/index.html b/dev/ocaml/Odoc_print/index.html index 661cdf17..c3e492ea 100644 --- a/dev/ocaml/Odoc_print/index.html +++ b/dev/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/dev/ocaml/Odoc_scan/class-scanner/index.html b/dev/ocaml/Odoc_scan/class-scanner/index.html index a38ad19a..4341a800 100644 --- a/dev/ocaml/Odoc_scan/class-scanner/index.html +++ b/dev/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/dev/ocaml/Odoc_scan/index.html b/dev/ocaml/Odoc_scan/index.html index f59ffdef..51d2981d 100644 --- a/dev/ocaml/Odoc_scan/index.html +++ b/dev/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/dev/ocaml/Odoc_search/P_name/index.html b/dev/ocaml/Odoc_search/P_name/index.html index 48603ed3..b417255c 100644 --- a/dev/ocaml/Odoc_search/P_name/index.html +++ b/dev/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/dev/ocaml/Odoc_search/Search/argument-1-P/index.html b/dev/ocaml/Odoc_search/Search/argument-1-P/index.html index 981ad610..241e1d28 100644 --- a/dev/ocaml/Odoc_search/Search/argument-1-P/index.html +++ b/dev/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/dev/ocaml/Odoc_search/Search/index.html b/dev/ocaml/Odoc_search/Search/index.html index 43c410c2..abeb8e89 100644 --- a/dev/ocaml/Odoc_search/Search/index.html +++ b/dev/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/dev/ocaml/Odoc_search/Search_by_name/index.html b/dev/ocaml/Odoc_search/Search_by_name/index.html index 8a1b4740..5c717f60 100644 --- a/dev/ocaml/Odoc_search/Search_by_name/index.html +++ b/dev/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/dev/ocaml/Odoc_search/index.html b/dev/ocaml/Odoc_search/index.html index ca4082d7..34063f4b 100644 --- a/dev/ocaml/Odoc_search/index.html +++ b/dev/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/dev/ocaml/Odoc_search/module-type-Predicates/index.html b/dev/ocaml/Odoc_search/module-type-Predicates/index.html index 9e7ff987..61b5736b 100644 --- a/dev/ocaml/Odoc_search/module-type-Predicates/index.html +++ b/dev/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/dev/ocaml/Odoc_see_lexer/index.html b/dev/ocaml/Odoc_see_lexer/index.html index 91d97735..8e90e4f7 100644 --- a/dev/ocaml/Odoc_see_lexer/index.html +++ b/dev/ocaml/Odoc_see_lexer/index.html @@ -1,2 +1,2 @@ -Odoc_see_lexer (ocaml.Odoc_see_lexer)

    Module Odoc_see_lexer

    val buf : Stdlib.Buffer.t
    val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
    val __ocaml_lex_main_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_url_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_doc_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_file_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_desc_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    \ No newline at end of file +Odoc_see_lexer (ocaml.Odoc_see_lexer)

    Module Odoc_see_lexer

    val buf : Stdlib.Buffer.t
    val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
    val __ocaml_lex_main_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_url_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_doc_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_file_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    val __ocaml_lex_desc_rec : Stdlib.Lexing.lexbuf -> int -> Odoc_parser.token
    diff --git a/dev/ocaml/Odoc_sig/Analyser/argument-1-_/index.html b/dev/ocaml/Odoc_sig/Analyser/argument-1-_/index.html index 07a20a26..497d39f1 100644 --- a/dev/ocaml/Odoc_sig/Analyser/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Odoc_sig/Analyser/index.html b/dev/ocaml/Odoc_sig/Analyser/index.html index e5813766..e550c26c 100644 --- a/dev/ocaml/Odoc_sig/Analyser/index.html +++ b/dev/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/dev/ocaml/Odoc_sig/Signature_search/index.html b/dev/ocaml/Odoc_sig/Signature_search/index.html index 5437bd2a..23da1457 100644 --- a/dev/ocaml/Odoc_sig/Signature_search/index.html +++ b/dev/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/dev/ocaml/Odoc_sig/index.html b/dev/ocaml/Odoc_sig/index.html index dd0dc654..69be1a19 100644 --- a/dev/ocaml/Odoc_sig/index.html +++ b/dev/ocaml/Odoc_sig/index.html @@ -1,2 +1,2 @@ -Odoc_sig (ocaml.Odoc_sig)

    Module Odoc_sig

    module type Info_retriever = sig ... end
    module Analyser (_ : Info_retriever) : sig ... end
    \ No newline at end of file +Odoc_sig (ocaml.Odoc_sig)

    Module Odoc_sig

    module type Info_retriever = sig ... end
    module Analyser (_ : Info_retriever) : sig ... end
    diff --git a/dev/ocaml/Odoc_sig/module-type-Info_retriever/index.html b/dev/ocaml/Odoc_sig/module-type-Info_retriever/index.html index 59c6ad2c..3b8e0cb7 100644 --- a/dev/ocaml/Odoc_sig/module-type-Info_retriever/index.html +++ b/dev/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/dev/ocaml/Odoc_str/index.html b/dev/ocaml/Odoc_str/index.html index 15a6d1f9..62891e45 100644 --- a/dev/ocaml/Odoc_str/index.html +++ b/dev/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 -> (bool * bool) -> 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 -> (bool * bool) -> 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/dev/ocaml/Odoc_test/Generator/argument-1-G/class-generator/index.html b/dev/ocaml/Odoc_test/Generator/argument-1-G/class-generator/index.html index b82eb6c1..b73138f2 100644 --- a/dev/ocaml/Odoc_test/Generator/argument-1-G/class-generator/index.html +++ b/dev/ocaml/Odoc_test/Generator/argument-1-G/class-generator/index.html @@ -1,2 +1,2 @@ -generator (ocaml.Odoc_test.Generator.G.generator)

    Class G.generator

    method generate : Odoc_module.t_module list -> unit
    \ No newline at end of file +generator (ocaml.Odoc_test.Generator.G.generator)

    Class G.generator

    method generate : Odoc_module.t_module list -> unit
    diff --git a/dev/ocaml/Odoc_test/Generator/argument-1-G/index.html b/dev/ocaml/Odoc_test/Generator/argument-1-G/index.html index 0d72d715..cbf87373 100644 --- a/dev/ocaml/Odoc_test/Generator/argument-1-G/index.html +++ b/dev/ocaml/Odoc_test/Generator/argument-1-G/index.html @@ -1,2 +1,2 @@ -G (ocaml.Odoc_test.Generator.G)

    Parameter Generator.G

    \ No newline at end of file +G (ocaml.Odoc_test.Generator.G)

    Parameter Generator.G

    diff --git a/dev/ocaml/Odoc_test/Generator/class-generator/index.html b/dev/ocaml/Odoc_test/Generator/class-generator/index.html index 73d49f16..620de1bf 100644 --- a/dev/ocaml/Odoc_test/Generator/class-generator/index.html +++ b/dev/ocaml/Odoc_test/Generator/class-generator/index.html @@ -1,2 +1,2 @@ -generator (ocaml.Odoc_test.Generator.generator)

    Class Generator.generator

    method generate : Odoc_module.t_module list -> unit
    \ No newline at end of file +generator (ocaml.Odoc_test.Generator.generator)

    Class Generator.generator

    method generate : Odoc_module.t_module list -> unit
    diff --git a/dev/ocaml/Odoc_test/Generator/class-string_gen/index.html b/dev/ocaml/Odoc_test/Generator/class-string_gen/index.html index 49d81c48..ffa0bb6c 100644 --- a/dev/ocaml/Odoc_test/Generator/class-string_gen/index.html +++ b/dev/ocaml/Odoc_test/Generator/class-string_gen/index.html @@ -1,8 +1,8 @@ -string_gen (ocaml.Odoc_test.Generator.string_gen)

    Class Generator.string_gen

    val mutable test_kinds : test_kind list
    val mutable fmt : Format.formatter
    method generate : Odoc_info.Module.t_module list -> unit
    method must_display_types : bool
    method scan_attribute : Odoc_info.Value.t_attribute -> unit
    method scan_class : Odoc_info.Class.t_class -> unit
    method scan_class_comment : Odoc_info.text -> unit
    method scan_class_elements : Odoc_info.Class.t_class -> unit
    method scan_class_pre : Odoc_info.Class.t_class -> bool
    method scan_class_type : Odoc_info.Class.t_class_type -> unit
    method scan_class_type_comment : Odoc_info.text -> unit
    method scan_class_type_elements : Odoc_info.Class.t_class_type -> unit
    method scan_class_type_pre : Odoc_info.Class.t_class_type -> bool
    method scan_exception : Odoc_info.Exception.t_exception -> unit
    method scan_extension_constructor : Odoc_info.Extension.t_extension_constructor -> +string_gen (ocaml.Odoc_test.Generator.string_gen)

    Class Generator.string_gen

    val mutable test_kinds : test_kind list
    val mutable fmt : Format.formatter
    method generate : Odoc_info.Module.t_module list -> unit
    method must_display_types : bool
    method scan_attribute : Odoc_info.Value.t_attribute -> unit
    method scan_class : Odoc_info.Class.t_class -> unit
    method scan_class_comment : Odoc_info.text -> unit
    method scan_class_elements : Odoc_info.Class.t_class -> unit
    method scan_class_pre : Odoc_info.Class.t_class -> bool
    method scan_class_type : Odoc_info.Class.t_class_type -> unit
    method scan_class_type_comment : Odoc_info.text -> unit
    method scan_class_type_elements : Odoc_info.Class.t_class_type -> unit
    method scan_class_type_pre : Odoc_info.Class.t_class_type -> bool
    method scan_exception : Odoc_info.Exception.t_exception -> unit
    method scan_extension_constructor : Odoc_info.Extension.t_extension_constructor -> unit
    method scan_included_module : Odoc_info.Module.included_module -> unit
    method scan_method : Odoc_info.Value.t_method -> unit
    method scan_module : Odoc_info.Module.t_module -> unit
    method scan_module_comment : Odoc_info.text -> unit
    method scan_module_elements : Odoc_info.Module.t_module -> unit
    method scan_module_list : Odoc_info.Module.t_module list -> unit
    method scan_module_pre : Odoc_info.Module.t_module -> bool
    method scan_module_type : Odoc_info.Module.t_module_type -> unit
    method scan_module_type_comment : Odoc_info.text -> unit
    method scan_module_type_elements : Odoc_info.Module.t_module_type -> unit
    method scan_module_type_pre : Odoc_info.Module.t_module_type -> bool
    method scan_type : Odoc_info.Type.t_type -> unit
    method scan_type_const : Odoc_info.Type.t_type -> Odoc_info.Type.variant_constructor -> unit
    method scan_type_extension : Odoc_info.Extension.t_type_extension -> unit
    method scan_type_extension_constructors : Odoc_info.Extension.t_type_extension -> unit
    method scan_type_extension_pre : Odoc_info.Extension.t_type_extension -> bool
    method scan_type_pre : Odoc_info.Type.t_type -> bool
    method scan_type_recfield : Odoc_info.Type.t_type -> Odoc_info.Type.record_field -> - unit
    method scan_value : Odoc_info.Value.t_value -> unit
    method set_test_kinds_from_module : Odoc_info.Module.t_module -> unit
    \ No newline at end of file + unit
    method scan_value : Odoc_info.Value.t_value -> unit
    method set_test_kinds_from_module : Odoc_info.Module.t_module -> unit
    diff --git a/dev/ocaml/Odoc_test/Generator/index.html b/dev/ocaml/Odoc_test/Generator/index.html index 53586d51..ef2e7a7d 100644 --- a/dev/ocaml/Odoc_test/Generator/index.html +++ b/dev/ocaml/Odoc_test/Generator/index.html @@ -1,2 +1,2 @@ -Generator (ocaml.Odoc_test.Generator)

    Module Odoc_test.Generator

    Parameters

    module G : Odoc_gen.Base

    Signature

    class string_gen : object ... end
    class generator : object ... end
    \ No newline at end of file +Generator (ocaml.Odoc_test.Generator)

    Module Odoc_test.Generator

    Parameters

    module G : Odoc_gen.Base

    Signature

    class string_gen : object ... end
    class generator : object ... end
    diff --git a/dev/ocaml/Odoc_test/index.html b/dev/ocaml/Odoc_test/index.html index 64ad12f0..18100340 100644 --- a/dev/ocaml/Odoc_test/index.html +++ b/dev/ocaml/Odoc_test/index.html @@ -1,5 +1,5 @@ -Odoc_test (ocaml.Odoc_test)

    Module Odoc_test

    type test_kind =
    1. | Types_display
    val p : +Odoc_test (ocaml.Odoc_test)

    Module Odoc_test

    type test_kind =
    1. | Types_display
    module Generator (G : Odoc_gen.Base) : sig ... end
    \ No newline at end of file + 'a
    module Generator (G : Odoc_gen.Base) : sig ... end
    diff --git a/dev/ocaml/Odoc_texi/Generator/class-texi/index.html b/dev/ocaml/Odoc_texi/Generator/class-texi/index.html index 972a0b20..5b657ee5 100644 --- a/dev/ocaml/Odoc_texi/Generator/class-texi/index.html +++ b/dev/ocaml/Odoc_texi/Generator/class-texi/index.html @@ -1,5 +1,5 @@ -texi (ocaml.Odoc_texi.Generator.texi)

    Class Generator.texi

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val node_tbl : (Odoc_info.Name.t, unit) Hashtbl.t
    val maxdepth : int
    val linebreak : Odoc_info.text_element
    val mutable indices_to_build : [ `Class +texi (ocaml.Odoc_texi.Generator.texi)

    Class Generator.texi

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val node_tbl : (Odoc_info.Name.t, unit) Hashtbl.t
    val maxdepth : int
    val linebreak : Odoc_info.text_element
    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 -> @@ -50,8 +50,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 -> @@ -71,14 +71,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 -> @@ -92,4 +92,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/dev/ocaml/Odoc_texi/Generator/index.html b/dev/ocaml/Odoc_texi/Generator/index.html index df09d830..9cb7bcc6 100644 --- a/dev/ocaml/Odoc_texi/Generator/index.html +++ b/dev/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/dev/ocaml/Odoc_texi/Texi/index.html b/dev/ocaml/Odoc_texi/Texi/index.html index 337cc7c7..cc9e2645 100644 --- a/dev/ocaml/Odoc_texi/Texi/index.html +++ b/dev/ocaml/Odoc_texi/Texi/index.html @@ -1,5 +1,5 @@ -Texi (ocaml.Odoc_texi.Texi)

    Module Odoc_texi.Texi

    val subst_strings : (Str.regexp * string) list
    val escape : string -> string
    val fix_nodename : string -> string
    val generate_menu : +Texi (ocaml.Odoc_texi.Texi)

    Module Odoc_texi.Texi

    val subst_strings : (Str.regexp * string) list
    val escape : string -> string
    val fix_nodename : string -> string
    val generate_menu : out_channel -> [< `Blank | `Class of Odoc_info.Class.t_class @@ -10,4 +10,4 @@ | `Module_type of Odoc_info.Module.t_module_type | `Texi of string ] list -> - unit
    val xref : ?xname:string -> string -> string
    val ifinfo : string -> string
    val dirsection : string -> string
    val direntry : string list -> string list
    \ No newline at end of file + unit
    val xref : ?xname:string -> string -> string
    val ifinfo : string -> string
    val dirsection : string -> string
    val direntry : string list -> string list
    diff --git a/dev/ocaml/Odoc_texi/class-text/index.html b/dev/ocaml/Odoc_texi/class-text/index.html index b6f7d493..4df0cf4d 100644 --- a/dev/ocaml/Odoc_texi/class-text/index.html +++ b/dev/ocaml/Odoc_texi/class-text/index.html @@ -1,6 +1,6 @@ -text (ocaml.Odoc_texi.text)

    Class Odoc_texi.text

    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> 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 -> +text (ocaml.Odoc_texi.text)

    Class Odoc_texi.text

    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> 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_Title : int -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Verbatim : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_custom_text : string -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_text : Odoc_info.text -> string
    method texi_of_text_element : Odoc_info.text_element -> Odoc_info.Name.t
    \ No newline at end of file + 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_custom_text : string -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_text : Odoc_info.text -> string
    method texi_of_text_element : Odoc_info.text_element -> Odoc_info.Name.t
    diff --git a/dev/ocaml/Odoc_texi/index.html b/dev/ocaml/Odoc_texi/index.html index 474199b9..b4e75124 100644 --- a/dev/ocaml/Odoc_texi/index.html +++ b/dev/ocaml/Odoc_texi/index.html @@ -1,5 +1,5 @@ -Odoc_texi (ocaml.Odoc_texi)

    Module Odoc_texi

    val esc_8bits : bool ref
    val info_section : string ref
    val info_entry : string list ref
    val puts_nl : out_channel -> string -> unit
    val puts : out_channel -> string -> unit
    val nl : out_channel -> unit
    val is : 'a option -> bool
    val pad_to : int -> string -> string
    val indent : int -> string -> string
    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 menu_data = +Odoc_texi (ocaml.Odoc_texi)

    Module Odoc_texi

    val esc_8bits : bool ref
    val info_section : string ref
    val info_entry : string list ref
    val puts_nl : out_channel -> string -> unit
    val puts : out_channel -> string -> unit
    val nl : out_channel -> unit
    val is : 'a option -> bool
    val pad_to : int -> string -> string
    val indent : int -> string -> string
    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 menu_data = [ `Blank | `Class of Odoc_info.Class.t_class | `Class_type of Odoc_info.Class.t_class_type @@ -25,4 +25,4 @@ | `Module_type | `Type | `Value ] -> - string
    val indices_names : (string * string) list
    module Texi : sig ... end
    val titles_and_headings : (int * (string * string)) list ref
    val title : ('a * 'b) -> 'a
    val heading : ('a * 'b) -> 'b
    val fallback_title : string
    val fallback_heading : string
    class text : object ... end
    exception Aliased_node
    module Generator : sig ... end
    module type Texi_generator = sig ... end
    \ No newline at end of file + string
    val indices_names : (string * string) list
    module Texi : sig ... end
    val titles_and_headings : (int * (string * string)) list ref
    val title : ('a * 'b) -> 'a
    val heading : ('a * 'b) -> 'b
    val fallback_title : string
    val fallback_heading : string
    class text : object ... end
    exception Aliased_node
    module Generator : sig ... end
    module type Texi_generator = sig ... end
    diff --git a/dev/ocaml/Odoc_texi/module-type-Texi_generator/class-texi/index.html b/dev/ocaml/Odoc_texi/module-type-Texi_generator/class-texi/index.html index 211dbd1b..c015e17c 100644 --- a/dev/ocaml/Odoc_texi/module-type-Texi_generator/class-texi/index.html +++ b/dev/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 tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val node_tbl : (Odoc_info.Name.t, unit) Hashtbl.t
    val maxdepth : int
    val linebreak : Odoc_info.text_element
    val mutable indices_to_build : [ `Class +texi (ocaml.Odoc_texi.Texi_generator.texi)

    Class Texi_generator.texi

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    val node_tbl : (Odoc_info.Name.t, unit) Hashtbl.t
    val maxdepth : int
    val linebreak : Odoc_info.text_element
    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 -> @@ -50,8 +50,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 -> @@ -71,14 +71,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 -> @@ -92,4 +92,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/dev/ocaml/Odoc_texi/module-type-Texi_generator/index.html b/dev/ocaml/Odoc_texi/module-type-Texi_generator/index.html index e2793613..882f46bc 100644 --- a/dev/ocaml/Odoc_texi/module-type-Texi_generator/index.html +++ b/dev/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/dev/ocaml/Odoc_text/Texter/index.html b/dev/ocaml/Odoc_text/Texter/index.html index 9d2ae907..d74f9c30 100644 --- a/dev/ocaml/Odoc_text/Texter/index.html +++ b/dev/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/dev/ocaml/Odoc_text/index.html b/dev/ocaml/Odoc_text/index.html index 3d152e47..da23a158 100644 --- a/dev/ocaml/Odoc_text/index.html +++ b/dev/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/dev/ocaml/Odoc_text_lexer/index.html b/dev/ocaml/Odoc_text_lexer/index.html index a9a6c612..150c5e51 100644 --- a/dev/ocaml/Odoc_text_lexer/index.html +++ b/dev/ocaml/Odoc_text_lexer/index.html @@ -1,5 +1,5 @@ -Odoc_text_lexer (ocaml.Odoc_text_lexer)

    Module Odoc_text_lexer

    val line_number : int ref
    val char_number : int ref
    val string_buffer : Stdlib.Buffer.t
    val reset_string_buffer : unit -> unit
    val add_char_string : char -> unit
    val add_string : string -> unit
    val read_string : unit -> string
    val description : string ref
    val blank : string
    val open_brackets : int ref
    val verb_mode : bool ref
    val target_mode : bool ref
    val shortcut_list_mode : bool ref
    val ele_ref_mode : bool ref
    val code_pre_mode : bool ref
    val init : unit -> unit
    val incr_cpts : Stdlib.Lexing.lexbuf -> unit
    val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
    val __ocaml_lex_main_rec : +Odoc_text_lexer (ocaml.Odoc_text_lexer)

    Module Odoc_text_lexer

    val line_number : int ref
    val char_number : int ref
    val string_buffer : Stdlib.Buffer.t
    val reset_string_buffer : unit -> unit
    val add_char_string : char -> unit
    val add_string : string -> unit
    val read_string : unit -> string
    val description : string ref
    val blank : string
    val open_brackets : int ref
    val verb_mode : bool ref
    val target_mode : bool ref
    val shortcut_list_mode : bool ref
    val ele_ref_mode : bool ref
    val code_pre_mode : bool ref
    val init : unit -> unit
    val incr_cpts : Stdlib.Lexing.lexbuf -> unit
    val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
    val __ocaml_lex_main_rec : Stdlib.Lexing.lexbuf -> int -> - Odoc_text_parser.token
    \ No newline at end of file + Odoc_text_parser.token
    diff --git a/dev/ocaml/Odoc_text_parser/index.html b/dev/ocaml/Odoc_text_parser/index.html index 645c813c..5035fe1f 100644 --- a/dev/ocaml/Odoc_text_parser/index.html +++ b/dev/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/dev/ocaml/Odoc_to_text/class-info/index.html b/dev/ocaml/Odoc_to_text/class-info/index.html index a0d0b825..9fea4bd2 100644 --- a/dev/ocaml/Odoc_to_text/class-info/index.html +++ b/dev/ocaml/Odoc_to_text/class-info/index.html @@ -1,7 +1,7 @@ -info (ocaml.Odoc_to_text.info)

    Class Odoc_to_text.info

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) 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_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_info : ?block:bool -> +info (ocaml.Odoc_to_text.info)

    Class Odoc_to_text.info

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) 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_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text_element list
    method text_of_raised_exceptions : Odoc_info.raised_exception list -> Odoc_info.text_element list
    method text_of_return_opt : Odoc_info.text option -> - Odoc_info.text_element list
    method text_of_see : Odoc_info.see -> Odoc_info.text
    method text_of_sees : Odoc_info.see list -> Odoc_info.text_element list
    method text_of_since_opt : string option -> 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_see : Odoc_info.see -> Odoc_info.text
    method text_of_sees : Odoc_info.see list -> Odoc_info.text_element list
    method text_of_since_opt : string option -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    diff --git a/dev/ocaml/Odoc_to_text/class-to_text/index.html b/dev/ocaml/Odoc_to_text/class-to_text/index.html index 30759a53..7f767c2a 100644 --- a/dev/ocaml/Odoc_to_text/class-to_text/index.html +++ b/dev/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 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 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/dev/ocaml/Odoc_to_text/index.html b/dev/ocaml/Odoc_to_text/index.html index c1ebe564..59fc02ec 100644 --- a/dev/ocaml/Odoc_to_text/index.html +++ b/dev/ocaml/Odoc_to_text/index.html @@ -1,2 +1,2 @@ -Odoc_to_text (ocaml.Odoc_to_text)

    Module Odoc_to_text

    class virtual info : object ... end
    class virtual to_text : object ... end
    \ No newline at end of file +Odoc_to_text (ocaml.Odoc_to_text)

    Module Odoc_to_text

    class virtual info : object ... end
    class virtual to_text : object ... end
    diff --git a/dev/ocaml/Odoc_type/index.html b/dev/ocaml/Odoc_type/index.html index e92d0681..7b03da3a 100644 --- a/dev/ocaml/Odoc_type/index.html +++ b/dev/ocaml/Odoc_type/index.html @@ -1,2 +1,2 @@ -Odoc_type (ocaml.Odoc_type)

    Module Odoc_type

    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;
    }
    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;
    }
    type type_kind =
    1. | Type_abstract
    2. | Type_variant of variant_constructor list
    3. | Type_record of record_field list
    4. | Type_open
    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 * bool * bool) 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;
    }
    \ No newline at end of file +Odoc_type (ocaml.Odoc_type)

    Module Odoc_type

    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;
    }
    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;
    }
    type type_kind =
    1. | Type_abstract
    2. | Type_variant of variant_constructor list
    3. | Type_record of record_field list
    4. | Type_open
    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 * bool * bool) 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;
    }
    diff --git a/dev/ocaml/Odoc_types/index.html b/dev/ocaml/Odoc_types/index.html index 05298794..9b9992e5 100644 --- a/dev/ocaml/Odoc_types/index.html +++ b/dev/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 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;
    }
    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 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;
    }
    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/dev/ocaml/Odoc_value/index.html b/dev/ocaml/Odoc_value/index.html index 742fa6c9..98a7ea49 100644 --- a/dev/ocaml/Odoc_value/index.html +++ b/dev/ocaml/Odoc_value/index.html @@ -1,4 +1,4 @@ -Odoc_value (ocaml.Odoc_value)

    Module Odoc_value

    module Name = Odoc_name
    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;
    }
    type t_attribute = {
    1. att_value : t_value;
    2. att_mutable : bool;
    3. att_virtual : bool;
    }
    type t_method = {
    1. met_value : t_value;
    2. met_private : bool;
    3. met_virtual : bool;
    }
    val value_parameter_text_by_name : t_value -> string -> Odoc_types.text option
    val update_value_parameters_text : t_value -> unit
    val parameter_list_from_arrows : +Odoc_value (ocaml.Odoc_value)

    Module Odoc_value

    module Name = Odoc_name
    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;
    }
    type t_attribute = {
    1. att_value : t_value;
    2. att_mutable : bool;
    3. att_virtual : bool;
    }
    type t_method = {
    1. met_value : t_value;
    2. met_private : bool;
    3. met_virtual : bool;
    }
    val value_parameter_text_by_name : t_value -> string -> Odoc_types.text option
    val update_value_parameters_text : t_value -> unit
    val parameter_list_from_arrows : Types.type_expr -> - (Asttypes.arg_label * Types.type_expr) list
    val dummy_parameter_list : Types.type_expr -> Odoc_parameter.param_info list
    val is_function : t_value -> bool
    \ No newline at end of file + (Asttypes.arg_label * Types.type_expr) list
    val dummy_parameter_list : Types.type_expr -> Odoc_parameter.param_info list
    val is_function : t_value -> bool
    diff --git a/dev/ocaml/Opcodes/index.html b/dev/ocaml/Opcodes/index.html index 66cab873..4910bfbb 100644 --- a/dev/ocaml/Opcodes/index.html +++ b/dev/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
    \ 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
    diff --git a/dev/ocaml/Oprint/index.html b/dev/ocaml/Oprint/index.html index e08fc75f..a917f071 100644 --- a/dev/ocaml/Oprint/index.html +++ b/dev/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) @@ -14,4 +14,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/dev/ocaml/Optcompile/index.html b/dev/ocaml/Optcompile/index.html index 248474d0..1fe49473 100644 --- a/dev/ocaml/Optcompile/index.html +++ b/dev/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/dev/ocaml/Opterrors/index.html b/dev/ocaml/Opterrors/index.html index 65710faf..16b6784a 100644 --- a/dev/ocaml/Opterrors/index.html +++ b/dev/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/dev/ocaml/Optmain/index.html b/dev/ocaml/Optmain/index.html index 2672648d..7a207318 100644 --- a/dev/ocaml/Optmain/index.html +++ b/dev/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/dev/ocaml/Optmaindriver/index.html b/dev/ocaml/Optmaindriver/index.html index 23312099..23f7646e 100644 --- a/dev/ocaml/Optmaindriver/index.html +++ b/dev/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/dev/ocaml/Outcometree/index.html b/dev/ocaml/Outcometree/index.html index 6de57b49..1a4a31e4 100644 --- a/dev/ocaml/Outcometree/index.html +++ b/dev/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 out_type * string
    4. | Otyp_arrow of string * out_type * out_type
    5. | Otyp_class of bool * 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 (string * out_type) list * bool option
    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 bool * 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 out_type * string
      4. | Otyp_arrow of string * out_type * out_type
      5. | Otyp_class of bool * 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 (string * out_type) list * bool option
      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 bool * 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/dev/ocaml/Parameter/List/index.html b/dev/ocaml/Parameter/List/index.html index 4a0fa69c..4687c8bf 100644 --- a/dev/ocaml/Parameter/List/index.html +++ b/dev/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/dev/ocaml/Parameter/Map/index.html b/dev/ocaml/Parameter/Map/index.html index 4b084e7a..b65a2fd8 100644 --- a/dev/ocaml/Parameter/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Parameter/Set/index.html b/dev/ocaml/Parameter/Set/index.html index 44e3bd77..ac96cbb5 100644 --- a/dev/ocaml/Parameter/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Parameter/T/index.html b/dev/ocaml/Parameter/T/index.html index 78f59be9..fe47c484 100644 --- a/dev/ocaml/Parameter/T/index.html +++ b/dev/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/dev/ocaml/Parameter/Tbl/index.html b/dev/ocaml/Parameter/Tbl/index.html index 61428165..133d4a82 100644 --- a/dev/ocaml/Parameter/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Parameter/index.html b/dev/ocaml/Parameter/index.html index cf329f9b..702512e3 100644 --- a/dev/ocaml/Parameter/index.html +++ b/dev/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/dev/ocaml/Parmatch/Compat/argument-1-_/index.html b/dev/ocaml/Parmatch/Compat/argument-1-_/index.html index 41859a39..f9668118 100644 --- a/dev/ocaml/Parmatch/Compat/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Parmatch/Compat/index.html b/dev/ocaml/Parmatch/Compat/index.html index a736e506..70a590ee 100644 --- a/dev/ocaml/Parmatch/Compat/index.html +++ b/dev/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/dev/ocaml/Parmatch/index.html b/dev/ocaml/Parmatch/index.html index b2e53709..8f6f65f5 100644 --- a/dev/ocaml/Parmatch/index.html +++ b/dev/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 : @@ -34,4 +34,4 @@ Parsetree.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/dev/ocaml/Parse/index.html b/dev/ocaml/Parse/index.html index 9a3ac4d0..9a298b6c 100644 --- a/dev/ocaml/Parse/index.html +++ b/dev/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/dev/ocaml/Parser/Incremental/index.html b/dev/ocaml/Parser/Incremental/index.html index 1960baf6..f4841e87 100644 --- a/dev/ocaml/Parser/Incremental/index.html +++ b/dev/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/dev/ocaml/Parser/MenhirInterpreter/index.html b/dev/ocaml/Parser/MenhirInterpreter/index.html index cf4b7572..ff2e7432 100644 --- a/dev/ocaml/Parser/MenhirInterpreter/index.html +++ b/dev/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/dev/ocaml/Parser/index.html b/dev/ocaml/Parser/index.html index 008f0a7e..545c6adc 100644 --- a/dev/ocaml/Parser/index.html +++ b/dev/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/dev/ocaml/Parsetree/index.html b/dev/ocaml/Parsetree/index.html index a1d02940..c3800311 100644 --- a/dev/ocaml/Parsetree/index.html +++ b/dev/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_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/dev/ocaml/Pass_wrapper/index.html b/dev/ocaml/Pass_wrapper/index.html index 48726571..82a05785 100644 --- a/dev/ocaml/Pass_wrapper/index.html +++ b/dev/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/dev/ocaml/Path/Map/index.html b/dev/ocaml/Path/Map/index.html index 3c5e9399..25bcac58 100644 --- a/dev/ocaml/Path/Map/index.html +++ b/dev/ocaml/Path/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Path.Map)

    Module Path.Map

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Path/Set/index.html b/dev/ocaml/Path/Set/index.html index 54b34c9a..2cfb6a94 100644 --- a/dev/ocaml/Path/Set/index.html +++ b/dev/ocaml/Path/Set/index.html @@ -1,3 +1,3 @@ -Set (ocaml.Path.Set)

    Module Path.Set

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Path/index.html b/dev/ocaml/Path/index.html index 4e682d71..c309c710 100644 --- a/dev/ocaml/Path/index.html +++ b/dev/ocaml/Path/index.html @@ -1,2 +1,2 @@ -Path (ocaml.Path)

    Module Path

    type t =
    1. | Pident of Ident.t
    2. | Pdot of t * string
    3. | Papply of t * t
    val same : t -> t -> bool
    val compare : t -> t -> 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_uident : string -> bool
    type typath =
    1. | Regular of t
    2. | Ext of t * string
    3. | LocalExt of Ident.t
    4. | Cstr of t * string
    val constructor_typath : t -> typath
    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
    2. | Pdot of t * string
    3. | Papply of t * t
    val same : t -> t -> bool
    val compare : t -> t -> 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_uident : string -> bool
    type typath =
    1. | Regular of t
    2. | Ext of t * string
    3. | LocalExt of Ident.t
    4. | Cstr of t * string
    val constructor_typath : t -> typath
    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/dev/ocaml/Patterns/General/index.html b/dev/ocaml/Patterns/General/index.html index 6fb9ebfc..70df3eac 100644 --- a/dev/ocaml/Patterns/General/index.html +++ b/dev/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/dev/ocaml/Patterns/Half_simple/index.html b/dev/ocaml/Patterns/Half_simple/index.html index dbc14753..2f60c86d 100644 --- a/dev/ocaml/Patterns/Half_simple/index.html +++ b/dev/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/dev/ocaml/Patterns/Head/index.html b/dev/ocaml/Patterns/Head/index.html index 87e54fe0..977eea49 100644 --- a/dev/ocaml/Patterns/Head/index.html +++ b/dev/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/dev/ocaml/Patterns/Non_empty_row/index.html b/dev/ocaml/Patterns/Non_empty_row/index.html index e74fed29..e6f71b7c 100644 --- a/dev/ocaml/Patterns/Non_empty_row/index.html +++ b/dev/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/dev/ocaml/Patterns/Simple/index.html b/dev/ocaml/Patterns/Simple/index.html index 16f534ab..1a79f0c4 100644 --- a/dev/ocaml/Patterns/Simple/index.html +++ b/dev/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/dev/ocaml/Patterns/index.html b/dev/ocaml/Patterns/index.html index cde224cf..fad55bc5 100644 --- a/dev/ocaml/Patterns/index.html +++ b/dev/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/dev/ocaml/Persistent_env/Consistbl/index.html b/dev/ocaml/Persistent_env/Consistbl/index.html index dc10c47a..2a6ccb74 100644 --- a/dev/ocaml/Persistent_env/Consistbl/index.html +++ b/dev/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/dev/ocaml/Persistent_env/Persistent_signature/index.html b/dev/ocaml/Persistent_env/Persistent_signature/index.html index 54c526cd..665a07e9 100644 --- a/dev/ocaml/Persistent_env/Persistent_signature/index.html +++ b/dev/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/dev/ocaml/Persistent_env/index.html b/dev/ocaml/Persistent_env/index.html index 66607a1a..449116b5 100644 --- a/dev/ocaml/Persistent_env/index.html +++ b/dev/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
    4. | Depend_on_unsafe_string_unit 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/dev/ocaml/Polling/index.html b/dev/ocaml/Polling/index.html index 7bf99ef5..ce4f1a97 100644 --- a/dev/ocaml/Polling/index.html +++ b/dev/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/dev/ocaml/Pparse/index.html b/dev/ocaml/Pparse/index.html index dd560aec..e1a3764a 100644 --- a/dev/ocaml/Pparse/index.html +++ b/dev/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/dev/ocaml/Pprintast/index.html b/dev/ocaml/Pprintast/index.html index 6d6b04da..28a0b30f 100644 --- a/dev/ocaml/Pprintast/index.html +++ b/dev/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/dev/ocaml/Predef/index.html b/dev/ocaml/Predef/index.html index b2f1bf3a..cbf6ea77 100644 --- a/dev/ocaml/Predef/index.html +++ b/dev/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 * '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 * '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/dev/ocaml/Primitive/index.html b/dev/ocaml/Primitive/index.html index 697ee5cb..97122be8 100644 --- a/dev/ocaml/Primitive/index.html +++ b/dev/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/dev/ocaml/Printast/index.html b/dev/ocaml/Printast/index.html index 01ffe8bc..b1d592aa 100644 --- a/dev/ocaml/Printast/index.html +++ b/dev/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/dev/ocaml/Printclambda/index.html b/dev/ocaml/Printclambda/index.html index d1d7902e..b1c1880b 100644 --- a/dev/ocaml/Printclambda/index.html +++ b/dev/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/dev/ocaml/Printclambda_primitives/index.html b/dev/ocaml/Printclambda_primitives/index.html index 0c049a0f..8c502ce1 100644 --- a/dev/ocaml/Printclambda_primitives/index.html +++ b/dev/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/dev/ocaml/Printcmm/index.html b/dev/ocaml/Printcmm/index.html index 9ab83431..24fb6195 100644 --- a/dev/ocaml/Printcmm/index.html +++ b/dev/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/dev/ocaml/Printinstr/index.html b/dev/ocaml/Printinstr/index.html index a6357167..d917db2a 100644 --- a/dev/ocaml/Printinstr/index.html +++ b/dev/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/dev/ocaml/Printlambda/index.html b/dev/ocaml/Printlambda/index.html index cd3d3d25..e3fb9edb 100644 --- a/dev/ocaml/Printlambda/index.html +++ b/dev/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/dev/ocaml/Printlinear/index.html b/dev/ocaml/Printlinear/index.html index 25f02556..e06607e1 100644 --- a/dev/ocaml/Printlinear/index.html +++ b/dev/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/dev/ocaml/Printmach/index.html b/dev/ocaml/Printmach/index.html index 480b8b65..77d4fb32 100644 --- a/dev/ocaml/Printmach/index.html +++ b/dev/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 -> unit -> 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 -> unit -> unit
    val preferences : Stdlib.Format.formatter -> unit -> unit
    diff --git a/dev/ocaml/Printpat/index.html b/dev/ocaml/Printpat/index.html index 7005a5ab..e3b732b2 100644 --- a/dev/ocaml/Printpat/index.html +++ b/dev/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/dev/ocaml/Printtyp/Conflicts/index.html b/dev/ocaml/Printtyp/Conflicts/index.html index f8e72280..5ddf0cd3 100644 --- a/dev/ocaml/Printtyp/Conflicts/index.html +++ b/dev/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 : namespace;
    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 : namespace;
    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/dev/ocaml/Printtyp/Naming_context/index.html b/dev/ocaml/Printtyp/Naming_context/index.html index bf13f813..88782aa2 100644 --- a/dev/ocaml/Printtyp/Naming_context/index.html +++ b/dev/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.

    val reset : unit -> unit

    Reset the naming context

    \ 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.

    val reset : unit -> unit

    Reset the naming context

    diff --git a/dev/ocaml/Printtyp/Out_name/index.html b/dev/ocaml/Printtyp/Out_name/index.html index a89b61eb..4f153458 100644 --- a/dev/ocaml/Printtyp/Out_name/index.html +++ b/dev/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/dev/ocaml/Printtyp/Subtype/index.html b/dev/ocaml/Printtyp/Subtype/index.html index 3ef946c6..1ac41889 100644 --- a/dev/ocaml/Printtyp/Subtype/index.html +++ b/dev/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/dev/ocaml/Printtyp/index.html b/dev/ocaml/Printtyp/index.html index a5f07297..7ffa2230 100644 --- a/dev/ocaml/Printtyp/index.html +++ b/dev/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 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 =
    1. | Type
    2. | Module
    3. | Module_type
    4. | Class
    5. | Class_type
    6. | Other
      (*

      Other bypasses the unique name for identifier mechanism

      *)
    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 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 =
    1. | Type
    2. | Module
    3. | Module_type
    4. | Class
    5. | Class_type
    6. | Other
      (*

      Other bypasses the unique name for identifier mechanism

      *)
    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 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 : @@ -34,14 +34,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 -> @@ -81,7 +81,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 : @@ -113,4 +113,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/dev/ocaml/Printtyped/index.html b/dev/ocaml/Printtyped/index.html index 558eae08..b7448282 100644 --- a/dev/ocaml/Printtyped/index.html +++ b/dev/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/dev/ocaml/Proc/index.html b/dev/ocaml/Proc/index.html index c6c756cf..6f773dda 100644 --- a/dev/ocaml/Proc/index.html +++ b/dev/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 regs_are_volatile : Reg.t array -> bool
    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 regs_are_volatile : Reg.t array -> bool
    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/dev/ocaml/Profile/index.html b/dev/ocaml/Profile/index.html index bdeab823..bda4c2e8 100644 --- a/dev/ocaml/Profile/index.html +++ b/dev/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/dev/ocaml/Profiling/index.html b/dev/ocaml/Profiling/index.html index 9859ea6f..1e368438 100644 --- a/dev/ocaml/Profiling/index.html +++ b/dev/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/dev/ocaml/Projection/Map/index.html b/dev/ocaml/Projection/Map/index.html index 54d15d8f..289c9b2a 100644 --- a/dev/ocaml/Projection/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Projection/Set/index.html b/dev/ocaml/Projection/Set/index.html index 2f5b11c7..4769c277 100644 --- a/dev/ocaml/Projection/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Projection/T/index.html b/dev/ocaml/Projection/T/index.html index cbe51b4c..e7f9fbef 100644 --- a/dev/ocaml/Projection/T/index.html +++ b/dev/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/dev/ocaml/Projection/Tbl/index.html b/dev/ocaml/Projection/Tbl/index.html index 7a44886c..19a64894 100644 --- a/dev/ocaml/Projection/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Projection/index.html b/dev/ocaml/Projection/index.html index 3e53d5a9..20e5ff0d 100644 --- a/dev/ocaml/Projection/index.html +++ b/dev/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/dev/ocaml/Rec_check/index.html b/dev/ocaml/Rec_check/index.html index 211f635f..3209de45 100644 --- a/dev/ocaml/Rec_check/index.html +++ b/dev/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/dev/ocaml/Ref_to_variables/index.html b/dev/ocaml/Ref_to_variables/index.html index c59e3a51..edabd586 100644 --- a/dev/ocaml/Ref_to_variables/index.html +++ b/dev/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/dev/ocaml/Reg/Map/index.html b/dev/ocaml/Reg/Map/index.html index 168fc8a7..b8d2ff03 100644 --- a/dev/ocaml/Reg/Map/index.html +++ b/dev/ocaml/Reg/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Reg.Map)

    Module Reg.Map

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Reg/Raw_name/index.html b/dev/ocaml/Reg/Raw_name/index.html index c2d1666b..d4d4f751 100644 --- a/dev/ocaml/Reg/Raw_name/index.html +++ b/dev/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/dev/ocaml/Reg/Set/index.html b/dev/ocaml/Reg/Set/index.html index 85dd5852..595b254b 100644 --- a/dev/ocaml/Reg/Set/index.html +++ b/dev/ocaml/Reg/Set/index.html @@ -1,3 +1,3 @@ -Set (ocaml.Reg.Set)

    Module Reg.Set

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Reg/index.html b/dev/ocaml/Reg/index.html index 21d9bc29..2d46de0b 100644 --- a/dev/ocaml/Reg/index.html +++ b/dev/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/dev/ocaml/Reload/index.html b/dev/ocaml/Reload/index.html index 23a4e1f2..8bcd3942 100644 --- a/dev/ocaml/Reload/index.html +++ b/dev/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/dev/ocaml/Reloadgen/class-reload_generic/index.html b/dev/ocaml/Reloadgen/class-reload_generic/index.html index 54421269..afac3834 100644 --- a/dev/ocaml/Reloadgen/class-reload_generic/index.html +++ b/dev/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/dev/ocaml/Reloadgen/index.html b/dev/ocaml/Reloadgen/index.html index 0345b5ca..464c9d92 100644 --- a/dev/ocaml/Reloadgen/index.html +++ b/dev/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/dev/ocaml/Remove_free_vars_equal_to_args/index.html b/dev/ocaml/Remove_free_vars_equal_to_args/index.html index d6e6cad7..05677c4b 100644 --- a/dev/ocaml/Remove_free_vars_equal_to_args/index.html +++ b/dev/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/dev/ocaml/Remove_unused_arguments/index.html b/dev/ocaml/Remove_unused_arguments/index.html index d98501a2..95c434f3 100644 --- a/dev/ocaml/Remove_unused_arguments/index.html +++ b/dev/ocaml/Remove_unused_arguments/index.html @@ -1,7 +1,7 @@ -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) -> + 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 = @@ -9,5 +9,5 @@ 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/dev/ocaml/Remove_unused_closure_vars/index.html b/dev/ocaml/Remove_unused_closure_vars/index.html index 07c64cb4..3c5d8a4f 100644 --- a/dev/ocaml/Remove_unused_closure_vars/index.html +++ b/dev/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/dev/ocaml/Remove_unused_program_constructs/index.html b/dev/ocaml/Remove_unused_program_constructs/index.html index deb1abab..c2632f52 100644 --- a/dev/ocaml/Remove_unused_program_constructs/index.html +++ b/dev/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/dev/ocaml/Runtimedef/index.html b/dev/ocaml/Runtimedef/index.html index 2b0f9246..21d2e781 100644 --- a/dev/ocaml/Runtimedef/index.html +++ b/dev/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/dev/ocaml/Schedgen/class-scheduler_generic/index.html b/dev/ocaml/Schedgen/class-scheduler_generic/index.html index 38beac67..7e493af8 100644 --- a/dev/ocaml/Schedgen/class-scheduler_generic/index.html +++ b/dev/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/dev/ocaml/Schedgen/index.html b/dev/ocaml/Schedgen/index.html index 94a472fc..f4f75541 100644 --- a/dev/ocaml/Schedgen/index.html +++ b/dev/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/dev/ocaml/Scheduling/index.html b/dev/ocaml/Scheduling/index.html index 457fe6e5..825e09b7 100644 --- a/dev/ocaml/Scheduling/index.html +++ b/dev/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/dev/ocaml/Selectgen/Coeffect/index.html b/dev/ocaml/Selectgen/Coeffect/index.html index 3e55d37a..5a538dc2 100644 --- a/dev/ocaml/Selectgen/Coeffect/index.html +++ b/dev/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/dev/ocaml/Selectgen/Effect/index.html b/dev/ocaml/Selectgen/Effect/index.html index dd728b83..38011144 100644 --- a/dev/ocaml/Selectgen/Effect/index.html +++ b/dev/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/dev/ocaml/Selectgen/Effect_and_coeffect/index.html b/dev/ocaml/Selectgen/Effect_and_coeffect/index.html index 04dd310e..8ee571e0 100644 --- a/dev/ocaml/Selectgen/Effect_and_coeffect/index.html +++ b/dev/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/dev/ocaml/Selectgen/class-selector_generic/index.html b/dev/ocaml/Selectgen/class-selector_generic/index.html index 12a1ee00..71498ebb 100644 --- a/dev/ocaml/Selectgen/class-selector_generic/index.html +++ b/dev/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/dev/ocaml/Selectgen/index.html b/dev/ocaml/Selectgen/index.html index b1a89898..315cfff0 100644 --- a/dev/ocaml/Selectgen/index.html +++ b/dev/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/dev/ocaml/Selection/index.html b/dev/ocaml/Selection/index.html index 26a5f155..1f275e9b 100644 --- a/dev/ocaml/Selection/index.html +++ b/dev/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/dev/ocaml/Semantics_of_primitives/index.html b/dev/ocaml/Semantics_of_primitives/index.html index 5fe75400..802a7c8c 100644 --- a/dev/ocaml/Semantics_of_primitives/index.html +++ b/dev/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/dev/ocaml/Semaphore/Binary/index.html b/dev/ocaml/Semaphore/Binary/index.html index be8e486e..f985536e 100644 --- a/dev/ocaml/Semaphore/Binary/index.html +++ b/dev/ocaml/Semaphore/Binary/index.html @@ -1,2 +1,2 @@ -Binary (ocaml.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.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/dev/ocaml/Semaphore/Counting/index.html b/dev/ocaml/Semaphore/Counting/index.html index 937d8dd0..3ccc26a7 100644 --- a/dev/ocaml/Semaphore/Counting/index.html +++ b/dev/ocaml/Semaphore/Counting/index.html @@ -1,2 +1,2 @@ -Counting (ocaml.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.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.

    diff --git a/dev/ocaml/Semaphore/index.html b/dev/ocaml/Semaphore/index.html index 734f0958..7f8848e0 100644 --- a/dev/ocaml/Semaphore/index.html +++ b/dev/ocaml/Semaphore/index.html @@ -1,2 +1,2 @@ -Semaphore (ocaml.Semaphore)

    Module 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.Semaphore)

    Module 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/dev/ocaml/Set_of_closures_id/Map/index.html b/dev/ocaml/Set_of_closures_id/Map/index.html index cc9040de..16a85cf5 100644 --- a/dev/ocaml/Set_of_closures_id/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Set_of_closures_id/Set/index.html b/dev/ocaml/Set_of_closures_id/Set/index.html index 90a6112b..87143cc1 100644 --- a/dev/ocaml/Set_of_closures_id/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Set_of_closures_id/T/index.html b/dev/ocaml/Set_of_closures_id/T/index.html index 4f8c46d7..53a95246 100644 --- a/dev/ocaml/Set_of_closures_id/T/index.html +++ b/dev/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/dev/ocaml/Set_of_closures_id/Tbl/index.html b/dev/ocaml/Set_of_closures_id/Tbl/index.html index 50cbe839..e85733b5 100644 --- a/dev/ocaml/Set_of_closures_id/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Set_of_closures_id/index.html b/dev/ocaml/Set_of_closures_id/index.html index b59aaa0d..4f5dff76 100644 --- a/dev/ocaml/Set_of_closures_id/index.html +++ b/dev/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/dev/ocaml/Set_of_closures_origin/Map/index.html b/dev/ocaml/Set_of_closures_origin/Map/index.html index 64ac57b0..55510076 100644 --- a/dev/ocaml/Set_of_closures_origin/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Set_of_closures_origin/Set/index.html b/dev/ocaml/Set_of_closures_origin/Set/index.html index a97ca1a0..0601d8ad 100644 --- a/dev/ocaml/Set_of_closures_origin/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Set_of_closures_origin/T/index.html b/dev/ocaml/Set_of_closures_origin/T/index.html index 4733c480..10ebd557 100644 --- a/dev/ocaml/Set_of_closures_origin/T/index.html +++ b/dev/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/dev/ocaml/Set_of_closures_origin/Tbl/index.html b/dev/ocaml/Set_of_closures_origin/Tbl/index.html index 5f780394..968ca833 100644 --- a/dev/ocaml/Set_of_closures_origin/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Set_of_closures_origin/index.html b/dev/ocaml/Set_of_closures_origin/index.html index 0a16dbec..084ab8ea 100644 --- a/dev/ocaml/Set_of_closures_origin/index.html +++ b/dev/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/dev/ocaml/Shape/Item/Map/index.html b/dev/ocaml/Shape/Item/Map/index.html index 44f3047f..9526c853 100644 --- a/dev/ocaml/Shape/Item/Map/index.html +++ b/dev/ocaml/Shape/Item/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Shape.Item.Map)

    Module Item.Map

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Shape/Item/index.html b/dev/ocaml/Shape/Item/index.html index 65219bb4..7472e36a 100644 --- a/dev/ocaml/Shape/Item/index.html +++ b/dev/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/dev/ocaml/Shape/Make_reduce/argument-1-Context/index.html b/dev/ocaml/Shape/Make_reduce/argument-1-Context/index.html index bd9786c0..e2a84e3c 100644 --- a/dev/ocaml/Shape/Make_reduce/argument-1-Context/index.html +++ b/dev/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/dev/ocaml/Shape/Make_reduce/index.html b/dev/ocaml/Shape/Make_reduce/index.html index 5242942b..e83d4e76 100644 --- a/dev/ocaml/Shape/Make_reduce/index.html +++ b/dev/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/dev/ocaml/Shape/Map/index.html b/dev/ocaml/Shape/Map/index.html index bc44cc4a..e9cbe29c 100644 --- a/dev/ocaml/Shape/Map/index.html +++ b/dev/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/dev/ocaml/Shape/Sig_component_kind/index.html b/dev/ocaml/Shape/Sig_component_kind/index.html index 5605da2b..e20e9bb6 100644 --- a/dev/ocaml/Shape/Sig_component_kind/index.html +++ b/dev/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/dev/ocaml/Shape/Uid/Map/index.html b/dev/ocaml/Shape/Uid/Map/index.html index 63d64f05..78ee9534 100644 --- a/dev/ocaml/Shape/Uid/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Shape/Uid/Set/index.html b/dev/ocaml/Shape/Uid/Set/index.html index 91e519da..7bf90a89 100644 --- a/dev/ocaml/Shape/Uid/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Shape/Uid/T/index.html b/dev/ocaml/Shape/Uid/T/index.html index 3dbd8c99..8ee4aa1e 100644 --- a/dev/ocaml/Shape/Uid/T/index.html +++ b/dev/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/dev/ocaml/Shape/Uid/Tbl/index.html b/dev/ocaml/Shape/Uid/Tbl/index.html index 80c1576a..85063507 100644 --- a/dev/ocaml/Shape/Uid/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Shape/Uid/index.html b/dev/ocaml/Shape/Uid/index.html index d2786242..6d9b10af 100644 --- a/dev/ocaml/Shape/Uid/index.html +++ b/dev/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/dev/ocaml/Shape/index.html b/dev/ocaml/Shape/index.html index d8f705b9..624a07a7 100644 --- a/dev/ocaml/Shape/index.html +++ b/dev/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/dev/ocaml/Share_constants/index.html b/dev/ocaml/Share_constants/index.html index 867a6778..d35ae080 100644 --- a/dev/ocaml/Share_constants/index.html +++ b/dev/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/dev/ocaml/Signature_group/index.html b/dev/ocaml/Signature_group/index.html index 95abd88e..b1e40525 100644 --- a/dev/ocaml/Signature_group/index.html +++ b/dev/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/dev/ocaml/Simple_value_approx/index.html b/dev/ocaml/Simple_value_approx/index.html index 145e3191..16457972 100644 --- a/dev/ocaml/Simple_value_approx/index.html +++ b/dev/ocaml/Simple_value_approx/index.html @@ -1,5 +1,5 @@ -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 +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 } @@ -21,41 +21,41 @@ 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 +70,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 +80,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/dev/ocaml/Simplif/index.html b/dev/ocaml/Simplif/index.html index 4eab358e..827c1943 100644 --- a/dev/ocaml/Simplif/index.html +++ b/dev/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/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html b/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html index 0de727ab..5190637d 100644 --- a/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html +++ b/dev/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/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html b/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html index c5c774e6..fdacdd26 100644 --- a/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html +++ b/dev/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/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html b/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html index 48def8f9..bb860e0f 100644 --- a/dev/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html +++ b/dev/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/dev/ocaml/Simplify_boxed_integer_ops/index.html b/dev/ocaml/Simplify_boxed_integer_ops/index.html index 1ad2d37c..919ba729 100644 --- a/dev/ocaml/Simplify_boxed_integer_ops/index.html +++ b/dev/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/dev/ocaml/Simplify_boxed_integer_ops_intf/index.html b/dev/ocaml/Simplify_boxed_integer_ops_intf/index.html index 3ea58f8f..6896ee02 100644 --- a/dev/ocaml/Simplify_boxed_integer_ops_intf/index.html +++ b/dev/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/dev/ocaml/Simplify_boxed_integer_ops_intf/module-type-S/index.html b/dev/ocaml/Simplify_boxed_integer_ops_intf/module-type-S/index.html index ed36ae83..5eda59bc 100644 --- a/dev/ocaml/Simplify_boxed_integer_ops_intf/module-type-S/index.html +++ b/dev/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/dev/ocaml/Simplify_common/index.html b/dev/ocaml/Simplify_common/index.html index fd1d73ac..d255630b 100644 --- a/dev/ocaml/Simplify_common/index.html +++ b/dev/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/dev/ocaml/Simplify_primitives/index.html b/dev/ocaml/Simplify_primitives/index.html index c22a9269..beee8611 100644 --- a/dev/ocaml/Simplify_primitives/index.html +++ b/dev/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/dev/ocaml/Spill/index.html b/dev/ocaml/Spill/index.html index 9ac24e43..d7487405 100644 --- a/dev/ocaml/Spill/index.html +++ b/dev/ocaml/Spill/index.html @@ -1,2 +1,2 @@ -Spill (ocaml.Spill)

    Module Spill

    val fundecl : Mach.fundecl -> Mach.fundecl
    val reset : unit -> unit
    \ No newline at end of file +Spill (ocaml.Spill)

    Module Spill

    val fundecl : Mach.fundecl -> Mach.fundecl
    val reset : unit -> unit
    diff --git a/dev/ocaml/Split/index.html b/dev/ocaml/Split/index.html index c742acdf..c32ab515 100644 --- a/dev/ocaml/Split/index.html +++ b/dev/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/dev/ocaml/Static_exception/Map/index.html b/dev/ocaml/Static_exception/Map/index.html index ec0b5db0..de695e3b 100644 --- a/dev/ocaml/Static_exception/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Static_exception/Set/index.html b/dev/ocaml/Static_exception/Set/index.html index 6bb43aa4..a0b550c2 100644 --- a/dev/ocaml/Static_exception/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Static_exception/T/index.html b/dev/ocaml/Static_exception/T/index.html index 4f031374..944b3e11 100644 --- a/dev/ocaml/Static_exception/T/index.html +++ b/dev/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/dev/ocaml/Static_exception/Tbl/index.html b/dev/ocaml/Static_exception/Tbl/index.html index 2c79e900..6ac0bbcd 100644 --- a/dev/ocaml/Static_exception/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Static_exception/index.html b/dev/ocaml/Static_exception/index.html index b4e1d423..eff31cde 100644 --- a/dev/ocaml/Static_exception/index.html +++ b/dev/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/dev/ocaml/Std_exit/index.html b/dev/ocaml/Std_exit/index.html index c88b5b68..4df500ff 100644 --- a/dev/ocaml/Std_exit/index.html +++ b/dev/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/dev/ocaml/Stdlib/Arg/index.html b/dev/ocaml/Stdlib/Arg/index.html index fbeb9a23..e9a8985a 100644 --- a/dev/ocaml/Stdlib/Arg/index.html +++ b/dev/ocaml/Stdlib/Arg/index.html @@ -1,5 +1,5 @@ -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>"
    +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 ""
    @@ -18,13 +18,13 @@ let () =
       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.0
    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.0
    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.0
    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.0
    val read_arg0 : string -> string array

    Identical to Arg.read_arg but assumes null character terminated command line arguments.

    • since 4.05.0
    val write_arg : string -> string array -> unit

    Arg.write_arg file args writes the arguments args newline-terminated into the file file. If the any of the arguments in args contains a newline, use Arg.write_arg0 instead.

    • since 4.05.0
    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.0
    \ 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.0
    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.0
    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.0
    val read_arg0 : string -> string array

    Identical to Arg.read_arg but assumes null character terminated command line arguments.

    • since 4.05.0
    val write_arg : string -> string array -> unit

    Arg.write_arg file args writes the arguments args newline-terminated into the file file. If the any of the arguments in args contains a newline, use Arg.write_arg0 instead.

    • since 4.05.0
    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.0
    diff --git a/dev/ocaml/Stdlib/Array/index.html b/dev/ocaml/Stdlib/Array/index.html index e6f820fa..ac050e1b 100644 --- a/dev/ocaml/Stdlib/Array/index.html +++ b/dev/ocaml/Stdlib/Array/index.html @@ -1,2 +1,2 @@ -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 : int -> 'a -> 'a array
    • deprecated

      create is an alias for make.

    val create_float : int -> float array

    create_float n returns a fresh float array of length n, with uninitialized data.

    • since 4.03
    val make_float : int -> float array
    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 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 create_matrix : int -> int -> 'a -> 'a array array
    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 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 fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a

    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 : ('a -> 'b -> 'a * 'c) -> 'a -> 'b array -> 'a * 'c array

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.13.0
    val fold_right : ('b -> 'a -> 'a) -> 'b array -> 'a -> 'a

    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.0 (4.05.0 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.0 (4.05.0 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.0
    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.0
    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.0
    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.0
    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.0
    val memq : 'a -> 'a array -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    • since 4.03.0
    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.0
    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.0

    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.0
    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.0

    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
    \ No newline at end of file +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 : int -> 'a -> 'a array
    • deprecated

      create is an alias for make.

    val create_float : int -> float array

    create_float n returns a fresh float array of length n, with uninitialized data.

    • since 4.03
    val make_float : int -> float array
    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 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 create_matrix : int -> int -> 'a -> 'a array array
    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 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 fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a

    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 : ('a -> 'b -> 'a * 'c) -> 'a -> 'b array -> 'a * 'c array

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.13.0
    val fold_right : ('b -> 'a -> 'a) -> 'b array -> 'a -> 'a

    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.0 (4.05.0 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.0 (4.05.0 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.0
    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.0
    val for_all2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as for_all, but for a two-argument predicate.

    • since 4.11.0
    val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as exists, but for a two-argument predicate.

    • since 4.11.0
    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.0
    val memq : 'a -> 'a array -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    • since 4.03.0
    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.0
    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.0

    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.0
    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.0

    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
    diff --git a/dev/ocaml/Stdlib/ArrayLabels/index.html b/dev/ocaml/Stdlib/ArrayLabels/index.html index 27900715..3bc1e44c 100644 --- a/dev/ocaml/Stdlib/ArrayLabels/index.html +++ b/dev/ocaml/Stdlib/ArrayLabels/index.html @@ -1,12 +1,12 @@ -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 : int -> 'a -> 'a array
    • deprecated

      create is an alias for make.

    val create_float : int -> float array

    create_float n returns a fresh float array of length n, with uninitialized data.

    • since 4.03
    val make_float : int -> float array
    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 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 create_matrix : dimx:int -> dimy:int -> 'a -> 'a array array
    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 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 fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b array -> 'a

    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:('a -> 'b -> 'a * 'c) -> - init:'a -> +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 : int -> 'a -> 'a array
    • deprecated

      create is an alias for make.

    val create_float : int -> float array

    create_float n returns a fresh float array of length n, with uninitialized data.

    • since 4.03
    val make_float : int -> float array
    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 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 create_matrix : dimx:int -> dimy:int -> 'a -> 'a array array
    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 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 fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b array -> 'a

    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:('a -> 'b -> 'a * 'c) -> + init:'a -> 'b array -> - 'a * 'c array

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.13.0
    val fold_right : f:('b -> 'a -> 'a) -> 'b array -> init:'a -> 'a

    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.0
    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.0

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0

    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.0
    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.0

    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
    \ No newline at end of file + 'a * 'c array

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.13.0
    val fold_right : f:('b -> 'a -> 'a) -> 'b array -> init:'a -> 'a

    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.0
    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.0

    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.0
    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.0
    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.0
    val exists2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as exists, but for a two-argument predicate.

    • since 4.11.0
    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.0
    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.0
    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.0
    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.0

    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.0
    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.0

    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
    diff --git a/dev/ocaml/Stdlib/Atomic/index.html b/dev/ocaml/Stdlib/Atomic/index.html index 4c92d418..060e507f 100644 --- a/dev/ocaml/Stdlib/Atomic/index.html +++ b/dev/ocaml/Stdlib/Atomic/index.html @@ -1,2 +1,2 @@ -Atomic (ocaml.Stdlib.Atomic)

    Module Stdlib.Atomic

    This module provides a purely sequential implementation of the concurrent atomic references provided by the Multicore OCaml standard library:

    https://github.com/ocaml-multicore/ocaml-multicore/blob/parallel_minor_gc/stdlib/atomic.mli

    This sequential implementation is provided in the interest of compatibility: when people will start writing code to run on Multicore, it would be nice if their use of Atomic was backward-compatible with older versions of OCaml without having to import additional compatibility layers.

    • 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.

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

    Module Stdlib.Atomic

    This module provides a purely sequential implementation of the concurrent atomic references provided by the Multicore OCaml standard library:

    https://github.com/ocaml-multicore/ocaml-multicore/blob/parallel_minor_gc/stdlib/atomic.mli

    This sequential implementation is provided in the interest of compatibility: when people will start writing code to run on Multicore, it would be nice if their use of Atomic was backward-compatible with older versions of OCaml without having to import additional compatibility layers.

    • 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.

    diff --git a/dev/ocaml/Stdlib/Bigarray/Array0/index.html b/dev/ocaml/Stdlib/Bigarray/Array0/index.html index f49f7e2d..102d997c 100644 --- a/dev/ocaml/Stdlib/Bigarray/Array0/index.html +++ b/dev/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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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/dev/ocaml/Stdlib/Bigarray/Array1/index.html b/dev/ocaml/Stdlib/Bigarray/Array1/index.html index 7b20eae6..378d9849 100644 --- a/dev/ocaml/Stdlib/Bigarray/Array1/index.html +++ b/dev/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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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/dev/ocaml/Stdlib/Bigarray/Array2/index.html b/dev/ocaml/Stdlib/Bigarray/Array2/index.html index 704b0be2..30005986 100644 --- a/dev/ocaml/Stdlib/Bigarray/Array2/index.html +++ b/dev/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/dev/ocaml/Stdlib/Bigarray/Array3/index.html b/dev/ocaml/Stdlib/Bigarray/Array3/index.html index 0dbf6884..44be9a76 100644 --- a/dev/ocaml/Stdlib/Bigarray/Array3/index.html +++ b/dev/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/dev/ocaml/Stdlib/Bigarray/Genarray/index.html b/dev/ocaml/Stdlib/Bigarray/Genarray/index.html index 0697797a..6840a6ed 100644 --- a/dev/ocaml/Stdlib/Bigarray/Genarray/index.html +++ b/dev/ocaml/Stdlib/Bigarray/Genarray/index.html @@ -1,15 +1,15 @@ -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.0
    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.0
    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.0
    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 : + (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.0
    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.0
    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.0
    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/dev/ocaml/Stdlib/Bigarray/index.html b/dev/ocaml/Stdlib/Bigarray/index.html index a0de4851..5c31ecb7 100644 --- a/dev/ocaml/Stdlib/Bigarray/index.html +++ b/dev/ocaml/Stdlib/Bigarray/index.html @@ -1,14 +1,14 @@ -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.0 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
    +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.0 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.0

    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.0
    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.0
    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.0
    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 : + | 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.0

    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.0
    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.0
    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.0
    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 -> int -> - ('a, 'b, 'c) Array3.t

    Specialized version of Bigarray.reshape for reshaping to three-dimensional arrays.

    \ No newline at end of file + ('a, 'b, 'c) Array3.t

    Specialized version of Bigarray.reshape for reshaping to three-dimensional arrays.

    diff --git a/dev/ocaml/Stdlib/Bool/index.html b/dev/ocaml/Stdlib/Bool/index.html index 5ddc582f..f494ad72 100644 --- a/dev/ocaml/Stdlib/Bool/index.html +++ b/dev/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.

    \ 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.

    diff --git a/dev/ocaml/Stdlib/Buffer/index.html b/dev/ocaml/Stdlib/Buffer/index.html index 2eac55b4..1be5532f 100644 --- a/dev/ocaml/Stdlib/Buffer/index.html +++ b/dev/ocaml/Stdlib/Buffer/index.html @@ -1,5 +1,5 @@ -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 =
    +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
    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.0

    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.0
    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.0
    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.0
    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.contents b
    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.0

    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.0
    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.0
    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.0
    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/dev/ocaml/Stdlib/Bytes/index.html b/dev/ocaml/Stdlib/Bytes/index.html index e023c8dc..f77ed117 100644 --- a/dev/ocaml/Stdlib/Bytes/index.html +++ b/dev/ocaml/Stdlib/Bytes/index.html @@ -1,10 +1,10 @@ -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.0
    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.0 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 sequence src, starting at index src_pos, to 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 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.0 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.0 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 : ('a -> char -> 'a) -> 'a -> bytes -> 'a

    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.0
    val fold_right : (char -> 'a -> 'a) -> bytes -> 'a -> 'a

    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.0
    val for_all : (char -> bool) -> bytes -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13.0
    val exists : (char -> bool) -> bytes -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13.0
    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 : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with suffix s is true if and only if s ends with suffix.

    • since 4.13.0

    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.0
    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.0 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 sequence src, starting at index src_pos, to 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 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.0 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.0 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 : ('a -> char -> 'a) -> 'a -> bytes -> 'a

    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.0
    val fold_right : (char -> 'a -> 'a) -> bytes -> 'a -> 'a

    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.0
    val for_all : (char -> bool) -> bytes -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13.0
    val exists : (char -> bool) -> bytes -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13.0
    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 : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with suffix s is true if and only if s ends with suffix.

    • since 4.13.0

    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.0

    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
    \ No newline at end of file + (Bytes.split_on_char sep s) = s
    ).
  • No byte sequence in the result contains the sep character.
    • since 4.13.0

    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
    diff --git a/dev/ocaml/Stdlib/BytesLabels/index.html b/dev/ocaml/Stdlib/BytesLabels/index.html index 186cf364..b51a1bfc 100644 --- a/dev/ocaml/Stdlib/BytesLabels/index.html +++ b/dev/ocaml/Stdlib/BytesLabels/index.html @@ -1,22 +1,22 @@ -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.0
    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.0 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 sequence src, starting at index src_pos, to 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 ~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.0 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.0 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:('a -> char -> 'a) -> init:'a -> bytes -> 'a

    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.0
    val fold_right : f:(char -> 'a -> 'a) -> bytes -> init:'a -> 'a

    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.0
    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.0
    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.0
    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 : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0
    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.0
    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.0
    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.0
    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.0
    val starts_with : prefix:bytes -> bytes -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13.0
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with suffix s is true if and only if s ends with suffix.

    • since 4.13.0

    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.0
    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.0 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 sequence src, starting at index src_pos, to 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 ~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.0 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.0 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:('a -> char -> 'a) -> init:'a -> bytes -> 'a

    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.0
    val fold_right : f:(char -> 'a -> 'a) -> bytes -> init:'a -> 'a

    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.0
    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.0
    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.0
    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 : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0
    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.0
    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.0
    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.0
    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.0
    val starts_with : prefix:bytes -> bytes -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13.0
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with suffix s is true if and only if s ends with suffix.

    • since 4.13.0

    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.0

    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
    \ No newline at end of file +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.0

    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
    diff --git a/dev/ocaml/Stdlib/Callback/index.html b/dev/ocaml/Stdlib/Callback/index.html index 03644b46..f16ab273 100644 --- a/dev/ocaml/Stdlib/Callback/index.html +++ b/dev/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/dev/ocaml/Stdlib/Char/index.html b/dev/ocaml/Stdlib/Char/index.html index 67dd6884..a6f5649e 100644 --- a/dev/ocaml/Stdlib/Char/index.html +++ b/dev/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 : char -> char

    Convert the given character to its equivalent lowercase character, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uppercase : char -> char

    Convert the given character to its equivalent uppercase character, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase_ascii : char -> char

    Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

    • since 4.03.0
    val uppercase_ascii : char -> char

    Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

    • since 4.03.0
    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.0
    \ 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 : char -> char

    Convert the given character to its equivalent lowercase character, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uppercase : char -> char

    Convert the given character to its equivalent uppercase character, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase_ascii : char -> char

    Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

    • since 4.03.0
    val uppercase_ascii : char -> char

    Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

    • since 4.03.0
    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.0
    diff --git a/dev/ocaml/Stdlib/Complex/index.html b/dev/ocaml/Stdlib/Complex/index.html index f366fcd2..18aac417 100644 --- a/dev/ocaml/Stdlib/Complex/index.html +++ b/dev/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/dev/ocaml/Stdlib/Digest/index.html b/dev/ocaml/Stdlib/Digest/index.html index e9931d18..42f2da72 100644 --- a/dev/ocaml/Stdlib/Digest/index.html +++ b/dev/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.0
    val equal : t -> t -> bool

    The equal function for 16-character digest.

    • since 4.03.0
    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.0
    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.0
    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.0
    \ 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.0
    val equal : t -> t -> bool

    The equal function for 16-character digest.

    • since 4.03.0
    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.0
    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.0
    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.0
    diff --git a/dev/ocaml/Stdlib/Either/index.html b/dev/ocaml/Stdlib/Either/index.html index 052aa01a..691bd77b 100644 --- a/dev/ocaml/Stdlib/Either/index.html +++ b/dev/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:
    +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) -> + 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/dev/ocaml/Stdlib/Ephemeron/GenHashTable/MakeSeeded/argument-1-H/index.html b/dev/ocaml/Stdlib/Ephemeron/GenHashTable/MakeSeeded/argument-1-H/index.html index af652a69..bd647c8c 100644 --- a/dev/ocaml/Stdlib/Ephemeron/GenHashTable/MakeSeeded/argument-1-H/index.html +++ b/dev/ocaml/Stdlib/Ephemeron/GenHashTable/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.Ephemeron.GenHashTable.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    keys

    type 'a container

    contains keys and the associated data

    val hash : int -> t -> int
    val equal : 'a container -> t -> equal

    equality predicate used to compare a key with the one in a container. Can return EDead if the keys in the container are dead

    val create : t -> 'a -> 'a container

    create key data creates a container from some initials keys and one data

    val get_key : 'a container -> t option

    get_key cont returns the keys if they are all alive

    val get_data : 'a container -> 'a option

    get_data cont returns the data if it is alive

    val set_key_data : 'a container -> t -> 'a -> unit

    set_key_data cont modifies the key and data

    val check_key : 'a container -> bool

    check_key cont checks if all the keys contained in the data are alive

    \ No newline at end of file +H (ocaml.Stdlib.Ephemeron.GenHashTable.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    keys

    type 'a container

    contains keys and the associated data

    val hash : int -> t -> int
    val equal : 'a container -> t -> equal

    equality predicate used to compare a key with the one in a container. Can return EDead if the keys in the container are dead

    val create : t -> 'a -> 'a container

    create key data creates a container from some initials keys and one data

    val get_key : 'a container -> t option

    get_key cont returns the keys if they are all alive

    val get_data : 'a container -> 'a option

    get_data cont returns the data if it is alive

    val set_key_data : 'a container -> t -> 'a -> unit

    set_key_data cont modifies the key and data

    val check_key : 'a container -> bool

    check_key cont checks if all the keys contained in the data are alive

    diff --git a/dev/ocaml/Stdlib/Ephemeron/GenHashTable/MakeSeeded/index.html b/dev/ocaml/Stdlib/Ephemeron/GenHashTable/MakeSeeded/index.html index fa1f7f2d..fe4ece6b 100644 --- a/dev/ocaml/Stdlib/Ephemeron/GenHashTable/MakeSeeded/index.html +++ b/dev/ocaml/Stdlib/Ephemeron/GenHashTable/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (ocaml.Stdlib.Ephemeron.GenHashTable.MakeSeeded)

    Module GenHashTable.MakeSeeded

    Functor building an implementation of an hash table that use the container for keeping the information given

    Parameters

    module H : sig ... end

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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.GenHashTable.MakeSeeded)

    Module GenHashTable.MakeSeeded

    Functor building an implementation of an hash table that use the container for keeping the information given

    Parameters

    module H : sig ... end

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/GenHashTable/index.html b/dev/ocaml/Stdlib/Ephemeron/GenHashTable/index.html index 47dc148a..c598ba1a 100644 --- a/dev/ocaml/Stdlib/Ephemeron/GenHashTable/index.html +++ b/dev/ocaml/Stdlib/Ephemeron/GenHashTable/index.html @@ -1,2 +1,2 @@ -GenHashTable (ocaml.Stdlib.Ephemeron.GenHashTable)

    Module Ephemeron.GenHashTable

    Hash tables on generic containers with notion of death and aliveness.

    Define a hash table on generic containers which have a notion of "death" and aliveness. If a binding is dead the hash table can automatically remove it.

    • alert old_ephemeron_api This module won't be available in 5.0
    type equal =
    1. | ETrue
    2. | EFalse
    3. | EDead
      (*

      the container is dead

      *)
    module MakeSeeded (H : sig ... end) : SeededS with type key = H.t

    Functor building an implementation of an hash table that use the container for keeping the information given

    \ No newline at end of file +GenHashTable (ocaml.Stdlib.Ephemeron.GenHashTable)

    Module Ephemeron.GenHashTable

    Hash tables on generic containers with notion of death and aliveness.

    Define a hash table on generic containers which have a notion of "death" and aliveness. If a binding is dead the hash table can automatically remove it.

    • alert old_ephemeron_api This module won't be available in 5.0
    type equal =
    1. | ETrue
    2. | EFalse
    3. | EDead
      (*

      the container is dead

      *)
    module MakeSeeded (H : sig ... end) : SeededS with type key = H.t

    Functor building an implementation of an hash table that use the container for keeping the information given

    diff --git a/dev/ocaml/Stdlib/Ephemeron/K1/Bucket/index.html b/dev/ocaml/Stdlib/Ephemeron/K1/Bucket/index.html index 16d81478..564658ae 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K1/Bucket/index.html +++ b/dev/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/dev/ocaml/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html b/dev/ocaml/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html index e55750dc..f70090f4 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html +++ b/dev/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/dev/ocaml/Stdlib/Ephemeron/K1/Make/index.html b/dev/ocaml/Stdlib/Ephemeron/K1/Make/index.html index 756eb776..bd62d938 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K1/Make/index.html +++ b/dev/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.

    Moreover, the table shouldn't be modified during a call to iter. Use filter_map_inplace in this case.

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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.

    Moreover, the table shouldn't be modified during a call to iter. Use filter_map_inplace in this case.

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html b/dev/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html index f9e861f2..49cb247b 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html +++ b/dev/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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

    diff --git a/dev/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/index.html b/dev/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/index.html index 4f2fa564..05eb2747 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/index.html +++ b/dev/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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/K1/index.html b/dev/ocaml/Stdlib/Ephemeron/K1/index.html index 75ecc0f3..ef3e4e26 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K1/index.html +++ b/dev/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 create : unit -> ('k, 'd) t

    Ephemeron.K1.create () creates an ephemeron with one key. The data and the key are empty

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key : ('k, 'd) t -> 'k option

    Ephemeron.K1.get_key eph returns None if the key of eph is empty, Some x (where x is the key) if it is full.

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key_copy : ('k, 'd) t -> 'k option

    Ephemeron.K1.get_key_copy eph returns None if the key of eph is empty, Some x (where x is a (shallow) copy of the key) if it is full. This function has the same GC friendliness as Weak.get_copy

    If the element is a custom block it is not copied.

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_key : ('k, 'd) t -> 'k -> unit

    Ephemeron.K1.set_key eph el sets the key of eph to be a (full) key to el

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_key : ('k, 'd) t -> unit

    Ephemeron.K1.unset_key eph el sets the key of eph to be an empty key. Since there is only one key, the ephemeron starts behaving like a reference on the data.

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_key : ('k, 'd) t -> bool

    Ephemeron.K1.check_key eph returns true if the key of the eph is full, false if it is empty. Note that even if Ephemeron.K1.check_key eph returns true, a subsequent Ephemeron.K1.get_keyeph can return None.

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key : ('k, _) t -> ('k, _) t -> unit

    Ephemeron.K1.blit_key eph1 eph2 sets the key of eph2 with the key of eph1. Contrary to using Ephemeron.K1.get_key followed by Ephemeron.K1.set_key or Ephemeron.K1.unset_key this function does not prevent the incremental GC from erasing the value in its current cycle.

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data : ('k, 'd) t -> 'd option

    Ephemeron.K1.get_data eph returns None if the data of eph is empty, Some x (where x is the data) if it is full.

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data_copy : ('k, 'd) t -> 'd option

    Ephemeron.K1.get_data_copy eph returns None if the data of eph is empty, Some x (where x is a (shallow) copy of the data) if it is full. This function has the same GC friendliness as Weak.get_copy

    If the element is a custom block it is not copied.

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_data : ('k, 'd) t -> 'd -> unit

    Ephemeron.K1.set_data eph el sets the data of eph to be a (full) data to el

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_data : ('k, 'd) t -> unit

    Ephemeron.K1.unset_data eph el sets the key of eph to be an empty key. The ephemeron starts behaving like a weak pointer.

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_data : ('k, 'd) t -> bool

    Ephemeron.K1.check_data eph returns true if the data of the eph is full, false if it is empty. Note that even if Ephemeron.K1.check_data eph returns true, a subsequent Ephemeron.K1.get_dataeph can return None.

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_data : (_, 'd) t -> (_, 'd) t -> unit

    Ephemeron.K1.blit_data eph1 eph2 sets the data of eph2 with the data of eph1. Contrary to using Ephemeron.K1.get_data followed by Ephemeron.K1.set_data or Ephemeron.K1.unset_data this function does not prevent the incremental GC from erasing the value in its current cycle.

    • alert old_ephemeron_api This function won't be available in 5.0
    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 create : unit -> ('k, 'd) t

    Ephemeron.K1.create () creates an ephemeron with one key. The data and the key are empty

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key : ('k, 'd) t -> 'k option

    Ephemeron.K1.get_key eph returns None if the key of eph is empty, Some x (where x is the key) if it is full.

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key_copy : ('k, 'd) t -> 'k option

    Ephemeron.K1.get_key_copy eph returns None if the key of eph is empty, Some x (where x is a (shallow) copy of the key) if it is full. This function has the same GC friendliness as Weak.get_copy

    If the element is a custom block it is not copied.

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_key : ('k, 'd) t -> 'k -> unit

    Ephemeron.K1.set_key eph el sets the key of eph to be a (full) key to el

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_key : ('k, 'd) t -> unit

    Ephemeron.K1.unset_key eph el sets the key of eph to be an empty key. Since there is only one key, the ephemeron starts behaving like a reference on the data.

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_key : ('k, 'd) t -> bool

    Ephemeron.K1.check_key eph returns true if the key of the eph is full, false if it is empty. Note that even if Ephemeron.K1.check_key eph returns true, a subsequent Ephemeron.K1.get_keyeph can return None.

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key : ('k, _) t -> ('k, _) t -> unit

    Ephemeron.K1.blit_key eph1 eph2 sets the key of eph2 with the key of eph1. Contrary to using Ephemeron.K1.get_key followed by Ephemeron.K1.set_key or Ephemeron.K1.unset_key this function does not prevent the incremental GC from erasing the value in its current cycle.

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data : ('k, 'd) t -> 'd option

    Ephemeron.K1.get_data eph returns None if the data of eph is empty, Some x (where x is the data) if it is full.

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data_copy : ('k, 'd) t -> 'd option

    Ephemeron.K1.get_data_copy eph returns None if the data of eph is empty, Some x (where x is a (shallow) copy of the data) if it is full. This function has the same GC friendliness as Weak.get_copy

    If the element is a custom block it is not copied.

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_data : ('k, 'd) t -> 'd -> unit

    Ephemeron.K1.set_data eph el sets the data of eph to be a (full) data to el

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_data : ('k, 'd) t -> unit

    Ephemeron.K1.unset_data eph el sets the key of eph to be an empty key. The ephemeron starts behaving like a weak pointer.

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_data : ('k, 'd) t -> bool

    Ephemeron.K1.check_data eph returns true if the data of the eph is full, false if it is empty. Note that even if Ephemeron.K1.check_data eph returns true, a subsequent Ephemeron.K1.get_dataeph can return None.

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_data : (_, 'd) t -> (_, 'd) t -> unit

    Ephemeron.K1.blit_data eph1 eph2 sets the data of eph2 with the data of eph1. Contrary to using Ephemeron.K1.get_data followed by Ephemeron.K1.set_data or Ephemeron.K1.unset_data this function does not prevent the incremental GC from erasing the value in its current cycle.

    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/K2/Bucket/index.html b/dev/ocaml/Stdlib/Ephemeron/K2/Bucket/index.html index 7b180e19..a56b2c61 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K2/Bucket/index.html +++ b/dev/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/dev/ocaml/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html b/dev/ocaml/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html index 5f4babe0..09f9ebc8 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html +++ b/dev/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/dev/ocaml/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html b/dev/ocaml/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html index a8a90f20..af407dc1 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html +++ b/dev/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/dev/ocaml/Stdlib/Ephemeron/K2/Make/index.html b/dev/ocaml/Stdlib/Ephemeron/K2/Make/index.html index 09d88c05..ca6df428 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K2/Make/index.html +++ b/dev/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.

    Moreover, the table shouldn't be modified during a call to iter. Use filter_map_inplace in this case.

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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.

    Moreover, the table shouldn't be modified during a call to iter. Use filter_map_inplace in this case.

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html b/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html index 3f4d6b62..4c780bec 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html +++ b/dev/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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

    diff --git a/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html b/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html index 60e77ad6..ff0d3753 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html +++ b/dev/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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

    diff --git a/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/index.html b/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/index.html index 2aca5b21..37e92969 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/index.html +++ b/dev/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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/K2/index.html b/dev/ocaml/Stdlib/Ephemeron/K2/index.html index 48aa0d95..9fdeaecb 100644 --- a/dev/ocaml/Stdlib/Ephemeron/K2/index.html +++ b/dev/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 create : unit -> ('k1, 'k2, 'd) t

    Same as Ephemeron.K1.create

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key1 : ('k1, 'k2, 'd) t -> 'k1 option

    Same as Ephemeron.K1.get_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key1_copy : ('k1, 'k2, 'd) t -> 'k1 option

    Same as Ephemeron.K1.get_key_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_key1 : ('k1, 'k2, 'd) t -> 'k1 -> unit

    Same as Ephemeron.K1.set_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_key1 : ('k1, 'k2, 'd) t -> unit

    Same as Ephemeron.K1.unset_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_key1 : ('k1, 'k2, 'd) t -> bool

    Same as Ephemeron.K1.check_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key2 : ('k1, 'k2, 'd) t -> 'k2 option

    Same as Ephemeron.K1.get_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key2_copy : ('k1, 'k2, 'd) t -> 'k2 option

    Same as Ephemeron.K1.get_key_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_key2 : ('k1, 'k2, 'd) t -> 'k2 -> unit

    Same as Ephemeron.K1.set_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_key2 : ('k1, 'k2, 'd) t -> unit

    Same as Ephemeron.K1.unset_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_key2 : ('k1, 'k2, 'd) t -> bool

    Same as Ephemeron.K1.check_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key1 : ('k1, _, _) t -> ('k1, _, _) t -> unit

    Same as Ephemeron.K1.blit_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key2 : (_, 'k2, _) t -> (_, 'k2, _) t -> unit

    Same as Ephemeron.K1.blit_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key12 : ('k1, 'k2, _) t -> ('k1, 'k2, _) t -> unit

    Same as Ephemeron.K1.blit_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data : ('k1, 'k2, 'd) t -> 'd option

    Same as Ephemeron.K1.get_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data_copy : ('k1, 'k2, 'd) t -> 'd option

    Same as Ephemeron.K1.get_data_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_data : ('k1, 'k2, 'd) t -> 'd -> unit

    Same as Ephemeron.K1.set_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_data : ('k1, 'k2, 'd) t -> unit

    Same as Ephemeron.K1.unset_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_data : ('k1, 'k2, 'd) t -> bool

    Same as Ephemeron.K1.check_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_data : ('k1, 'k2, 'd) t -> ('k1, 'k2, 'd) t -> unit

    Same as Ephemeron.K1.blit_data

    • alert old_ephemeron_api This function won't be available in 5.0
    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 create : unit -> ('k1, 'k2, 'd) t

    Same as Ephemeron.K1.create

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key1 : ('k1, 'k2, 'd) t -> 'k1 option

    Same as Ephemeron.K1.get_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key1_copy : ('k1, 'k2, 'd) t -> 'k1 option

    Same as Ephemeron.K1.get_key_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_key1 : ('k1, 'k2, 'd) t -> 'k1 -> unit

    Same as Ephemeron.K1.set_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_key1 : ('k1, 'k2, 'd) t -> unit

    Same as Ephemeron.K1.unset_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_key1 : ('k1, 'k2, 'd) t -> bool

    Same as Ephemeron.K1.check_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key2 : ('k1, 'k2, 'd) t -> 'k2 option

    Same as Ephemeron.K1.get_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key2_copy : ('k1, 'k2, 'd) t -> 'k2 option

    Same as Ephemeron.K1.get_key_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_key2 : ('k1, 'k2, 'd) t -> 'k2 -> unit

    Same as Ephemeron.K1.set_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_key2 : ('k1, 'k2, 'd) t -> unit

    Same as Ephemeron.K1.unset_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_key2 : ('k1, 'k2, 'd) t -> bool

    Same as Ephemeron.K1.check_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key1 : ('k1, _, _) t -> ('k1, _, _) t -> unit

    Same as Ephemeron.K1.blit_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key2 : (_, 'k2, _) t -> (_, 'k2, _) t -> unit

    Same as Ephemeron.K1.blit_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key12 : ('k1, 'k2, _) t -> ('k1, 'k2, _) t -> unit

    Same as Ephemeron.K1.blit_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data : ('k1, 'k2, 'd) t -> 'd option

    Same as Ephemeron.K1.get_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data_copy : ('k1, 'k2, 'd) t -> 'd option

    Same as Ephemeron.K1.get_data_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_data : ('k1, 'k2, 'd) t -> 'd -> unit

    Same as Ephemeron.K1.set_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_data : ('k1, 'k2, 'd) t -> unit

    Same as Ephemeron.K1.unset_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_data : ('k1, 'k2, 'd) t -> bool

    Same as Ephemeron.K1.check_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_data : ('k1, 'k2, 'd) t -> ('k1, 'k2, 'd) t -> unit

    Same as Ephemeron.K1.blit_data

    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/Kn/Bucket/index.html b/dev/ocaml/Stdlib/Ephemeron/Kn/Bucket/index.html index faa16c21..0072a419 100644 --- a/dev/ocaml/Stdlib/Ephemeron/Kn/Bucket/index.html +++ b/dev/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/dev/ocaml/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html b/dev/ocaml/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html index 59e5a4f5..035dc03f 100644 --- a/dev/ocaml/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html +++ b/dev/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/dev/ocaml/Stdlib/Ephemeron/Kn/Make/index.html b/dev/ocaml/Stdlib/Ephemeron/Kn/Make/index.html index 40bcfdea..9dbaff4a 100644 --- a/dev/ocaml/Stdlib/Ephemeron/Kn/Make/index.html +++ b/dev/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.

    Moreover, the table shouldn't be modified during a call to iter. Use filter_map_inplace in this case.

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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.

    Moreover, the table shouldn't be modified during a call to iter. Use filter_map_inplace in this case.

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html b/dev/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html index 784a0eac..9da10ba2 100644 --- a/dev/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html +++ b/dev/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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

    diff --git a/dev/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/index.html b/dev/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/index.html index 98088356..c5ae6b6f 100644 --- a/dev/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/index.html +++ b/dev/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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/Kn/index.html b/dev/ocaml/Stdlib/Ephemeron/Kn/index.html index 926d5fd2..ac74bafc 100644 --- a/dev/ocaml/Stdlib/Ephemeron/Kn/index.html +++ b/dev/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 create : int -> ('k, 'd) t

    Same as Ephemeron.K1.create

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key : ('k, 'd) t -> int -> 'k option

    Same as Ephemeron.K1.get_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key_copy : ('k, 'd) t -> int -> 'k option

    Same as Ephemeron.K1.get_key_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_key : ('k, 'd) t -> int -> 'k -> unit

    Same as Ephemeron.K1.set_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_key : ('k, 'd) t -> int -> unit

    Same as Ephemeron.K1.unset_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_key : ('k, 'd) t -> int -> bool

    Same as Ephemeron.K1.check_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key : ('k, _) t -> int -> ('k, _) t -> int -> int -> unit

    Same as Ephemeron.K1.blit_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data : ('k, 'd) t -> 'd option

    Same as Ephemeron.K1.get_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data_copy : ('k, 'd) t -> 'd option

    Same as Ephemeron.K1.get_data_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_data : ('k, 'd) t -> 'd -> unit

    Same as Ephemeron.K1.set_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_data : ('k, 'd) t -> unit

    Same as Ephemeron.K1.unset_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_data : ('k, 'd) t -> bool

    Same as Ephemeron.K1.check_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_data : ('k, 'd) t -> ('k, 'd) t -> unit

    Same as Ephemeron.K1.blit_data

    • alert old_ephemeron_api This function won't be available in 5.0
    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 create : int -> ('k, 'd) t

    Same as Ephemeron.K1.create

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key : ('k, 'd) t -> int -> 'k option

    Same as Ephemeron.K1.get_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_key_copy : ('k, 'd) t -> int -> 'k option

    Same as Ephemeron.K1.get_key_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_key : ('k, 'd) t -> int -> 'k -> unit

    Same as Ephemeron.K1.set_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_key : ('k, 'd) t -> int -> unit

    Same as Ephemeron.K1.unset_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_key : ('k, 'd) t -> int -> bool

    Same as Ephemeron.K1.check_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_key : ('k, _) t -> int -> ('k, _) t -> int -> int -> unit

    Same as Ephemeron.K1.blit_key

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data : ('k, 'd) t -> 'd option

    Same as Ephemeron.K1.get_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val get_data_copy : ('k, 'd) t -> 'd option

    Same as Ephemeron.K1.get_data_copy

    • alert old_ephemeron_api This function won't be available in 5.0
    val set_data : ('k, 'd) t -> 'd -> unit

    Same as Ephemeron.K1.set_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val unset_data : ('k, 'd) t -> unit

    Same as Ephemeron.K1.unset_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val check_data : ('k, 'd) t -> bool

    Same as Ephemeron.K1.check_data

    • alert old_ephemeron_api This function won't be available in 5.0
    val blit_data : ('k, 'd) t -> ('k, 'd) t -> unit

    Same as Ephemeron.K1.blit_data

    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/index.html b/dev/ocaml/Stdlib/Ephemeron/index.html index 3662d303..5de4e1f9 100644 --- a/dev/ocaml/Stdlib/Ephemeron/index.html +++ b/dev/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.0
    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.

    module GenHashTable : sig ... end

    Hash tables on generic containers with notion of death and aliveness.

    \ 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.0
    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.

    module GenHashTable : sig ... end

    Hash tables on generic containers with notion of death and aliveness.

    diff --git a/dev/ocaml/Stdlib/Ephemeron/module-type-S/index.html b/dev/ocaml/Stdlib/Ephemeron/module-type-S/index.html index 0f3e9ff3..4b795f91 100644 --- a/dev/ocaml/Stdlib/Ephemeron/module-type-S/index.html +++ b/dev/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.

    Moreover, the table shouldn't be modified during a call to iter. Use filter_map_inplace in this case.

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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.

    Moreover, the table shouldn't be modified during a call to iter. Use filter_map_inplace in this case.

    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Ephemeron/module-type-SeededS/index.html b/dev/ocaml/Stdlib/Ephemeron/module-type-SeededS/index.html index 872bd356..cd78bb90 100644 --- a/dev/ocaml/Stdlib/Ephemeron/module-type-SeededS/index.html +++ b/dev/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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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 iter : (key -> 'a -> unit) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • alert old_ephemeron_api This function won't be available in 5.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    • alert old_ephemeron_api This function won't be available in 5.0
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_keys : _ t -> key Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    val to_seq_values : 'a t -> 'a Seq.t
    • alert old_ephemeron_api This function won't be available in 5.0
    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/dev/ocaml/Stdlib/Filename/index.html b/dev/ocaml/Stdlib/Filename/index.html index c5f16b0b..e2177ae7 100644 --- a/dev/ocaml/Stdlib/Filename/index.html +++ b/dev/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.0
    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.0
    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.0

      no ?perms optional argument

    • before 3.11.2

      no ?temp_dir optional argument

    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.0
    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.

    • since 4.00.0
    val temp_dir_name : string

    The name of the initial 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.

    • since 3.09.1
    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.0

      no ?perms optional argument

    • before 3.11.2

      no ?temp_dir optional argument

    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.0
    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.

    • since 4.00.0
    val temp_dir_name : string

    The name of the initial 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.

    • since 3.09.1
    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.0
    \ 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.0
    diff --git a/dev/ocaml/Stdlib/Float/Array/index.html b/dev/ocaml/Stdlib/Float/Array/index.html index cbe75d17..da3d3b3b 100644 --- a/dev/ocaml/Stdlib/Float/Array/index.html +++ b/dev/ocaml/Stdlib/Float/Array/index.html @@ -1,2 +1,2 @@ -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.0
    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 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 fold_left : ('a -> float -> 'a) -> 'a -> t -> 'a

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    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.

    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.

    \ No newline at end of file +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.0
    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 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 fold_left : ('a -> float -> 'a) -> 'a -> t -> 'a

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    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.

    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.

    diff --git a/dev/ocaml/Stdlib/Float/ArrayLabels/index.html b/dev/ocaml/Stdlib/Float/ArrayLabels/index.html index ec69f190..595d32a1 100644 --- a/dev/ocaml/Stdlib/Float/ArrayLabels/index.html +++ b/dev/ocaml/Stdlib/Float/ArrayLabels/index.html @@ -1,2 +1,2 @@ -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.0
    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 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 fold_left : f:('a -> float -> 'a) -> init:'a -> t -> 'a

    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 -> 'a -> 'a) -> t -> init:'a -> 'a

    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.

    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.

    \ No newline at end of file +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.0
    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 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 fold_left : f:('a -> float -> 'a) -> init:'a -> t -> 'a

    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 -> 'a -> 'a) -> t -> init:'a -> 'a

    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.

    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.

    diff --git a/dev/ocaml/Stdlib/Float/index.html b/dev/ocaml/Stdlib/Float/index.html index eb0cee26..2c569b79 100644 --- a/dev/ocaml/Stdlib/Float/index.html +++ b/dev/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.0
    val zero : float

    The floating point 0.

    • since 4.08.0
    val one : float

    The floating-point 1.

    • since 4.08.0
    val minus_one : float

    The floating-point -1.

    • since 4.08.0
    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.0
    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.0
    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.0
    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. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

    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.0
    val is_infinite : float -> bool

    is_infinite x is true if and only if x is infinity or neg_infinity.

    • since 4.08.0
    val is_nan : float -> bool

    is_nan x is true if and only if x is not a number (see nan).

    • since 4.08.0
    val is_integer : float -> bool

    is_integer x is true if and only if x is an integer.

    • since 4.08.0
    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.0
    val exp : float -> float

    Exponential.

    val exp2 : float -> float

    Base 2 exponential function.

    • since 4.13.0
    val log : float -> float

    Natural logarithm.

    val log10 : float -> float

    Base 10 logarithm.

    val log2 : float -> float

    Base 2 logarithm.

    • since 4.13.0
    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.0
    val asinh : float -> float

    Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

    • since 4.13.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    val min_max : float -> float -> float * float

    min_max x y is (min x y, max x y), just more efficient.

    • since 4.08.0
    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.0
    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.0
    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.0
    val hash : t -> int

    The hash function for floating-point numbers.

    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.0
    val zero : float

    The floating point 0.

    • since 4.08.0
    val one : float

    The floating-point 1.

    • since 4.08.0
    val minus_one : float

    The floating-point -1.

    • since 4.08.0
    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.0
    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.0
    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.0
    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. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

    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.0
    val is_infinite : float -> bool

    is_infinite x is true if and only if x is infinity or neg_infinity.

    • since 4.08.0
    val is_nan : float -> bool

    is_nan x is true if and only if x is not a number (see nan).

    • since 4.08.0
    val is_integer : float -> bool

    is_integer x is true if and only if x is an integer.

    • since 4.08.0
    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.0
    val exp : float -> float

    Exponential.

    val exp2 : float -> float

    Base 2 exponential function.

    • since 4.13.0
    val log : float -> float

    Natural logarithm.

    val log10 : float -> float

    Base 10 logarithm.

    val log2 : float -> float

    Base 2 logarithm.

    • since 4.13.0
    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.0
    val asinh : float -> float

    Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

    • since 4.13.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    val min_max : float -> float -> float * float

    min_max x y is (min x y, max x y), just more efficient.

    • since 4.08.0
    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.0
    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.0
    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.0
    val hash : t -> int

    The hash function for floating-point numbers.

    module Array : sig ... end

    Float arrays with packed representation.

    module ArrayLabels : sig ... end

    Float arrays with packed representation (labeled functions).

    diff --git a/dev/ocaml/Stdlib/Format/index.html b/dev/ocaml/Stdlib/Format/index.html index 8612aa84..0522242c 100644 --- a/dev/ocaml/Stdlib/Format/index.html +++ b/dev/ocaml/Stdlib/Format/index.html @@ -1,21 +1,21 @@ -Format (ocaml.Stdlib.Format)

    Module Stdlib.Format

    Pretty-printing.

    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 std_formatter and the generic version prefixed by pp_ that takes a formatter as its first argument.

    More formatters can be created with formatter_of_out_channel, formatter_of_buffer, formatter_of_symbolic_output_buffer or using custom formatters.

    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 (); +Format (ocaml.Stdlib.Format)

    Module Stdlib.Format

    Pretty-printing.

    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 std_formatter and the generic version prefixed by pp_ that takes a formatter as its first argument.

    More formatters can be created with formatter_of_out_channel, formatter_of_buffer, formatter_of_symbolic_output_buffer or using custom formatters.

    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.0
    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 : + 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.0
    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.0
    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 followed by a new line. 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 maxixum indentation limit.

    type geometry = {
    1. max_indent : int;
    2. margin : int;
    }
    val check_geometry : geometry -> bool

    Check if the formatter geometry is valid: 1 < max_indent < margin

    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.0
    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.0
    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.0

    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.0
    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.0
      *)
    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.0
    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.0
    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 : +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 maxixum indentation limit.

    type geometry = {
    1. max_indent : int;
    2. margin : int;
    }
    val check_geometry : geometry -> bool

    Check if the formatter geometry is valid: 1 < max_indent < margin

    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.0
    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.0
    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.0

    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.0
    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.0
      *)
    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.0
    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.0
    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) -> @@ -53,28 +53,28 @@ symbolic_output_buffer -> symbolic_output_item -> unit

    add_symbolic_output_item sob itm adds item itm to buffer sob.

    • since 4.06.0
    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.0

    Convenience formatting functions.

    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.0
    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.0
    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 good 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 (); @@ -92,10 +92,10 @@ Format.printf "@[<v>%t@]" t

    Same as kfprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 3.12.0
    val ksprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b

    Same as sprintf above, but instead of returning the string, passes it to the first argument.

    val kasprintf : (string -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b

    Same as asprintf above, but instead of returning the string, passes it to the first argument.

    • since 4.03

    Deprecated

    val bprintf : Buffer.t -> ('a, formatter, unit) format -> 'a
    • deprecated

      This function is error prone. Do not use it. This function is neither compositional nor incremental, since it flushes the pretty-printer queue at each call.

      If you need to print to some buffer b, you must first define a formatter writing to b, using let to_b = formatter_of_buffer b; then use regular calls to Format.fprintf with formatter to_b.

    val kprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b
    • deprecated

      An alias for ksprintf.

    val set_all_formatter_output_functions : - out:(string -> int -> int -> unit) -> - flush:(unit -> unit) -> - newline:(unit -> unit) -> - spaces:(int -> unit) -> + out:(string -> int -> int -> unit) -> + flush:(unit -> unit) -> + newline:(unit -> unit) -> + spaces:(int -> unit) -> unit
    • deprecated

      Subsumed by set_formatter_out_functions.

    val get_all_formatter_output_functions : unit -> (string -> @@ -109,10 +109,10 @@ Format.printf "@[<v>%t@]" t
    • (int -> unit)
    • deprecated

      Subsumed by get_formatter_out_functions.

    val pp_set_all_formatter_output_functions : formatter -> - out:(string -> int -> int -> unit) -> - flush:(unit -> unit) -> - newline:(unit -> unit) -> - spaces:(int -> unit) -> + out:(string -> int -> int -> unit) -> + flush:(unit -> unit) -> + newline:(unit -> unit) -> + spaces:(int -> unit) -> unit
    • deprecated

      Subsumed by pp_set_formatter_out_functions.

    val pp_get_all_formatter_output_functions : formatter -> unit -> @@ -131,4 +131,4 @@ Format.printf "@[<v>%t@]" t

    This function will erase non-string tag formatting functions.

    val set_formatter_tag_functions : formatter_tag_functions -> unit
    val pp_get_formatter_tag_functions : formatter -> unit -> - formatter_tag_functions
    val get_formatter_tag_functions : unit -> formatter_tag_functions
    \ No newline at end of file + formatter_tag_functions
    val get_formatter_tag_functions : unit -> formatter_tag_functions
    diff --git a/dev/ocaml/Stdlib/Fun/index.html b/dev/ocaml/Stdlib/Fun/index.html index 92711880..4552892e 100644 --- a/dev/ocaml/Stdlib/Fun/index.html +++ b/dev/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/dev/ocaml/Stdlib/Gc/Memprof/index.html b/dev/ocaml/Stdlib/Gc/Memprof/index.html index e767a547..23280813 100644 --- a/dev/ocaml/Stdlib/Gc/Memprof/index.html +++ b/dev/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/dev/ocaml/Stdlib/Gc/index.html b/dev/ocaml/Stdlib/Gc/index.html index 0978e85f..dfa8752c 100644 --- a/dev/ocaml/Stdlib/Gc/index.html +++ b/dev/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.

      *)
    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.

      *)
    12. largest_free : int;
      (*

      Size (in words) of the largest block in the free list.

      *)
    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.

      • since 3.12.0
      *)
    17. forced_major_collections : int;
      (*

      Number of forced full major collections completed since the program was started.

      • since 4.12.0
      *)
    }

    The memory management counters are returned in a stat record.

    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. mutable minor_heap_size : int;
      (*

      The size (in words) of the minor heap. Changing this parameter will trigger a minor collection. Default: 256k.

      *)
    2. mutable 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. mutable 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. mutable 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. mutable 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. mutable stack_limit : int;
      (*

      The maximum size of the stack (in words). This is only relevant to the byte-code runtime, as the native code runtime uses the operating system's stack. Default: 1024k.

      *)
    7. mutable 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.0
      *)
    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.0
      *)
    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.0
      *)
    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.0
      *)
    11. custom_minor_max_size : int;
      (*

      Maximum amount of out-of-heap memory for each custom value allocated in the minor heap. When a custom value is allocated on the minor heap and holds more than this many bytes, only this value is counted against custom_minor_ratio and the rest is directly counted against custom_major_ratio. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 8192 bytes.

      • since 4.08.0
      *)
    }

    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. This function examines every heap block to get the statistics.

    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. This function is much faster than stat because it does not need to go through the heap.

    val counters : unit -> float * float * float

    Return (minor_words, promoted_words, major_words). This function is as fast as quick_stat.

    val minor_words : unit -> float

    Number of words allocated in the minor heap since the program was started. 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.

    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 }

    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) into the channel argument.

    val allocated_bytes : unit -> float

    Return the total number of bytes allocated since the program was started. 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.

    • since 4.03.0
    val get_bucket : int -> int

    get_bucket n returns the current size of the n-th future bucket of the GC smoothing system. The unit is one millionth of a full GC.

    • raises Invalid_argument

      if n is negative, return 0 if n is larger than the smoothing window.

    • since 4.03.0
    val get_credit : unit -> int

    get_credit () returns the current size of the "work done in advance" counter of the GC smoothing system. The unit is one millionth of a full GC.

    • since 4.03.0
    val huge_fallback_count : unit -> int

    Return the number of times we tried to map huge pages and had to fall back to small pages. This is always 0 if OCAMLRUNPARAM contains H=1.

    • since 4.03.0
    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, 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

    eventlog_pause () will pause the collection of traces in the runtime. Traces are collected if the program is linked to the instrumented runtime and started with the environment variable OCAML_EVENTLOG_ENABLED. Events are flushed to disk after pausing, and no new events will be recorded until eventlog_resume is called.

    • since 4.11
    val eventlog_resume : unit -> unit

    eventlog_resume () will resume the collection of traces in the runtime. Traces are collected if the program is linked to the instrumented runtime and started with the environment variable OCAML_EVENTLOG_ENABLED. This call can be used after calling eventlog_pause, or if the program was started with OCAML_EVENTLOG_ENABLED=p. (which pauses the collection of traces before the first event.)

    • since 4.11
    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.

      *)
    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.

      *)
    12. largest_free : int;
      (*

      Size (in words) of the largest block in the free list.

      *)
    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.

      • since 3.12.0
      *)
    17. forced_major_collections : int;
      (*

      Number of forced full major collections completed since the program was started.

      • since 4.12.0
      *)
    }

    The memory management counters are returned in a stat record.

    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. mutable minor_heap_size : int;
      (*

      The size (in words) of the minor heap. Changing this parameter will trigger a minor collection. Default: 256k.

      *)
    2. mutable 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. mutable 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. mutable 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. mutable 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. mutable stack_limit : int;
      (*

      The maximum size of the stack (in words). This is only relevant to the byte-code runtime, as the native code runtime uses the operating system's stack. Default: 1024k.

      *)
    7. mutable 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.0
      *)
    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.0
      *)
    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.0
      *)
    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.0
      *)
    11. custom_minor_max_size : int;
      (*

      Maximum amount of out-of-heap memory for each custom value allocated in the minor heap. When a custom value is allocated on the minor heap and holds more than this many bytes, only this value is counted against custom_minor_ratio and the rest is directly counted against custom_major_ratio. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 8192 bytes.

      • since 4.08.0
      *)
    }

    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. This function examines every heap block to get the statistics.

    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. This function is much faster than stat because it does not need to go through the heap.

    val counters : unit -> float * float * float

    Return (minor_words, promoted_words, major_words). This function is as fast as quick_stat.

    val minor_words : unit -> float

    Number of words allocated in the minor heap since the program was started. 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.

    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 }

    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) into the channel argument.

    val allocated_bytes : unit -> float

    Return the total number of bytes allocated since the program was started. 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.

    • since 4.03.0
    val get_bucket : int -> int

    get_bucket n returns the current size of the n-th future bucket of the GC smoothing system. The unit is one millionth of a full GC.

    • raises Invalid_argument

      if n is negative, return 0 if n is larger than the smoothing window.

    • since 4.03.0
    val get_credit : unit -> int

    get_credit () returns the current size of the "work done in advance" counter of the GC smoothing system. The unit is one millionth of a full GC.

    • since 4.03.0
    val huge_fallback_count : unit -> int

    Return the number of times we tried to map huge pages and had to fall back to small pages. This is always 0 if OCAMLRUNPARAM contains H=1.

    • since 4.03.0
    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, 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

    eventlog_pause () will pause the collection of traces in the runtime. Traces are collected if the program is linked to the instrumented runtime and started with the environment variable OCAML_EVENTLOG_ENABLED. Events are flushed to disk after pausing, and no new events will be recorded until eventlog_resume is called.

    • since 4.11
    val eventlog_resume : unit -> unit

    eventlog_resume () will resume the collection of traces in the runtime. Traces are collected if the program is linked to the instrumented runtime and started with the environment variable OCAML_EVENTLOG_ENABLED. This call can be used after calling eventlog_pause, or if the program was started with OCAML_EVENTLOG_ENABLED=p. (which pauses the collection of traces before the first event.)

    • since 4.11
    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/dev/ocaml/Stdlib/Genlex/index.html b/dev/ocaml/Stdlib/Genlex/index.html index 5c94d5dc..22fd076e 100644 --- a/dev/ocaml/Stdlib/Genlex/index.html +++ b/dev/ocaml/Stdlib/Genlex/index.html @@ -1,9 +1,9 @@ -Genlex (ocaml.Stdlib.Genlex)

    Module Stdlib.Genlex

    • deprecated Use the camlp-streams library instead.

    A generic lexical analyzer.

    This module implements a simple 'standard' lexical analyzer, presented as a function from character streams to token streams. It implements roughly the lexical conventions of OCaml, but is parameterized by the set of keywords of your language.

    Example: a lexer suitable for a desk calculator is obtained by

    let lexer = make_lexer ["+"; "-"; "*"; "/"; "let"; "="; "("; ")"]

    The associated parser would be a function from token stream to, for instance, int, and would have rules such as:

    let rec parse_expr = parser
    +Genlex (ocaml.Stdlib.Genlex)

    Module Stdlib.Genlex

    • deprecated Use the camlp-streams library instead.

    A generic lexical analyzer.

    This module implements a simple 'standard' lexical analyzer, presented as a function from character streams to token streams. It implements roughly the lexical conventions of OCaml, but is parameterized by the set of keywords of your language.

    Example: a lexer suitable for a desk calculator is obtained by

    let lexer = make_lexer ["+"; "-"; "*"; "/"; "let"; "="; "("; ")"]

    The associated parser would be a function from token stream to, for instance, int, and would have rules such as:

    let rec parse_expr = parser
       | [< n1 = parse_atom; n2 = parse_remainder n1 >] -> n2
     and parse_atom = parser
       | [< 'Int n >] -> n
       | [< 'Kwd "("; n = parse_expr; 'Kwd ")" >] -> n
     and parse_remainder n1 = parser
       | [< 'Kwd "+"; n2 = parse_expr >] -> n1 + n2
    -  | [< >] -> n1

    One should notice that the use of the parser keyword and associated notation for streams are only available through camlp4 extensions. This means that one has to preprocess its sources e. g. by using the "-pp" command-line switch of the compilers.

    type token =
    1. | Kwd of string
    2. | Ident of string
    3. | Int of int
    4. | Float of float
    5. | String of string
    6. | Char of char

    The type of tokens. The lexical classes are: Int and Float for integer and floating-point numbers; String for string literals, enclosed in double quotes; Char for character literals, enclosed in single quotes; Ident for identifiers (either sequences of letters, digits, underscores and quotes, or sequences of 'operator characters' such as +, *, etc); and Kwd for keywords (either identifiers or single 'special characters' such as (, }, etc).

    val make_lexer : string list -> char Stream.t -> token Stream.t

    Construct the lexer function. The first argument is the list of keywords. An identifier s is returned as Kwd s if s belongs to this list, and as Ident s otherwise. A special character s is returned as Kwd s if s belongs to this list, and cause a lexical error (exception Stream.Error with the offending lexeme as its parameter) otherwise. Blanks and newlines are skipped. Comments delimited by (* and *) are skipped as well, and can be nested. A Stream.Failure exception is raised if end of stream is unexpectedly reached.

    \ No newline at end of file + | [< >] -> n1

    One should notice that the use of the parser keyword and associated notation for streams are only available through camlp4 extensions. This means that one has to preprocess its sources e. g. by using the "-pp" command-line switch of the compilers.

    type token =
    1. | Kwd of string
    2. | Ident of string
    3. | Int of int
    4. | Float of float
    5. | String of string
    6. | Char of char

    The type of tokens. The lexical classes are: Int and Float for integer and floating-point numbers; String for string literals, enclosed in double quotes; Char for character literals, enclosed in single quotes; Ident for identifiers (either sequences of letters, digits, underscores and quotes, or sequences of 'operator characters' such as +, *, etc); and Kwd for keywords (either identifiers or single 'special characters' such as (, }, etc).

    val make_lexer : string list -> char Stream.t -> token Stream.t

    Construct the lexer function. The first argument is the list of keywords. An identifier s is returned as Kwd s if s belongs to this list, and as Ident s otherwise. A special character s is returned as Kwd s if s belongs to this list, and cause a lexical error (exception Stream.Error with the offending lexeme as its parameter) otherwise. Blanks and newlines are skipped. Comments delimited by (* and *) are skipped as well, and can be nested. A Stream.Failure exception is raised if end of stream is unexpectedly reached.

    diff --git a/dev/ocaml/Stdlib/Hashtbl/Make/argument-1-H/index.html b/dev/ocaml/Stdlib/Hashtbl/Make/argument-1-H/index.html index 82c4ac8b..a43ea2bc 100644 --- a/dev/ocaml/Stdlib/Hashtbl/Make/argument-1-H/index.html +++ b/dev/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/dev/ocaml/Stdlib/Hashtbl/Make/index.html b/dev/ocaml/Stdlib/Hashtbl/Make/index.html index 2b29ce8f..26910f89 100644 --- a/dev/ocaml/Stdlib/Hashtbl/Make/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00.0
    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/dev/ocaml/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html b/dev/ocaml/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html index 6989c345..31b9e4ba 100644 --- a/dev/ocaml/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/dev/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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

    diff --git a/dev/ocaml/Stdlib/Hashtbl/MakeSeeded/index.html b/dev/ocaml/Stdlib/Hashtbl/MakeSeeded/index.html index 8b382484..1ef3c5f6 100644 --- a/dev/ocaml/Stdlib/Hashtbl/MakeSeeded/index.html +++ b/dev/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.0

    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    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.0

    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    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/dev/ocaml/Stdlib/Hashtbl/index.html b/dev/ocaml/Stdlib/Hashtbl/index.html index 6998ade7..8d887571 100644 --- a/dev/ocaml/Stdlib/Hashtbl/index.html +++ b/dev/ocaml/Stdlib/Hashtbl/index.html @@ -1,5 +1,5 @@ -Hashtbl (ocaml.Stdlib.Hashtbl)

    Module Stdlib.Hashtbl

    Hash tables and hash functions.

    Hash tables are hashed association tables, with in-place modification.

    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.0

      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.0
    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. 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.)

    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.0
    val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c

    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.

    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.0
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03.0
    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.0
    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.0
    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.0

    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 =
    +Hashtbl (ocaml.Stdlib.Hashtbl)

    Module Stdlib.Hashtbl

    Hash tables and hash functions.

    Hash tables are hashed association tables, with in-place modification.

    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.0

      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.0
    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. 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.)

    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.0
    val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c

    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.

    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.0
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03.0
    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.0
    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.0
    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.0

    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
    @@ -10,4 +10,4 @@ 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.0
    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.0
    \ No newline at end of file + 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.0
    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.0
    diff --git a/dev/ocaml/Stdlib/Hashtbl/module-type-HashedType/index.html b/dev/ocaml/Stdlib/Hashtbl/module-type-HashedType/index.html index 9e44a6db..77bc1cc5 100644 --- a/dev/ocaml/Stdlib/Hashtbl/module-type-HashedType/index.html +++ b/dev/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/dev/ocaml/Stdlib/Hashtbl/module-type-S/index.html b/dev/ocaml/Stdlib/Hashtbl/module-type-S/index.html index 5471194a..18007d75 100644 --- a/dev/ocaml/Stdlib/Hashtbl/module-type-S/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00.0
    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/dev/ocaml/Stdlib/Hashtbl/module-type-SeededHashedType/index.html b/dev/ocaml/Stdlib/Hashtbl/module-type-SeededHashedType/index.html index d6d0c144..096d87a2 100644 --- a/dev/ocaml/Stdlib/Hashtbl/module-type-SeededHashedType/index.html +++ b/dev/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.0
    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.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.0
    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

    diff --git a/dev/ocaml/Stdlib/Hashtbl/module-type-SeededS/index.html b/dev/ocaml/Stdlib/Hashtbl/module-type-SeededS/index.html index 131ff60d..dd3e36f1 100644 --- a/dev/ocaml/Stdlib/Hashtbl/module-type-SeededS/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    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/dev/ocaml/Stdlib/In_channel/index.html b/dev/ocaml/Stdlib/In_channel/index.html index a27d2695..9c6473b6 100644 --- a/dev/ocaml/Stdlib/In_channel/index.html +++ b/dev/ocaml/Stdlib/In_channel/index.html @@ -1,3 +1,3 @@ -In_channel (ocaml.Stdlib.In_channel)

    Module Stdlib.In_channel

    Input channels.

    • since 4.14.0
    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 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.

    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 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.

    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 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.

    • raises Invalid_argument

      if pos and len do not designate a valid range of buf.

    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.

    val input_all : t -> string

    input_all ic reads all remaining data from ic.

    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.

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

    Module Stdlib.In_channel

    Input channels.

    • since 4.14.0
    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 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.

    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 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.

    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 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.

    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.

    val input_all : t -> string

    input_all ic reads all remaining data from ic.

    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.

    diff --git a/dev/ocaml/Stdlib/Int/index.html b/dev/ocaml/Stdlib/Int/index.html index c652e3c5..4ed0f69b 100644 --- a/dev/ocaml/Stdlib/Int/index.html +++ b/dev/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.0
    val max : int -> int -> int

    Return the greater of the two arguments.

    • since 4.13.0

    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.

    \ 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.0
    val max : int -> int -> int

    Return the greater of the two arguments.

    • since 4.13.0

    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.

    diff --git a/dev/ocaml/Stdlib/Int32/index.html b/dev/ocaml/Stdlib/Int32/index.html index b2f211e7..a9d05868 100644 --- a/dev/ocaml/Stdlib/Int32/index.html +++ b/dev/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
    +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.0
    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.0
    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

    Return the absolute value of its argument.

    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.0
    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.0
    val equal : t -> t -> bool

    The equal function for int32s.

    • since 4.03.0
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13.0
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13.0
    \ No newline at end of file +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.0
    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.0
    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

    Return the absolute value of its argument.

    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.0
    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.0
    val equal : t -> t -> bool

    The equal function for int32s.

    • since 4.03.0
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13.0
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13.0
    diff --git a/dev/ocaml/Stdlib/Int64/index.html b/dev/ocaml/Stdlib/Int64/index.html index cf49d1b3..a025f5ff 100644 --- a/dev/ocaml/Stdlib/Int64/index.html +++ b/dev/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
    +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.0
    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.0
    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

    Return the absolute value of its argument.

    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.0
    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.0
    val equal : t -> t -> bool

    The equal function for int64s.

    • since 4.03.0
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13.0
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13.0
    \ No newline at end of file +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.0
    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.0
    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

    Return the absolute value of its argument.

    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.0
    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.0
    val equal : t -> t -> bool

    The equal function for int64s.

    • since 4.03.0
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13.0
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13.0
    diff --git a/dev/ocaml/Stdlib/LargeFile/index.html b/dev/ocaml/Stdlib/LargeFile/index.html index b22c9b99..78af1e86 100644 --- a/dev/ocaml/Stdlib/LargeFile/index.html +++ b/dev/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/dev/ocaml/Stdlib/Lazy/index.html b/dev/ocaml/Stdlib/Lazy/index.html index 4223522f..264fef29 100644 --- a/dev/ocaml/Stdlib/Lazy/index.html +++ b/dev/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 =
    +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 thread-safe. If you use this module in a multi-threaded program, you will need to add some locks.

    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
    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.

    • raises Undefined

      if the forcing of x tries to force x itself recursively.

    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.0

    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.0
    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.0
    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.0

    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.0
    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.

    Deprecated

    val lazy_from_fun : (unit -> 'a) -> 'a t
    • deprecated

      synonym for from_fun.

    val lazy_from_val : 'a -> 'a t
    • deprecated

      synonym for from_val.

    val lazy_is_val : 'a t -> bool
    • deprecated

      synonym for is_val.

    \ No newline at end of file +| _ -> 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 thread-safe. If you use this module in a multi-threaded program, you will need to add some locks.

    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
    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.

    • raises Undefined

      if the forcing of x tries to force x itself recursively.

    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.0

    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.0
    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.0
    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.0

    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.0
    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.

    Deprecated

    val lazy_from_fun : (unit -> 'a) -> 'a t
    • deprecated

      synonym for from_fun.

    val lazy_from_val : 'a -> 'a t
    • deprecated

      synonym for from_val.

    val lazy_is_val : 'a t -> bool
    • deprecated

      synonym for is_val.

    diff --git a/dev/ocaml/Stdlib/Lexing/index.html b/dev/ocaml/Stdlib/Lexing/index.html index f80920f4..1440f705 100644 --- a/dev/ocaml/Stdlib/Lexing/index.html +++ b/dev/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.0

    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.0

    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/dev/ocaml/Stdlib/List/index.html b/dev/ocaml/Stdlib/List/index.html index 43e990c8..42a85ac0 100644 --- a/dev/ocaml/Stdlib/List/index.html +++ b/dev/ocaml/Stdlib/List/index.html @@ -1,2 +1,2 @@ -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.0
    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.0
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.03.0 (4.05.0 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.0
    val append : 'a list -> 'a list -> 'a list

    Concatenate two lists. Same function as the infix operator @. Not tail-recursive (length of the first argument). The @ operator is not tail-recursive either.

    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, but rev_append is tail-recursive and more efficient.

    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.0
    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.0

    Iterators

    val iter : ('a -> unit) -> 'a list -> unit

    iter f [a1; ...; an] applies function f in turn to a1; ...; an. It is equivalent to begin f a1; f a2; ...; f an; () end.

    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.0
    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. Not tail-recursive.

    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. Not tail-recursive.

    • since 4.00.0
    val rev_map : ('a -> 'b) -> 'a list -> 'b list

    rev_map f l gives the same result as rev (map f l), but is tail-recursive and 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.0
    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.0
    val fold_left_map : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11.0
    val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a

    fold_left f init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b

    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. Not tail-recursive.

    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 tail-recursive and more efficient.

    val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a

    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 -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c

    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_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.0
    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.0
    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.0

    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.0
    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.0 (4.03.0 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 +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.0
    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.0
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.03.0 (4.05.0 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.0
    val append : 'a list -> 'a list -> 'a list

    Concatenate two lists. Same function as the infix operator @. Not tail-recursive (length of the first argument). The @ operator is not tail-recursive either.

    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, but rev_append is tail-recursive and more efficient.

    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.0
    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.0

    Iterators

    val iter : ('a -> unit) -> 'a list -> unit

    iter f [a1; ...; an] applies function f in turn to a1; ...; an. It is equivalent to begin f a1; f a2; ...; f an; () end.

    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.0
    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. Not tail-recursive.

    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. Not tail-recursive.

    • since 4.00.0
    val rev_map : ('a -> 'b) -> 'a list -> 'b list

    rev_map f l gives the same result as rev (map f l), but is tail-recursive and 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.0
    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.0
    val fold_left_map : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11.0
    val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a

    fold_left f init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b

    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. Not tail-recursive.

    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 tail-recursive and more efficient.

    val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a

    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 -> 'c -> 'c) -> 'a list -> 'b list -> 'c -> 'c

    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_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.0
    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.0
    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.0

    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.0
    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.0 (4.03.0 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/dev/ocaml/Stdlib/ListLabels/index.html b/dev/ocaml/Stdlib/ListLabels/index.html index 4ed2377d..682a141e 100644 --- a/dev/ocaml/Stdlib/ListLabels/index.html +++ b/dev/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.0
    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.0
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.05.0
    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.0
    val append : 'a list -> 'a list -> 'a list

    Concatenate two lists. Same function as the infix operator @. Not tail-recursive (length of the first argument). The @ operator is not tail-recursive either.

    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, but rev_append is tail-recursive and more efficient.

    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.0
    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.0

    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 begin f a1; f a2; ...; f an; () end.

    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.0
    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. Not tail-recursive.

    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. Not tail-recursive.

    • since 4.00.0
    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 tail-recursive and 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.0
    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.0
    val fold_left_map : - f:('a -> 'b -> 'a * 'c) -> - init:'a -> +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.0
    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.0
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.05.0
    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.0
    val append : 'a list -> 'a list -> 'a list

    Concatenate two lists. Same function as the infix operator @. Not tail-recursive (length of the first argument). The @ operator is not tail-recursive either.

    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, but rev_append is tail-recursive and more efficient.

    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.0
    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.0

    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 begin f a1; f a2; ...; f an; () end.

    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.0
    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. Not tail-recursive.

    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. Not tail-recursive.

    • since 4.00.0
    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 tail-recursive and 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.0
    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.0
    val fold_left_map : + f:('a -> 'b -> 'a * 'c) -> + init:'a -> 'b list -> - 'a * 'c list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11.0
    val fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b list -> 'a

    fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    val fold_right : f:('a -> 'b -> 'b) -> 'a list -> init:'b -> 'b

    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. Not tail-recursive.

    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 tail-recursive and more efficient.

    val fold_left2 : - f:('a -> 'b -> 'c -> 'a) -> - init:'a -> + 'a * 'c list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11.0
    val fold_left : f:('a -> 'b -> 'a) -> init:'a -> 'b list -> 'a

    fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    val fold_right : f:('a -> 'b -> 'b) -> 'a list -> init:'b -> 'b

    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. Not tail-recursive.

    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 tail-recursive and more efficient.

    val fold_left2 : + f:('a -> 'b -> 'c -> 'a) -> + init:'a -> 'b list -> 'c list -> - 'a

    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 -> 'c -> 'c) -> + 'a

    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 -> 'c -> 'c) -> 'a list -> 'b list -> - init:'c -> - 'c

    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_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.0
    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.0
    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.0

    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.0
    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.0
    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:'c -> + 'c

    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_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.0
    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.0
    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.0

    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.0
    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.0
    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/dev/ocaml/Stdlib/Map/Make/argument-1-Ord/index.html b/dev/ocaml/Stdlib/Map/Make/argument-1-Ord/index.html index c17fb89e..d430056d 100644 --- a/dev/ocaml/Stdlib/Map/Make/argument-1-Ord/index.html +++ b/dev/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/dev/ocaml/Stdlib/Map/Make/index.html b/dev/ocaml/Stdlib/Map/Make/index.html index 80950de1..fbb9635b 100644 --- a/dev/ocaml/Stdlib/Map/Make/index.html +++ b/dev/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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Stdlib/Map/index.html b/dev/ocaml/Stdlib/Map/index.html index 070991bc..58979780 100644 --- a/dev/ocaml/Stdlib/Map/index.html +++ b/dev/ocaml/Stdlib/Map/index.html @@ -1,5 +1,5 @@ -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 =
    +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) =
    @@ -10,4 +10,4 @@
     
     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/dev/ocaml/Stdlib/Map/module-type-OrderedType/index.html b/dev/ocaml/Stdlib/Map/module-type-OrderedType/index.html index e9654d64..8a11f1fe 100644 --- a/dev/ocaml/Stdlib/Map/module-type-OrderedType/index.html +++ b/dev/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/dev/ocaml/Stdlib/Map/module-type-S/index.html b/dev/ocaml/Stdlib/Map/module-type-S/index.html index 856c9bb4..8b0c3feb 100644 --- a/dev/ocaml/Stdlib/Map/module-type-S/index.html +++ b/dev/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.

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Stdlib/Marshal/index.html b/dev/ocaml/Stdlib/Marshal/index.html index 59644ef1..22ad6d0e 100644 --- a/dev/ocaml/Stdlib/Marshal/index.html +++ b/dev/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.0
    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.0
    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.0
    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.0
    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/dev/ocaml/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html index 990d1ac1..192ebb8e 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html +++ b/dev/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/dev/ocaml/Stdlib/MoreLabels/Hashtbl/Make/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/Make/index.html index c3018b44..b2d150be 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/Make/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : f:(key:key -> data:'a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : f:(key:key -> data:'a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00.0
    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/dev/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html index 6d769785..b48268ea 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/dev/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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.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 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

    diff --git a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html index f1cac1e2..6cf5774f 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html +++ b/dev/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.0

    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.0
    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.0
    val fold : f:(key:key -> data:'a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
    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.0

    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.0
    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.0
    val fold : f:(key:key -> data:'a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
    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/dev/ocaml/Stdlib/MoreLabels/Hashtbl/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/index.html index 2284e074..09192122 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/index.html +++ b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/index.html @@ -1,8 +1,8 @@ -Hashtbl (ocaml.Stdlib.MoreLabels.Hashtbl)

    Module MoreLabels.Hashtbl

    Hash tables and hash functions.

    Hash tables are hashed association tables, with in-place modification.

    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.0

      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.0
    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. 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.)

    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.

    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.0

      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.0
    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. 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.)

    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.0
    val fold : f:(key:'a -> data:'b -> 'c -> 'c) -> ('a, 'b) t -> init:'c -> 'c

    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.

    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.0
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03.0
    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.0
    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.0
    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.0

    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 =
    +  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.0
    val fold : f:(key:'a -> data:'b -> 'c -> 'c) -> ('a, 'b) t -> init:'c -> 'c

    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.

    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.0
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03.0
    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.0
    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.0
    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.0

    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
    @@ -17,4 +17,4 @@ IntHashtbl.add h 12 "hello"

    This creates a new module < (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.0
    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.0
    \ No newline at end of file + 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.0
    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.0
    diff --git a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html index abbbc159..9055a437 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html +++ b/dev/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/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html index 8d80c434..979529a3 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : f:(key:key -> data:'a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : f:(key:key -> data:'a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00.0
    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/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html index a34164d3..e7010fc2 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html +++ b/dev/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.0
    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.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.0
    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val 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 hash seed x = hash seed y for any value of seed. A suitable choice for hash is the function Stdlib.Hashtbl.seeded_hash below.

    diff --git a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html b/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html index e1d7127a..84454bff 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : f:(key:key -> data:'a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
    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.0
    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.0
    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.0
    val fold : f:(key:key -> data:'a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
    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/dev/ocaml/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html b/dev/ocaml/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html index 34aaf256..d4bcbb01 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html +++ b/dev/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/dev/ocaml/Stdlib/MoreLabels/Map/Make/index.html b/dev/ocaml/Stdlib/MoreLabels/Map/Make/index.html index 0d3c8b35..14d2fd5f 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Map/Make/index.html +++ b/dev/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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> init:'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> init:'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Stdlib/MoreLabels/Map/index.html b/dev/ocaml/Stdlib/MoreLabels/Map/index.html index 8145a3bb..2a8f1227 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Map/index.html +++ b/dev/ocaml/Stdlib/MoreLabels/Map/index.html @@ -1,5 +1,5 @@ -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 =
    +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) =
    @@ -12,4 +12,4 @@ 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 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/dev/ocaml/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html b/dev/ocaml/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html index 2787e262..a10b2a64 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html +++ b/dev/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/dev/ocaml/Stdlib/MoreLabels/Map/module-type-S/index.html b/dev/ocaml/Stdlib/MoreLabels/Map/module-type-S/index.html index 0ff0cecb..782842a3 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Map/module-type-S/index.html +++ b/dev/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.

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> init:'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> init:'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html b/dev/ocaml/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html index d6ebd49d..b6b5957e 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html +++ b/dev/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/dev/ocaml/Stdlib/MoreLabels/Set/Make/index.html b/dev/ocaml/Stdlib/MoreLabels/Set/Make/index.html index 8d4046fc..b69a02ae 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Set/Make/index.html +++ b/dev/ocaml/Stdlib/MoreLabels/Set/Make/index.html @@ -1,3 +1,3 @@ -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

    type elt = Ord.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : f:(elt -> 'a -> 'a) -> t -> init:'a -> 'a

    fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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

    type elt = Ord.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : f:(elt -> 'a -> 'a) -> t -> init:'a -> 'a

    fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Stdlib/MoreLabels/Set/index.html b/dev/ocaml/Stdlib/MoreLabels/Set/index.html index fe7f4d92..c870c469 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Set/index.html +++ b/dev/ocaml/Stdlib/MoreLabels/Set/index.html @@ -1,5 +1,5 @@ -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 =
    +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) =
    @@ -12,4 +12,4 @@ 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 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/dev/ocaml/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html b/dev/ocaml/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html index ee7d771c..1602b933 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html +++ b/dev/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/dev/ocaml/Stdlib/MoreLabels/Set/module-type-S/index.html b/dev/ocaml/Stdlib/MoreLabels/Set/module-type-S/index.html index 4e877acf..4c449e35 100644 --- a/dev/ocaml/Stdlib/MoreLabels/Set/module-type-S/index.html +++ b/dev/ocaml/Stdlib/MoreLabels/Set/module-type-S/index.html @@ -1,3 +1,3 @@ -S (ocaml.Stdlib.MoreLabels.Set.S)

    Module type Set.S

    Output signature of the functor Make.

    type elt

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : f:(elt -> 'a -> 'a) -> t -> init:'a -> 'a

    fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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.

    type elt

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : f:(elt -> 'a -> 'a) -> t -> init:'a -> 'a

    fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Stdlib/MoreLabels/index.html b/dev/ocaml/Stdlib/MoreLabels/index.html index c6a60df8..9af22f38 100644 --- a/dev/ocaml/Stdlib/MoreLabels/index.html +++ b/dev/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/dev/ocaml/Stdlib/Nativeint/index.html b/dev/ocaml/Stdlib/Nativeint/index.html index bfdeb39f..10c5a81b 100644 --- a/dev/ocaml/Stdlib/Nativeint/index.html +++ b/dev/ocaml/Stdlib/Nativeint/index.html @@ -1,5 +1,5 @@ -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
    +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.0
    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.0
    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

    Return the absolute value of its argument.

    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.0
    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.0
    val equal : t -> t -> bool

    The equal function for native ints.

    • since 4.03.0
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13.0
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13.0
    \ No newline at end of file +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.0
    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.0
    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

    Return the absolute value of its argument.

    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.0
    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.0
    val equal : t -> t -> bool

    The equal function for native ints.

    • since 4.03.0
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13.0
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13.0
    diff --git a/dev/ocaml/Stdlib/Obj/Closure/index.html b/dev/ocaml/Stdlib/Obj/Closure/index.html index ef3f6fa1..f628ff3c 100644 --- a/dev/ocaml/Stdlib/Obj/Closure/index.html +++ b/dev/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/dev/ocaml/Stdlib/Obj/Ephemeron/index.html b/dev/ocaml/Stdlib/Obj/Ephemeron/index.html index 43288853..d74aff23 100644 --- a/dev/ocaml/Stdlib/Obj/Ephemeron/index.html +++ b/dev/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/dev/ocaml/Stdlib/Obj/Extension_constructor/index.html b/dev/ocaml/Stdlib/Obj/Extension_constructor/index.html index a55e39d1..51ef4c29 100644 --- a/dev/ocaml/Stdlib/Obj/Extension_constructor/index.html +++ b/dev/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/dev/ocaml/Stdlib/Obj/index.html b/dev/ocaml/Stdlib/Obj/index.html index 3f3bcac9..36b5224d 100644 --- a/dev/ocaml/Stdlib/Obj/index.html +++ b/dev/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 excluded, unless the runtime system was configured with --disable-naked-pointers.

    • 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 and set_tag. However, for set_tag, in the case of immutable blocks where the middle-end optimizers never see code that discriminates on their tag (for example records), the operation should be safe. Such uses are nonetheless discouraged.

    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 set_tag : t -> int -> unit
    • deprecated Use with_tag instead.
    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 truncate : t -> int -> unit
    • deprecated
    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 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 final_tag : int
    • deprecated Replaced by custom_tag.
    val int_tag : int
    val out_of_heap_tag : int
    val unaligned_tag : int
    module Closure : sig ... end
    module Extension_constructor : sig ... end
    val extension_constructor : 'a -> extension_constructor
    • deprecated use Obj.Extension_constructor.of_val
    val extension_name : extension_constructor -> string
    • deprecated use Obj.Extension_constructor.name
    val extension_id : extension_constructor -> int
    • deprecated use Obj.Extension_constructor.id
    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 excluded, unless the runtime system was configured with --disable-naked-pointers.

    • 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 and set_tag. However, for set_tag, in the case of immutable blocks where the middle-end optimizers never see code that discriminates on their tag (for example records), the operation should be safe. Such uses are nonetheless discouraged.

    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 set_tag : t -> int -> unit
    • deprecated Use with_tag instead.
    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 truncate : t -> int -> unit
    • deprecated
    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 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 final_tag : int
    • deprecated Replaced by custom_tag.
    val int_tag : int
    val out_of_heap_tag : int
    val unaligned_tag : int
    module Closure : sig ... end
    module Extension_constructor : sig ... end
    val extension_constructor : 'a -> extension_constructor
    • deprecated use Obj.Extension_constructor.of_val
    val extension_name : extension_constructor -> string
    • deprecated use Obj.Extension_constructor.name
    val extension_id : extension_constructor -> int
    • deprecated use Obj.Extension_constructor.id
    module Ephemeron : sig ... end

    Ephemeron with arbitrary arity and untyped

    diff --git a/dev/ocaml/Stdlib/Oo/index.html b/dev/ocaml/Stdlib/Oo/index.html index 0da3251f..e28cf66b 100644 --- a/dev/ocaml/Stdlib/Oo/index.html +++ b/dev/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.

    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.

    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/dev/ocaml/Stdlib/Option/index.html b/dev/ocaml/Stdlib/Option/index.html index 3bc01968..00c69e3e 100644 --- a/dev/ocaml/Stdlib/Option/index.html +++ b/dev/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) is 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) is 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/dev/ocaml/Stdlib/Out_channel/index.html b/dev/ocaml/Stdlib/Out_channel/index.html index 638b802b..54d87489 100644 --- a/dev/ocaml/Stdlib/Out_channel/index.html +++ b/dev/ocaml/Stdlib/Out_channel/index.html @@ -1,3 +1,3 @@ -Out_channel (ocaml.Stdlib.Out_channel)

    Module Stdlib.Out_channel

    Output channels.

    • since 4.14.0
    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 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.

    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 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.

    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.

    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.

    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.

    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).

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

    Module Stdlib.Out_channel

    Output channels.

    • since 4.14.0
    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 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.

    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 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.

    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.

    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.

    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.

    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).

    diff --git a/dev/ocaml/Stdlib/Parsing/index.html b/dev/ocaml/Stdlib/Parsing/index.html index a7d302a3..e69fd2e6 100644 --- a/dev/ocaml/Stdlib/Parsing/index.html +++ b/dev/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.0
    \ 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.0
    diff --git a/dev/ocaml/Stdlib/Pervasives/index.html b/dev/ocaml/Stdlib/Pervasives/index.html index 8001b201..29be2674 100644 --- a/dev/ocaml/Stdlib/Pervasives/index.html +++ b/dev/ocaml/Stdlib/Pervasives/index.html @@ -1,5 +1,5 @@ -Pervasives (ocaml.Stdlib.Pervasives)

    Module Stdlib.Pervasives

    • deprecated Use Stdlib instead. +Pervasives (ocaml.Stdlib.Pervasives)

      Module Stdlib.Pervasives

      • deprecated Use Stdlib instead. If you need to stay compatible with OCaml < 4.07, you can use the stdlib-shims library: https://github.com/ocaml/stdlib-shims
      val raise : exn -> 'a
      val raise_notrace : exn -> 'a
      val invalid_arg : string -> 'a
      val failwith : string -> 'a
      exception Exit
      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 compare : 'a -> 'a -> int
      val min : 'a -> 'a -> 'a
      val max : 'a -> 'a -> 'a
      val (==) : 'a -> 'a -> bool
      val (!=) : 'a -> 'a -> bool
      val not : bool -> bool
      val (&&) : bool -> bool -> bool
      val (&) : bool -> bool -> bool
      • deprecated Use (&&) instead.
      val (||) : bool -> bool -> bool
      val or : bool -> bool -> bool
      • deprecated Use (||) instead.
      val __LOC__ : string
      val __FILE__ : string
      val __LINE__ : int
      val __MODULE__ : string
      val __POS__ : string * int * int * int
      val __LOC_OF__ : 'a -> string * 'a
      val __LINE_OF__ : 'a -> int * 'a
      val __POS_OF__ : 'a -> (string * int * int * int) * 'a
      val (|>) : 'a -> ('a -> 'b) -> 'b
      val (@@) : ('a -> 'b) -> 'a -> 'b
      val (~-) : int -> int
      val (~+) : int -> int
      val succ : int -> int
      val pred : int -> int
      val (+) : int -> int -> int
      val (-) : int -> int -> int
      val (*) : int -> int -> int
      val (/) : int -> int -> int
      val (mod) : int -> int -> int
      val abs : int -> int
      val max_int : int
      val min_int : int
      val (land) : int -> int -> int
      val (lor) : int -> int -> int
      val (lxor) : int -> int -> int
      val lnot : int -> int
      val (lsl) : int -> int -> int
      val (lsr) : int -> int -> int
      val (asr) : int -> int -> int
      val (~-.) : float -> float
      val (~+.) : float -> float
      val (+.) : float -> float -> float
      val (-.) : float -> float -> float
      val (*.) : float -> float -> float
      val (/.) : float -> float -> float
      val (**) : float -> float -> float
      val sqrt : float -> float
      val exp : float -> float
      val log : float -> float
      val log10 : float -> float
      val expm1 : float -> float
      val log1p : float -> float
      val cos : float -> float
      val sin : float -> float
      val tan : float -> float
      val acos : float -> float
      val asin : float -> float
      val atan : float -> float
      val atan2 : float -> float -> float
      val hypot : float -> float -> float
      val cosh : float -> float
      val sinh : float -> float
      val tanh : float -> float
      val ceil : float -> float
      val floor : float -> float
      val abs_float : float -> float
      val copysign : float -> float -> float
      val mod_float : float -> float -> float
      val frexp : float -> float * int
      val ldexp : float -> int -> float
      val modf : float -> float * float
      val float : int -> float
      val float_of_int : int -> float
      val truncate : float -> int
      val int_of_float : float -> int
      val infinity : float
      val neg_infinity : float
      val nan : float
      val max_float : float
      val min_float : float
      val epsilon_float : float
      type nonrec fpclass = fpclass =
      1. | FP_normal
      2. | FP_subnormal
      3. | FP_zero
      4. | FP_infinite
      5. | FP_nan
      val classify_float : float -> fpclass
      val (^) : string -> string -> string
      val int_of_char : char -> int
      val char_of_int : int -> char
      val ignore : 'a -> unit
      val string_of_bool : bool -> string
      val bool_of_string : string -> bool
      val bool_of_string_opt : string -> bool option
      val string_of_int : int -> string
      val int_of_string : string -> int
      val int_of_string_opt : string -> int option
      val string_of_float : float -> string
      val float_of_string : string -> float
      val float_of_string_opt : string -> float option
      val fst : ('a * 'b) -> 'a
      val snd : ('a * 'b) -> 'b
      val (@) : 'a list -> 'a list -> 'a list
      type nonrec in_channel = in_channel
      type nonrec out_channel = out_channel
      val stdin : in_channel
      val stdout : out_channel
      val stderr : out_channel
      val print_char : char -> unit
      val print_string : string -> unit
      val print_bytes : bytes -> unit
      val print_int : int -> unit
      val print_float : float -> unit
      val print_endline : string -> unit
      val print_newline : unit -> unit
      val prerr_char : char -> unit
      val prerr_string : string -> unit
      val prerr_bytes : bytes -> unit
      val prerr_int : int -> unit
      val prerr_float : float -> unit
      val prerr_endline : string -> unit
      val prerr_newline : unit -> unit
      val read_line : unit -> string
      val read_int : unit -> int
      val read_int_opt : unit -> int option
      val read_float : unit -> float
      val read_float_opt : unit -> float option
      type nonrec open_flag = open_flag =
      1. | Open_rdonly
      2. | Open_wronly
      3. | Open_append
      4. | Open_creat
      5. | Open_trunc
      6. | Open_excl
      7. | Open_binary
      8. | Open_text
      9. | Open_nonblock
      val open_out : string -> out_channel
      val open_out_bin : string -> out_channel
      val open_out_gen : open_flag list -> int -> string -> out_channel
      val flush : out_channel -> unit
      val flush_all : unit -> unit
      val output_char : out_channel -> char -> unit
      val output_string : out_channel -> string -> unit
      val output_bytes : out_channel -> bytes -> unit
      val output : out_channel -> bytes -> int -> int -> unit
      val output_substring : out_channel -> string -> int -> int -> unit
      val output_byte : out_channel -> int -> unit
      val output_binary_int : out_channel -> int -> unit
      val output_value : out_channel -> 'a -> unit
      val seek_out : out_channel -> int -> unit
      val pos_out : out_channel -> int
      val out_channel_length : out_channel -> int
      val close_out : out_channel -> unit
      val close_out_noerr : out_channel -> unit
      val set_binary_mode_out : out_channel -> bool -> unit
      val open_in : string -> in_channel
      val open_in_bin : string -> in_channel
      val open_in_gen : open_flag list -> int -> string -> in_channel
      val input_char : in_channel -> char
      val input_line : in_channel -> string
      val input : in_channel -> bytes -> int -> int -> int
      val really_input : in_channel -> bytes -> int -> int -> unit
      val really_input_string : in_channel -> int -> string
      val input_byte : in_channel -> int
      val input_binary_int : in_channel -> int
      val input_value : in_channel -> 'a
      val seek_in : in_channel -> int -> unit
      val pos_in : in_channel -> int
      val in_channel_length : in_channel -> int
      val close_in : in_channel -> unit
      val close_in_noerr : in_channel -> unit
      val set_binary_mode_in : in_channel -> bool -> unit
      module LargeFile = LargeFile
      type nonrec 'a ref = 'a ref = {
      1. mutable contents : 'a;
      }
      val ref : 'a -> 'a ref
      val (!) : 'a ref -> 'a
      val (:=) : 'a ref -> 'a -> unit
      val incr : int ref -> unit
      val decr : int ref -> unit
      type nonrec ('a, 'b) result = ('a, 'b) result =
      1. | Ok of 'a
      2. | Error of 'b
      type ('a, 'b, 'c, 'd, 'e, 'f) format6 = @@ -8,4 +8,4 @@ stdlib-shims library: https://github.com/ocaml/stdlib-shims
      'a, 'b, 'c, 'd, 'e, 'f) format6
      val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('f, 'b, 'c, 'e, 'g, 'h) format6 -> - ('a, 'b, 'c, 'd, 'g, 'h) format6
      val exit : int -> 'a
      val at_exit : (unit -> unit) -> unit
      val valid_float_lexem : string -> string
      val do_at_exit : unit -> unit
      \ No newline at end of file + ('a, 'b, 'c, 'd, 'g, 'h) format6
      val exit : int -> 'a
      val at_exit : (unit -> unit) -> unit
      val valid_float_lexem : string -> string
      val do_at_exit : unit -> unit
      diff --git a/dev/ocaml/Stdlib/Printexc/Slot/index.html b/dev/ocaml/Stdlib/Printexc/Slot/index.html index 8068f413..d75621b5 100644 --- a/dev/ocaml/Stdlib/Printexc/Slot/index.html +++ b/dev/ocaml/Stdlib/Printexc/Slot/index.html @@ -1,2 +1,2 @@ -Slot (ocaml.Stdlib.Printexc.Slot)

      Module Printexc.Slot

      • since 4.02.0
      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.0
      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.0
      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.0
      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/dev/ocaml/Stdlib/Printexc/index.html b/dev/ocaml/Stdlib/Printexc/index.html index 27f32a78..8eb5146d 100644 --- a/dev/ocaml/Stdlib/Printexc/index.html +++ b/dev/ocaml/Stdlib/Printexc/index.html @@ -1,5 +1,5 @@ -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.

      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.0
      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.0
      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.0
      val backtrace_status : unit -> bool

      Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

      • since 3.11.0
      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 +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.

      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.0
      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.0
      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.0
      val backtrace_status : unit -> bool

      Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

      • since 3.11.0
      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.0
      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.0
      val raw_backtrace_entries : raw_backtrace -> raw_backtrace_entry array
      • since 4.12.0
      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.0
      val print_raw_backtrace : out_channel -> raw_backtrace -> unit

      Print a raw backtrace in the same format Printexc.print_backtrace uses.

      • since 4.01.0
      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.0
      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.0

      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.0

      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.0

      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.0
      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.0
      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 : @@ -15,4 +15,4 @@ let rec iter_raw_backtrace_slot f slot = 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.0

    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.0
    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.0
    \ No newline at end of file + done
    • since 4.04.0

    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.0
    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.0
    diff --git a/dev/ocaml/Stdlib/Printf/index.html b/dev/ocaml/Stdlib/Printf/index.html index ad111bc1..da995033 100644 --- a/dev/ocaml/Stdlib/Printf/index.html +++ b/dev/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.0
    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.0

    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.0
    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.0

    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.0

    Deprecated

    val kprintf : (string -> 'b) -> ('a, unit, string, 'b) format4 -> 'a

    A deprecated synonym for ksprintf.

    \ 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.0

    Deprecated

    val kprintf : (string -> 'b) -> ('a, unit, string, 'b) format4 -> 'a

    A deprecated synonym for ksprintf.

    diff --git a/dev/ocaml/Stdlib/Queue/index.html b/dev/ocaml/Stdlib/Queue/index.html index 07010775..0c3784dd 100644 --- a/dev/ocaml/Stdlib/Queue/index.html +++ b/dev/ocaml/Stdlib/Queue/index.html @@ -1,2 +1,2 @@ -Queue (ocaml.Stdlib.Queue)

    Module Stdlib.Queue

    First-in first-out queues.

    This module implements queues (FIFOs), with in-place modification.

    Warning This module is not thread-safe: each Queue.t value must be protected from concurrent access (e.g. with a Mutex.t). Failure to do so can lead to a crash.

    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 : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

    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
    \ No newline at end of file +Queue (ocaml.Stdlib.Queue)

    Module Stdlib.Queue

    First-in first-out queues.

    This module implements queues (FIFOs), with in-place modification.

    Warning This module is not thread-safe: each Queue.t value must be protected from concurrent access (e.g. with a Mutex.t). Failure to do so can lead to a crash.

    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 : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

    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
    diff --git a/dev/ocaml/Stdlib/Random/State/index.html b/dev/ocaml/Stdlib/Random/State/index.html index 567d7a3d..be6da8e7 100644 --- a/dev/ocaml/Stdlib/Random/State/index.html +++ b/dev/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 system-dependent low-entropy seed.

    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.

    \ 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 system-dependent low-entropy seed.

    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.

    diff --git a/dev/ocaml/Stdlib/Random/index.html b/dev/ocaml/Stdlib/Random/index.html index 34902710..b3094f81 100644 --- a/dev/ocaml/Stdlib/Random/index.html +++ b/dev/ocaml/Stdlib/Random/index.html @@ -1,2 +1,2 @@ -Random (ocaml.Stdlib.Random)

    Module Stdlib.Random

    Pseudo-random number generators (PRNG).

    Basic functions

    val init : int -> unit

    Initialize the 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 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).

    val bits : unit -> int

    Return 30 random bits in a nonnegative integer.

    • before 3.12.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 Invalid_argument.

    • since 4.13.0
    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.0
    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.0
    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.0

    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

    Return the current state of the generator used by the basic functions.

    val set_state : State.t -> unit

    Set the state of the generator used by the basic functions.

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

    Module Stdlib.Random

    Pseudo-random number generators (PRNG).

    Basic functions

    val init : int -> unit

    Initialize the 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 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).

    val bits : unit -> int

    Return 30 random bits in a nonnegative integer.

    • before 3.12.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 Invalid_argument.

    • since 4.13.0
    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.0
    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.0
    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.0

    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

    Return the current state of the generator used by the basic functions.

    val set_state : State.t -> unit

    Set the state of the generator used by the basic functions.

    diff --git a/dev/ocaml/Stdlib/Result/index.html b/dev/ocaml/Stdlib/Result/index.html index 35b8da5d..2733b606 100644 --- a/dev/ocaml/Stdlib/Result/index.html +++ b/dev/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/dev/ocaml/Stdlib/Scanf/Scanning/index.html b/dev/ocaml/Stdlib/Scanf/Scanning/index.html index c89350fa..98d89958 100644 --- a/dev/ocaml/Stdlib/Scanf/Scanning/index.html +++ b/dev/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.

    • since 3.12.0
    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.0
    type file_name = string

    A convenient alias to designate a file name.

    • since 4.00.0
    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.0
    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.0
    val close_in : in_channel -> unit

    Closes the Stdlib.in_channel associated with the given Scanning.in_channel formatted input channel.

    • since 3.12.0
    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.0
    val stdib : in_channel

    A deprecated alias for Scanning.stdin, the scanning buffer reading from Stdlib.stdin.

    • deprecated Use Scanf.Scanning.stdin instead.
    \ 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.

    • since 3.12.0
    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.0
    type file_name = string

    A convenient alias to designate a file name.

    • since 4.00.0
    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.0
    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.0
    val close_in : in_channel -> unit

    Closes the Stdlib.in_channel associated with the given Scanning.in_channel formatted input channel.

    • since 3.12.0
    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.0
    val stdib : in_channel

    A deprecated alias for Scanning.stdin, the scanning buffer reading from Stdlib.stdin.

    • deprecated Use Scanf.Scanning.stdin instead.
    diff --git a/dev/ocaml/Stdlib/Scanf/index.html b/dev/ocaml/Stdlib/Scanf/index.html index bb5c0753..a89a13a6 100644 --- a/dev/ocaml/Stdlib/Scanf/index.html +++ b/dev/ocaml/Stdlib/Scanf/index.html @@ -1,5 +1,5 @@ -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.

    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.

    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.0
    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.

    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 @@ -14,14 +14,14 @@ 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.0
    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.0
    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.0
    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.0
    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.0

    Deprecated

    val fscanf : in_channel -> ('a, 'b, 'c, 'd) scanner
    • deprecated

      Scanf.fscanf is error prone and deprecated since 4.03.0.

      This function violates the following invariant of the Scanf module: To preserve scanning semantics, all scanning functions defined in Scanf must read from a user defined Scanning.in_channel formatted input channel.

      If you need to read from a Stdlib.in_channel input channel ic, simply define a Scanning.in_channel formatted input channel as in let ib = Scanning.from_channel ic, then use Scanf.bscanf ib as usual.

    val kfscanf : + ('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.0
    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.0

    Deprecated

    val fscanf : in_channel -> ('a, 'b, 'c, 'd) scanner
    • deprecated

      Scanf.fscanf is error prone and deprecated since 4.03.0.

      This function violates the following invariant of the Scanf module: To preserve scanning semantics, all scanning functions defined in Scanf must read from a user defined Scanning.in_channel formatted input channel.

      If you need to read from a Stdlib.in_channel input channel ic, simply define a Scanning.in_channel formatted input channel as in let ib = Scanning.from_channel ic, then use Scanf.bscanf ib as usual.

    val kfscanf : in_channel -> (Scanning.in_channel -> exn -> 'd) -> - ('a, 'b, 'c, 'd) scanner
    • deprecated

      Scanf.kfscanf is error prone and deprecated since 4.03.0.

    \ No newline at end of file + ('a, 'b, 'c, 'd) scanner
    • deprecated

      Scanf.kfscanf is error prone and deprecated since 4.03.0.

    diff --git a/dev/ocaml/Stdlib/Seq/index.html b/dev/ocaml/Stdlib/Seq/index.html index f01b3484..37020a5b 100644 --- a/dev/ocaml/Stdlib/Seq/index.html +++ b/dev/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 (head xs, tail xs), that is, a pair of the head and tail of the sequence xs.

    This equivalence holds if xs is persistent. If xs is ephemeral, then uncons must be preferred over separate calls to head and tail, which would cause xs to be queried twice.

    • 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 : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a

    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 : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b

    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_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 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 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b t -> 'c t -> 'a

    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 (head xs, tail xs), that is, a pair of the head and tail of the sequence xs.

    This equivalence holds if xs is persistent. If xs is ephemeral, then uncons must be preferred over separate calls to head and tail, which would cause xs to be queried twice.

    • 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 : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a

    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 : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b

    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_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 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 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b t -> 'c t -> 'a

    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/dev/ocaml/Stdlib/Set/Make/argument-1-Ord/index.html b/dev/ocaml/Stdlib/Set/Make/argument-1-Ord/index.html index a361a89f..60f206e3 100644 --- a/dev/ocaml/Stdlib/Set/Make/argument-1-Ord/index.html +++ b/dev/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/dev/ocaml/Stdlib/Set/Make/index.html b/dev/ocaml/Stdlib/Set/Make/index.html index 23ad4376..98c89392 100644 --- a/dev/ocaml/Stdlib/Set/Make/index.html +++ b/dev/ocaml/Stdlib/Set/Make/index.html @@ -1,3 +1,3 @@ -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

    type elt = Ord.t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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

    type elt = Ord.t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Stdlib/Set/index.html b/dev/ocaml/Stdlib/Set/index.html index dd6418ed..13c29c42 100644 --- a/dev/ocaml/Stdlib/Set/index.html +++ b/dev/ocaml/Stdlib/Set/index.html @@ -1,5 +1,5 @@ -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 =
    +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) =
    @@ -10,4 +10,4 @@
     
     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/dev/ocaml/Stdlib/Set/module-type-OrderedType/index.html b/dev/ocaml/Stdlib/Set/module-type-OrderedType/index.html index f43d818c..90af48eb 100644 --- a/dev/ocaml/Stdlib/Set/module-type-OrderedType/index.html +++ b/dev/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/dev/ocaml/Stdlib/Set/module-type-S/index.html b/dev/ocaml/Stdlib/Set/module-type-S/index.html index 2629d895..b97ba300 100644 --- a/dev/ocaml/Stdlib/Set/module-type-S/index.html +++ b/dev/ocaml/Stdlib/Set/module-type-S/index.html @@ -1,3 +1,3 @@ -S (ocaml.Stdlib.Set.S)

    Module type Set.S

    Output signature of the functor Make.

    type elt

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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.

    type elt

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Stdlib/Stack/index.html b/dev/ocaml/Stdlib/Stack/index.html index f081c417..8b070fd4 100644 --- a/dev/ocaml/Stdlib/Stack/index.html +++ b/dev/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.

    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 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 : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

    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.

    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 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 : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

    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/dev/ocaml/Stdlib/StdLabels/index.html b/dev/ocaml/Stdlib/StdLabels/index.html index e079741a..492cfde3 100644 --- a/dev/ocaml/Stdlib/StdLabels/index.html +++ b/dev/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:(function 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 everything = Array.create_matrix ~dimx:42 ~dimy:42 42
    module Array = ArrayLabels
    module Bytes = BytesLabels
    module List = ListLabels
    module String = StringLabels
    diff --git a/dev/ocaml/Stdlib/Stream/index.html b/dev/ocaml/Stdlib/Stream/index.html index 5b9fb511..bd5df154 100644 --- a/dev/ocaml/Stdlib/Stream/index.html +++ b/dev/ocaml/Stdlib/Stream/index.html @@ -1,2 +1,2 @@ -Stream (ocaml.Stdlib.Stream)

    Module Stdlib.Stream

    • deprecated Use the camlp-streams library instead.

    Streams and parsers.

    type !'a t

    The type of streams holding values of type 'a.

    exception Failure

    Raised by parsers when none of the first components of the stream patterns is accepted.

    exception Error of string

    Raised by parsers when the first component of a stream pattern is accepted, but one of the following components is rejected.

    Stream builders

    val from : (int -> 'a option) -> 'a t

    Stream.from f returns a stream built from the function f. To create a new stream element, the function f is called with the current stream count. The user function f must return either Some <value> for a value or None to specify the end of the stream.

    Do note that the indices passed to f may not start at 0 in the general case. For example, [< '0; '1; Stream.from f >] would call f the first time with count 2.

    val of_list : 'a list -> 'a t

    Return the stream holding the elements of the list in the same order.

    val of_string : string -> char t

    Return the stream of the characters of the string parameter.

    val of_bytes : bytes -> char t

    Return the stream of the characters of the bytes parameter.

    • since 4.02.0
    val of_channel : in_channel -> char t

    Return the stream of the characters read from the input channel.

    Stream iterator

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

    Stream.iter f s scans the whole stream s, applying function f in turn to each stream element encountered.

    Predefined parsers

    val next : 'a t -> 'a

    Return the first element of the stream and remove it from the stream.

    • raises Stream.Failure

      if the stream is empty.

    val empty : 'a t -> unit

    Return () if the stream is empty, else raise Stream.Failure.

    Useful functions

    val peek : 'a t -> 'a option

    Return Some of "the first element" of the stream, or None if the stream is empty.

    val junk : 'a t -> unit

    Remove the first element of the stream, possibly unfreezing it before.

    val count : 'a t -> int

    Return the current count of the stream elements, i.e. the number of the stream elements discarded.

    val npeek : int -> 'a t -> 'a list

    npeek n returns the list of the n first elements of the stream, or all its remaining elements if less than n elements are available.

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

    Module Stdlib.Stream

    • deprecated Use the camlp-streams library instead.

    Streams and parsers.

    type !'a t

    The type of streams holding values of type 'a.

    exception Failure

    Raised by parsers when none of the first components of the stream patterns is accepted.

    exception Error of string

    Raised by parsers when the first component of a stream pattern is accepted, but one of the following components is rejected.

    Stream builders

    val from : (int -> 'a option) -> 'a t

    Stream.from f returns a stream built from the function f. To create a new stream element, the function f is called with the current stream count. The user function f must return either Some <value> for a value or None to specify the end of the stream.

    Do note that the indices passed to f may not start at 0 in the general case. For example, [< '0; '1; Stream.from f >] would call f the first time with count 2.

    val of_list : 'a list -> 'a t

    Return the stream holding the elements of the list in the same order.

    val of_string : string -> char t

    Return the stream of the characters of the string parameter.

    val of_bytes : bytes -> char t

    Return the stream of the characters of the bytes parameter.

    • since 4.02.0
    val of_channel : in_channel -> char t

    Return the stream of the characters read from the input channel.

    Stream iterator

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

    Stream.iter f s scans the whole stream s, applying function f in turn to each stream element encountered.

    Predefined parsers

    val next : 'a t -> 'a

    Return the first element of the stream and remove it from the stream.

    val empty : 'a t -> unit

    Return () if the stream is empty, else raise Stream.Failure.

    Useful functions

    val peek : 'a t -> 'a option

    Return Some of "the first element" of the stream, or None if the stream is empty.

    val junk : 'a t -> unit

    Remove the first element of the stream, possibly unfreezing it before.

    val count : 'a t -> int

    Return the current count of the stream elements, i.e. the number of the stream elements discarded.

    val npeek : int -> 'a t -> 'a list

    npeek n returns the list of the n first elements of the stream, or all its remaining elements if less than n elements are available.

    diff --git a/dev/ocaml/Stdlib/String/index.html b/dev/ocaml/Stdlib/String/index.html index 2cc0f053..bd7eed0f 100644 --- a/dev/ocaml/Stdlib/String/index.html +++ b/dev/ocaml/Stdlib/String/index.html @@ -1,6 +1,6 @@ -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. OCaml strings used to be modifiable in place, for instance via the String.set and String.blit functions. This use is nowadays only possible when the compiler is put in "unsafe-string" mode by giving the -unsafe-string command-line option. This compatibility mode makes the types string and bytes (see Bytes.t) interchangeable so that functions expecting byte sequences can also accept strings as arguments and modify them.

    The distinction between bytes and string was introduced in OCaml 4.02, and the "unsafe-string" compatibility mode was the default until OCaml 4.05. Starting with 4.06, the compatibility mode is opt-in; we intend to remove the option in the future.

    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.0
    val empty : string

    The empty string.

    • since 4.13.0
    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13.0
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13.0
    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.

    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.0

    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.0 (4.05.0 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.0
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13.0
    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.0 (4.05.0 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.0
    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.0
    val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a

    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.0
    val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a

    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.0
    val for_all : (char -> bool) -> string -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13.0
    val exists : (char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13.0
    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.0
    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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0

    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.

    Deprecated functions

    val create : int -> bytes

    create n returns a fresh byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    val set : bytes -> int -> char -> unit

    set s n c modifies byte sequence s in place, replacing the byte at index n with c. You can also write s.[n] <- c instead of set s n c.

    • raises Invalid_argument

      if n is not a valid index in s.

    val blit : string -> int -> bytes -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len bytes from the string src, starting at index src_pos, to byte sequence dst, starting at character number 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.

    val copy : string -> string

    Return a copy of the given string.

    • deprecated

      Because strings are immutable, it doesn't make much sense to make identical copies of them.

    val fill : bytes -> int -> int -> char -> unit

    fill s pos len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    val uppercase : string -> string

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : string -> string

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : string -> string

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : string -> string

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.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.0
    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.0
    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.0
    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.0
    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.0
    \ 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. OCaml strings used to be modifiable in place, for instance via the String.set and String.blit functions. This use is nowadays only possible when the compiler is put in "unsafe-string" mode by giving the -unsafe-string command-line option. This compatibility mode makes the types string and bytes (see Bytes.t) interchangeable so that functions expecting byte sequences can also accept strings as arguments and modify them.

    The distinction between bytes and string was introduced in OCaml 4.02, and the "unsafe-string" compatibility mode was the default until OCaml 4.05. Starting with 4.06, the compatibility mode is opt-in; we intend to remove the option in the future.

    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.0
    val empty : string

    The empty string.

    • since 4.13.0
    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13.0
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13.0
    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].

    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.0

    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.0 (4.05.0 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.0
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13.0
    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.0 (4.05.0 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.0
    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.0
    val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a

    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.0
    val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a

    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.0
    val for_all : (char -> bool) -> string -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13.0
    val exists : (char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13.0
    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.0
    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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0 (4.05.0 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.0

    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.

    Deprecated functions

    val create : int -> bytes

    create n returns a fresh byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    val set : bytes -> int -> char -> unit

    set s n c modifies byte sequence s in place, replacing the byte at index n with c. You can also write s.[n] <- c instead of set s n c.

    val blit : string -> int -> bytes -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len bytes from the string src, starting at index src_pos, to byte sequence dst, starting at character number 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.

    val copy : string -> string

    Return a copy of the given string.

    • deprecated

      Because strings are immutable, it doesn't make much sense to make identical copies of them.

    val fill : bytes -> int -> int -> char -> unit

    fill s pos len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

    val uppercase : string -> string

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : string -> string

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : string -> string

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : string -> string

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.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.0
    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.0
    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.0
    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.0
    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.0
    diff --git a/dev/ocaml/Stdlib/StringLabels/index.html b/dev/ocaml/Stdlib/StringLabels/index.html index 9dd52617..46bd98ab 100644 --- a/dev/ocaml/Stdlib/StringLabels/index.html +++ b/dev/ocaml/Stdlib/StringLabels/index.html @@ -1,12 +1,12 @@ -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. OCaml strings used to be modifiable in place, for instance via the String.set and String.blit functions. This use is nowadays only possible when the compiler is put in "unsafe-string" mode by giving the -unsafe-string command-line option. This compatibility mode makes the types string and bytes (see Bytes.t) interchangeable so that functions expecting byte sequences can also accept strings as arguments and modify them.

    The distinction between bytes and string was introduced in OCaml 4.02, and the "unsafe-string" compatibility mode was the default until OCaml 4.05. Starting with 4.06, the compatibility mode is opt-in; we intend to remove the option in the future.

    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.0
    val empty : string

    The empty string.

    • since 4.13.0
    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13.0
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13.0
    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.

    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.0

    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.0
    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.0
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13.0
    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.0

    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.0
    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.0
    val fold_left : f:('a -> char -> 'a) -> init:'a -> string -> 'a

    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.0
    val fold_right : f:(char -> 'a -> 'a) -> string -> init:'a -> 'a

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0

    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.0

    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.

    Deprecated functions

    val create : int -> bytes

    create n returns a fresh byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    val set : bytes -> int -> char -> unit

    set s n c modifies byte sequence s in place, replacing the byte at index n with c. You can also write s.[n] <- c instead of set s n c.

    • raises Invalid_argument

      if n is not a valid index in s.

    val blit : - src:string -> - src_pos:int -> - dst:bytes -> - dst_pos:int -> - len:int -> - unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from the string src, starting at index src_pos, to byte sequence dst, starting at character number 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.

    val copy : string -> string

    Return a copy of the given string.

    • deprecated

      Because strings are immutable, it doesn't make much sense to make identical copies of them.

    val fill : bytes -> pos:int -> len:int -> char -> unit

    fill s ~pos ~len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    val uppercase : string -> string

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : string -> string

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : string -> string

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : string -> string

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.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.0
    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.0
    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.0
    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.0
    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.0
    \ 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. OCaml strings used to be modifiable in place, for instance via the String.set and String.blit functions. This use is nowadays only possible when the compiler is put in "unsafe-string" mode by giving the -unsafe-string command-line option. This compatibility mode makes the types string and bytes (see Bytes.t) interchangeable so that functions expecting byte sequences can also accept strings as arguments and modify them.

    The distinction between bytes and string was introduced in OCaml 4.02, and the "unsafe-string" compatibility mode was the default until OCaml 4.05. Starting with 4.06, the compatibility mode is opt-in; we intend to remove the option in the future.

    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.0
    val empty : string

    The empty string.

    • since 4.13.0
    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13.0
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13.0
    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].

    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.0

    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.0
    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.0
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13.0
    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.0

    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.0
    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.0
    val fold_left : f:('a -> char -> 'a) -> init:'a -> string -> 'a

    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.0
    val fold_right : f:(char -> 'a -> 'a) -> string -> init:'a -> 'a

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0

    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.0

    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.

    Deprecated functions

    val create : int -> bytes

    create n returns a fresh byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    val set : bytes -> int -> char -> unit

    set s n c modifies byte sequence s in place, replacing the byte at index n with c. You can also write s.[n] <- c instead of set s n c.

    val blit : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from the string src, starting at index src_pos, to byte sequence dst, starting at character number 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.

    val copy : string -> string

    Return a copy of the given string.

    • deprecated

      Because strings are immutable, it doesn't make much sense to make identical copies of them.

    val fill : bytes -> pos:int -> len:int -> char -> unit

    fill s ~pos ~len c modifies byte sequence s in place, replacing len bytes by c, starting at pos.

    val uppercase : string -> string

    Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val lowercase : string -> string

    Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val capitalize : string -> string

    Return a copy of the argument, with the first character set to uppercase, using the ISO Latin-1 (8859-1) character set..

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    val uncapitalize : string -> string

    Return a copy of the argument, with the first character set to lowercase, using the ISO Latin-1 (8859-1) character set.

    • deprecated

      Functions operating on Latin-1 character set are deprecated.

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.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.0
    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.0
    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.0
    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.0
    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.0
    diff --git a/dev/ocaml/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html b/dev/ocaml/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html index 8718b283..d004c7a1 100644 --- a/dev/ocaml/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html +++ b/dev/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/dev/ocaml/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html b/dev/ocaml/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html index 43649855..4506ecf8 100644 --- a/dev/ocaml/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html +++ b/dev/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/dev/ocaml/Stdlib/Sys/Immediate64/Make/index.html b/dev/ocaml/Stdlib/Sys/Immediate64/Make/index.html index 4ddb03de..f87ee75a 100644 --- a/dev/ocaml/Stdlib/Sys/Immediate64/Make/index.html +++ b/dev/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/dev/ocaml/Stdlib/Sys/Immediate64/index.html b/dev/ocaml/Stdlib/Sys/Immediate64/index.html index 231cdbff..417483fe 100644 --- a/dev/ocaml/Stdlib/Sys/Immediate64/index.html +++ b/dev/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.0
    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.0
    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/dev/ocaml/Stdlib/Sys/Immediate64/module-type-Immediate/index.html b/dev/ocaml/Stdlib/Sys/Immediate64/module-type-Immediate/index.html index fe1ab33d..7476df2d 100644 --- a/dev/ocaml/Stdlib/Sys/Immediate64/module-type-Immediate/index.html +++ b/dev/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/dev/ocaml/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html b/dev/ocaml/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html index 00d8c3f6..a98bedf0 100644 --- a/dev/ocaml/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html +++ b/dev/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/dev/ocaml/Stdlib/Sys/index.html b/dev/ocaml/Stdlib/Sys/index.html index b2b6dfac..d3da14f8 100644 --- a/dev/ocaml/Stdlib/Sys/index.html +++ b/dev/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.0
    val remove : string -> unit

    Remove the given file name from the file system.

    val rename : string -> string -> unit

    Rename a file. rename oldpath newpath renames the file called oldpath, giving it newpath as its new name, moving it between directories if needed. If 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.0
    val rmdir : string -> unit

    Remove an empty directory.

    • since 4.12.0
    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.

    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),
    • "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.0
    val backend_type : backend_type

    Backend type currently executing the OCaml program.

    • since 4.04.0
    val unix : bool

    True if Sys.os_type = "Unix".

    • since 4.01.0
    val win32 : bool

    True if Sys.os_type = "Win32".

    • since 4.01.0
    val cygwin : bool

    True if Sys.os_type = "Cygwin".

    • since 4.01.0
    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.0
    val big_endian : bool

    Whether the machine currently executing the Caml program is big-endian.

    • since 4.00.0
    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.0
    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.0

    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.0
    type extra_prefix =
    1. | Plus
    2. | Tilde
    type extra_info = extra_prefix * string
    type ocaml_release_info = {
    1. major : int;
    2. minor : int;
    3. patchlevel : int;
    4. extra : extra_info option;
    }
    val ocaml_release : ocaml_release_info
    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.0
    val runtime_warnings_enabled : unit -> bool

    Return whether runtime warnings are currently enabled.

    • since 4.03.0

    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
    +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.0
    val remove : string -> unit

    Remove the given file name from the file system.

    val rename : string -> string -> unit

    Rename a file. rename oldpath newpath renames the file called oldpath, giving it newpath as its new name, moving it between directories if needed. If 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.0
    val rmdir : string -> unit

    Remove an empty directory.

    • since 4.12.0
    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.

    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),
    • "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.0
    val backend_type : backend_type

    Backend type currently executing the OCaml program.

    • since 4.04.0
    val unix : bool

    True if Sys.os_type = "Unix".

    • since 4.01.0
    val win32 : bool

    True if Sys.os_type = "Win32".

    • since 4.01.0
    val cygwin : bool

    True if Sys.os_type = "Cygwin".

    • since 4.01.0
    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.0
    val big_endian : bool

    Whether the machine currently executing the Caml program is big-endian.

    • since 4.00.0
    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.0
    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.0

    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.0
    type extra_prefix =
    1. | Plus
    2. | Tilde
    type extra_info = extra_prefix * string
    type ocaml_release_info = {
    1. major : int;
    2. minor : int;
    3. patchlevel : int;
    4. extra : extra_info option;
    }
    val ocaml_release : ocaml_release_info
    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.0
    val runtime_warnings_enabled : unit -> bool

    Return whether runtime warnings are currently enabled.

    • since 4.03.0

    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.0
    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 +done
    • since 4.03.0
    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/dev/ocaml/Stdlib/Uchar/index.html b/dev/ocaml/Stdlib/Uchar/index.html index 47dfded1..1ed2a36d 100644 --- a/dev/ocaml/Stdlib/Uchar/index.html +++ b/dev/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.0
    val rep : t

    rep is U+FFFD, the replacement character.

    • since 4.06.0
    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.0
    val rep : t

    rep is U+FFFD, the replacement character.

    • since 4.06.0
    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/dev/ocaml/Stdlib/Unit/index.html b/dev/ocaml/Stdlib/Unit/index.html index 16adc77f..88c4cc18 100644 --- a/dev/ocaml/Stdlib/Unit/index.html +++ b/dev/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/dev/ocaml/Stdlib/Weak/Make/argument-1-H/index.html b/dev/ocaml/Stdlib/Weak/Make/argument-1-H/index.html index 634d5e56..f0cfa331 100644 --- a/dev/ocaml/Stdlib/Weak/Make/argument-1-H/index.html +++ b/dev/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/dev/ocaml/Stdlib/Weak/Make/index.html b/dev/ocaml/Stdlib/Weak/Make/index.html index f3eeb90e..9e90f1cc 100644 --- a/dev/ocaml/Stdlib/Weak/Make/index.html +++ b/dev/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 -> 'a -> 'a) -> t -> 'a -> 'a

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    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/dev/ocaml/Stdlib/Weak/index.html b/dev/ocaml/Stdlib/Weak/index.html index c7f9dccb..1d6b10f6 100644 --- a/dev/ocaml/Stdlib/Weak/index.html +++ b/dev/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 a - 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 a - 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 a - 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.

    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 a.

    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.

    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).

    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.

    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/dev/ocaml/Stdlib/Weak/module-type-S/index.html b/dev/ocaml/Stdlib/Weak/module-type-S/index.html index 36b5ef65..ae642d77 100644 --- a/dev/ocaml/Stdlib/Weak/module-type-S/index.html +++ b/dev/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 -> 'a -> 'a) -> t -> 'a -> 'a

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    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/dev/ocaml/Stdlib/index.html b/dev/ocaml/Stdlib/index.html index cc14779c..8ca386a0 100644 --- a/dev/ocaml/Stdlib/index.html +++ b/dev/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.

    It 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.0
    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
    • deprecated

      Stdlib.(&&) should be used instead. 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.

    val or : bool -> bool -> bool
    • deprecated

      Stdlib.(||) should be used instead. 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.0
    val __FILE__ : string

    __FILE__ returns the name of the file currently being parsed by the compiler.

    • since 4.02.0
    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.0
    val __MODULE__ : string

    __MODULE__ returns the module name of the file being parsed by the compiler.

    • since 4.02.0
    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.0
    val __FUNCTION__ : string

    __FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

    • since 4.12.0
    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.0
    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.0
    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.0

    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.0
    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

    Return the absolute value of the argument. Note that this may be negative if the argument is min_int.

    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.0
    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.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.

    • since 3.12.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.

    • since 4.00.0
    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.0
    val asinh : float -> float

    Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

    • since 4.13.0
    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.0
    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.0
    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. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

    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

    List concatenation. Not tail-recursive (length of the first argument). Right-associative operator, see Ocaml_operators for more information.

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0

    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.

    It 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.0
    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
    • deprecated

      Stdlib.(&&) should be used instead. 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.

    val or : bool -> bool -> bool
    • deprecated

      Stdlib.(||) should be used instead. 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.0
    val __FILE__ : string

    __FILE__ returns the name of the file currently being parsed by the compiler.

    • since 4.02.0
    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.0
    val __MODULE__ : string

    __MODULE__ returns the module name of the file being parsed by the compiler.

    • since 4.02.0
    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.0
    val __FUNCTION__ : string

    __FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

    • since 4.12.0
    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.0
    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.0
    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.0

    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.0
    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

    Return the absolute value of the argument. Note that this may be negative if the argument is min_int.

    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.0
    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.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.

    • since 3.12.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.

    • since 4.00.0
    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.0
    val asinh : float -> float

    Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

    • since 4.13.0
    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.0
    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.0
    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. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

    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

    List concatenation. Not tail-recursive (length of the first argument). Right-associative operator, see Ocaml_operators for more information.

    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.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0

    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. 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

    This module provides a purely sequential implementation of the concurrent atomic references provided by the Multicore OCaml standard library:

    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 Digest : sig ... end

    MD5 message digest.

    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 Genlex : sig ... end
    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 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 Pervasives : sig ... end
    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 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 Stream : sig ... end
    module String : sig ... end

    Strings.

    module StringLabels : sig ... end

    Strings.

    module Sys : sig ... end

    System interface.

    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. 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

    This module provides a purely sequential implementation of the concurrent atomic references provided by the Multicore OCaml standard library:

    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 Digest : sig ... end

    MD5 message digest.

    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 Genlex : sig ... end
    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 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 Pervasives : sig ... end
    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 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 Stream : sig ... end
    module String : sig ... end

    Strings.

    module StringLabels : sig ... end

    Strings.

    module Sys : sig ... end

    System interface.

    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/dev/ocaml/Stdlib__Arg/index.html b/dev/ocaml/Stdlib__Arg/index.html deleted file mode 100644 index 43a6f80f..00000000 --- a/dev/ocaml/Stdlib__Arg/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Arg (ocaml.Stdlib__Arg)

    Module Stdlib__Arg

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Array/index.html b/dev/ocaml/Stdlib__Array/index.html deleted file mode 100644 index 013232e6..00000000 --- a/dev/ocaml/Stdlib__Array/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Array (ocaml.Stdlib__Array)

    Module Stdlib__Array

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__ArrayLabels/index.html b/dev/ocaml/Stdlib__ArrayLabels/index.html deleted file mode 100644 index ec2ce3b5..00000000 --- a/dev/ocaml/Stdlib__ArrayLabels/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__ArrayLabels (ocaml.Stdlib__ArrayLabels)

    Module Stdlib__ArrayLabels

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Atomic/index.html b/dev/ocaml/Stdlib__Atomic/index.html deleted file mode 100644 index 9bfb31e7..00000000 --- a/dev/ocaml/Stdlib__Atomic/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Atomic (ocaml.Stdlib__Atomic)

    Module Stdlib__Atomic

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Bigarray/index.html b/dev/ocaml/Stdlib__Bigarray/index.html deleted file mode 100644 index 17265066..00000000 --- a/dev/ocaml/Stdlib__Bigarray/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Bigarray (ocaml.Stdlib__Bigarray)

    Module Stdlib__Bigarray

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Bool/index.html b/dev/ocaml/Stdlib__Bool/index.html deleted file mode 100644 index 7841a660..00000000 --- a/dev/ocaml/Stdlib__Bool/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Bool (ocaml.Stdlib__Bool)

    Module Stdlib__Bool

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Buffer/index.html b/dev/ocaml/Stdlib__Buffer/index.html deleted file mode 100644 index 5dd8252f..00000000 --- a/dev/ocaml/Stdlib__Buffer/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Buffer (ocaml.Stdlib__Buffer)

    Module Stdlib__Buffer

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Bytes/index.html b/dev/ocaml/Stdlib__Bytes/index.html deleted file mode 100644 index fcfdb8f5..00000000 --- a/dev/ocaml/Stdlib__Bytes/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Bytes (ocaml.Stdlib__Bytes)

    Module Stdlib__Bytes

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__BytesLabels/index.html b/dev/ocaml/Stdlib__BytesLabels/index.html deleted file mode 100644 index dbe1d7c8..00000000 --- a/dev/ocaml/Stdlib__BytesLabels/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__BytesLabels (ocaml.Stdlib__BytesLabels)

    Module Stdlib__BytesLabels

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Callback/index.html b/dev/ocaml/Stdlib__Callback/index.html deleted file mode 100644 index af1f3e74..00000000 --- a/dev/ocaml/Stdlib__Callback/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Callback (ocaml.Stdlib__Callback)

    Module Stdlib__Callback

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Char/index.html b/dev/ocaml/Stdlib__Char/index.html deleted file mode 100644 index 07eef226..00000000 --- a/dev/ocaml/Stdlib__Char/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Char (ocaml.Stdlib__Char)

    Module Stdlib__Char

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Complex/index.html b/dev/ocaml/Stdlib__Complex/index.html deleted file mode 100644 index 6b7a4629..00000000 --- a/dev/ocaml/Stdlib__Complex/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Complex (ocaml.Stdlib__Complex)

    Module Stdlib__Complex

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Digest/index.html b/dev/ocaml/Stdlib__Digest/index.html deleted file mode 100644 index 2814df79..00000000 --- a/dev/ocaml/Stdlib__Digest/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Digest (ocaml.Stdlib__Digest)

    Module Stdlib__Digest

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Either/index.html b/dev/ocaml/Stdlib__Either/index.html deleted file mode 100644 index 0d291739..00000000 --- a/dev/ocaml/Stdlib__Either/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Either (ocaml.Stdlib__Either)

    Module Stdlib__Either

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Ephemeron/index.html b/dev/ocaml/Stdlib__Ephemeron/index.html deleted file mode 100644 index 8a70030a..00000000 --- a/dev/ocaml/Stdlib__Ephemeron/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Ephemeron (ocaml.Stdlib__Ephemeron)

    Module Stdlib__Ephemeron

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Filename/index.html b/dev/ocaml/Stdlib__Filename/index.html deleted file mode 100644 index 3c675ff3..00000000 --- a/dev/ocaml/Stdlib__Filename/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Filename (ocaml.Stdlib__Filename)

    Module Stdlib__Filename

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Float/index.html b/dev/ocaml/Stdlib__Float/index.html deleted file mode 100644 index 895ec028..00000000 --- a/dev/ocaml/Stdlib__Float/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Float (ocaml.Stdlib__Float)

    Module Stdlib__Float

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Format/index.html b/dev/ocaml/Stdlib__Format/index.html deleted file mode 100644 index 6ad337e8..00000000 --- a/dev/ocaml/Stdlib__Format/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Format (ocaml.Stdlib__Format)

    Module Stdlib__Format

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Fun/index.html b/dev/ocaml/Stdlib__Fun/index.html deleted file mode 100644 index fea08260..00000000 --- a/dev/ocaml/Stdlib__Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Fun (ocaml.Stdlib__Fun)

    Module Stdlib__Fun

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Gc/index.html b/dev/ocaml/Stdlib__Gc/index.html deleted file mode 100644 index 49235528..00000000 --- a/dev/ocaml/Stdlib__Gc/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Gc (ocaml.Stdlib__Gc)

    Module Stdlib__Gc

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Genlex/index.html b/dev/ocaml/Stdlib__Genlex/index.html deleted file mode 100644 index 25d2601a..00000000 --- a/dev/ocaml/Stdlib__Genlex/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Genlex (ocaml.Stdlib__Genlex)

    Module Stdlib__Genlex

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Hashtbl/index.html b/dev/ocaml/Stdlib__Hashtbl/index.html deleted file mode 100644 index e5b6a87b..00000000 --- a/dev/ocaml/Stdlib__Hashtbl/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Hashtbl (ocaml.Stdlib__Hashtbl)

    Module Stdlib__Hashtbl

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__In_channel/index.html b/dev/ocaml/Stdlib__In_channel/index.html deleted file mode 100644 index fdf1d902..00000000 --- a/dev/ocaml/Stdlib__In_channel/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__In_channel (ocaml.Stdlib__In_channel)

    Module Stdlib__In_channel

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Int/index.html b/dev/ocaml/Stdlib__Int/index.html deleted file mode 100644 index 53c59be2..00000000 --- a/dev/ocaml/Stdlib__Int/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Int (ocaml.Stdlib__Int)

    Module Stdlib__Int

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Int32/index.html b/dev/ocaml/Stdlib__Int32/index.html deleted file mode 100644 index ee571da6..00000000 --- a/dev/ocaml/Stdlib__Int32/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Int32 (ocaml.Stdlib__Int32)

    Module Stdlib__Int32

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Int64/index.html b/dev/ocaml/Stdlib__Int64/index.html deleted file mode 100644 index eba24a30..00000000 --- a/dev/ocaml/Stdlib__Int64/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Int64 (ocaml.Stdlib__Int64)

    Module Stdlib__Int64

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Lazy/index.html b/dev/ocaml/Stdlib__Lazy/index.html deleted file mode 100644 index 05ce16f1..00000000 --- a/dev/ocaml/Stdlib__Lazy/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Lazy (ocaml.Stdlib__Lazy)

    Module Stdlib__Lazy

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Lexing/index.html b/dev/ocaml/Stdlib__Lexing/index.html deleted file mode 100644 index f3310882..00000000 --- a/dev/ocaml/Stdlib__Lexing/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Lexing (ocaml.Stdlib__Lexing)

    Module Stdlib__Lexing

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__List/index.html b/dev/ocaml/Stdlib__List/index.html deleted file mode 100644 index 89a6e181..00000000 --- a/dev/ocaml/Stdlib__List/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__List (ocaml.Stdlib__List)

    Module Stdlib__List

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__ListLabels/index.html b/dev/ocaml/Stdlib__ListLabels/index.html deleted file mode 100644 index f11d1fdd..00000000 --- a/dev/ocaml/Stdlib__ListLabels/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__ListLabels (ocaml.Stdlib__ListLabels)

    Module Stdlib__ListLabels

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Map/index.html b/dev/ocaml/Stdlib__Map/index.html deleted file mode 100644 index c418e19d..00000000 --- a/dev/ocaml/Stdlib__Map/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Map (ocaml.Stdlib__Map)

    Module Stdlib__Map

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Marshal/index.html b/dev/ocaml/Stdlib__Marshal/index.html deleted file mode 100644 index 45ba1d9c..00000000 --- a/dev/ocaml/Stdlib__Marshal/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Marshal (ocaml.Stdlib__Marshal)

    Module Stdlib__Marshal

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__MoreLabels/index.html b/dev/ocaml/Stdlib__MoreLabels/index.html deleted file mode 100644 index 0821beb4..00000000 --- a/dev/ocaml/Stdlib__MoreLabels/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__MoreLabels (ocaml.Stdlib__MoreLabels)

    Module Stdlib__MoreLabels

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Nativeint/index.html b/dev/ocaml/Stdlib__Nativeint/index.html deleted file mode 100644 index a02bc778..00000000 --- a/dev/ocaml/Stdlib__Nativeint/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Nativeint (ocaml.Stdlib__Nativeint)

    Module Stdlib__Nativeint

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Obj/index.html b/dev/ocaml/Stdlib__Obj/index.html deleted file mode 100644 index 4e2b19f7..00000000 --- a/dev/ocaml/Stdlib__Obj/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Obj (ocaml.Stdlib__Obj)

    Module Stdlib__Obj

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Oo/index.html b/dev/ocaml/Stdlib__Oo/index.html deleted file mode 100644 index 46972ab6..00000000 --- a/dev/ocaml/Stdlib__Oo/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Oo (ocaml.Stdlib__Oo)

    Module Stdlib__Oo

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Option/index.html b/dev/ocaml/Stdlib__Option/index.html deleted file mode 100644 index 303d2cfd..00000000 --- a/dev/ocaml/Stdlib__Option/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Option (ocaml.Stdlib__Option)

    Module Stdlib__Option

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Out_channel/index.html b/dev/ocaml/Stdlib__Out_channel/index.html deleted file mode 100644 index c5bf3560..00000000 --- a/dev/ocaml/Stdlib__Out_channel/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Out_channel (ocaml.Stdlib__Out_channel)

    Module Stdlib__Out_channel

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Parsing/index.html b/dev/ocaml/Stdlib__Parsing/index.html deleted file mode 100644 index a94b7a1e..00000000 --- a/dev/ocaml/Stdlib__Parsing/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Parsing (ocaml.Stdlib__Parsing)

    Module Stdlib__Parsing

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Pervasives/index.html b/dev/ocaml/Stdlib__Pervasives/index.html deleted file mode 100644 index 1ff6addd..00000000 --- a/dev/ocaml/Stdlib__Pervasives/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Pervasives (ocaml.Stdlib__Pervasives)

    Module Stdlib__Pervasives

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Printexc/index.html b/dev/ocaml/Stdlib__Printexc/index.html deleted file mode 100644 index 07f1ad65..00000000 --- a/dev/ocaml/Stdlib__Printexc/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Printexc (ocaml.Stdlib__Printexc)

    Module Stdlib__Printexc

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Printf/index.html b/dev/ocaml/Stdlib__Printf/index.html deleted file mode 100644 index 06835117..00000000 --- a/dev/ocaml/Stdlib__Printf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Printf (ocaml.Stdlib__Printf)

    Module Stdlib__Printf

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Queue/index.html b/dev/ocaml/Stdlib__Queue/index.html deleted file mode 100644 index 62c3e678..00000000 --- a/dev/ocaml/Stdlib__Queue/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Queue (ocaml.Stdlib__Queue)

    Module Stdlib__Queue

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Random/index.html b/dev/ocaml/Stdlib__Random/index.html deleted file mode 100644 index 3a733e52..00000000 --- a/dev/ocaml/Stdlib__Random/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Random (ocaml.Stdlib__Random)

    Module Stdlib__Random

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Result/index.html b/dev/ocaml/Stdlib__Result/index.html deleted file mode 100644 index a826de88..00000000 --- a/dev/ocaml/Stdlib__Result/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Result (ocaml.Stdlib__Result)

    Module Stdlib__Result

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Scanf/index.html b/dev/ocaml/Stdlib__Scanf/index.html deleted file mode 100644 index e1ffe518..00000000 --- a/dev/ocaml/Stdlib__Scanf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Scanf (ocaml.Stdlib__Scanf)

    Module Stdlib__Scanf

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Seq/index.html b/dev/ocaml/Stdlib__Seq/index.html deleted file mode 100644 index a5727d90..00000000 --- a/dev/ocaml/Stdlib__Seq/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Seq (ocaml.Stdlib__Seq)

    Module Stdlib__Seq

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Set/index.html b/dev/ocaml/Stdlib__Set/index.html deleted file mode 100644 index d72c6e22..00000000 --- a/dev/ocaml/Stdlib__Set/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Set (ocaml.Stdlib__Set)

    Module Stdlib__Set

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Stack/index.html b/dev/ocaml/Stdlib__Stack/index.html deleted file mode 100644 index 14228a3f..00000000 --- a/dev/ocaml/Stdlib__Stack/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Stack (ocaml.Stdlib__Stack)

    Module Stdlib__Stack

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__StdLabels/index.html b/dev/ocaml/Stdlib__StdLabels/index.html deleted file mode 100644 index 39f02e70..00000000 --- a/dev/ocaml/Stdlib__StdLabels/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__StdLabels (ocaml.Stdlib__StdLabels)

    Module Stdlib__StdLabels

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Stream/index.html b/dev/ocaml/Stdlib__Stream/index.html deleted file mode 100644 index f344f4d8..00000000 --- a/dev/ocaml/Stdlib__Stream/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Stream (ocaml.Stdlib__Stream)

    Module Stdlib__Stream

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__String/index.html b/dev/ocaml/Stdlib__String/index.html deleted file mode 100644 index 8a8e170f..00000000 --- a/dev/ocaml/Stdlib__String/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__String (ocaml.Stdlib__String)

    Module Stdlib__String

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__StringLabels/index.html b/dev/ocaml/Stdlib__StringLabels/index.html deleted file mode 100644 index 4674ad17..00000000 --- a/dev/ocaml/Stdlib__StringLabels/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__StringLabels (ocaml.Stdlib__StringLabels)

    Module Stdlib__StringLabels

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Sys/index.html b/dev/ocaml/Stdlib__Sys/index.html deleted file mode 100644 index f9a92fdd..00000000 --- a/dev/ocaml/Stdlib__Sys/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Sys (ocaml.Stdlib__Sys)

    Module Stdlib__Sys

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Uchar/index.html b/dev/ocaml/Stdlib__Uchar/index.html deleted file mode 100644 index 8a320442..00000000 --- a/dev/ocaml/Stdlib__Uchar/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Uchar (ocaml.Stdlib__Uchar)

    Module Stdlib__Uchar

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Unit/index.html b/dev/ocaml/Stdlib__Unit/index.html deleted file mode 100644 index dc5e3798..00000000 --- a/dev/ocaml/Stdlib__Unit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Unit (ocaml.Stdlib__Unit)

    Module Stdlib__Unit

    \ No newline at end of file diff --git a/dev/ocaml/Stdlib__Weak/index.html b/dev/ocaml/Stdlib__Weak/index.html deleted file mode 100644 index 134198f2..00000000 --- a/dev/ocaml/Stdlib__Weak/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Stdlib__Weak (ocaml.Stdlib__Weak)

    Module Stdlib__Weak

    \ No newline at end of file diff --git a/dev/ocaml/Str/index.html b/dev/ocaml/Str/index.html index 8c39ddd2..7ab76c14 100644 --- a/dev/ocaml/Str/index.html +++ b/dev/ocaml/Str/index.html @@ -1,4 +1,4 @@ -Str (ocaml.Str)

    Module Str

    Regular expressions and high-level string processing

    Regular expressions

    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 (ocaml.Str)

    Module Str

    Regular expressions and high-level string processing

    Regular expressions

    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.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/dev/ocaml/Strmatch/Make/argument-1-_/index.html b/dev/ocaml/Strmatch/Make/argument-1-_/index.html index a71ae259..2447180f 100644 --- a/dev/ocaml/Strmatch/Make/argument-1-_/index.html +++ b/dev/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/dev/ocaml/Strmatch/Make/index.html b/dev/ocaml/Strmatch/Make/index.html index 57c7a5d1..259817bf 100644 --- a/dev/ocaml/Strmatch/Make/index.html +++ b/dev/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/dev/ocaml/Strmatch/index.html b/dev/ocaml/Strmatch/index.html index 5ea66198..9714a2f2 100644 --- a/dev/ocaml/Strmatch/index.html +++ b/dev/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/dev/ocaml/Strmatch/module-type-I/index.html b/dev/ocaml/Strmatch/module-type-I/index.html index 8d8cc8cb..4ae1e3e3 100644 --- a/dev/ocaml/Strmatch/module-type-I/index.html +++ b/dev/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/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Map/index.html b/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Map/index.html index ee14f878..23bd4013 100644 --- a/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Set/index.html b/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Set/index.html index c6e7fd09..3af257d3 100644 --- a/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/T/index.html b/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/T/index.html index de2abc8d..95794659 100644 --- a/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/T/index.html +++ b/dev/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/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html b/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html index c39ab478..87202e55 100644 --- a/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/index.html b/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/index.html index 86f95e79..4d5d166f 100644 --- a/dev/ocaml/Strongly_connected_components/Make/argument-1-Id/index.html +++ b/dev/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/dev/ocaml/Strongly_connected_components/Make/index.html b/dev/ocaml/Strongly_connected_components/Make/index.html index 22ef4726..3e9cb624 100644 --- a/dev/ocaml/Strongly_connected_components/Make/index.html +++ b/dev/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/dev/ocaml/Strongly_connected_components/index.html b/dev/ocaml/Strongly_connected_components/index.html index 7bb685af..1d5382cb 100644 --- a/dev/ocaml/Strongly_connected_components/index.html +++ b/dev/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/dev/ocaml/Strongly_connected_components/module-type-S/Id/Map/index.html b/dev/ocaml/Strongly_connected_components/module-type-S/Id/Map/index.html index e43cf323..31d5b00b 100644 --- a/dev/ocaml/Strongly_connected_components/module-type-S/Id/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Strongly_connected_components/module-type-S/Id/Set/index.html b/dev/ocaml/Strongly_connected_components/module-type-S/Id/Set/index.html index 53f63fbc..5e36d006 100644 --- a/dev/ocaml/Strongly_connected_components/module-type-S/Id/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Strongly_connected_components/module-type-S/Id/T/index.html b/dev/ocaml/Strongly_connected_components/module-type-S/Id/T/index.html index 5dc90183..e1e04949 100644 --- a/dev/ocaml/Strongly_connected_components/module-type-S/Id/T/index.html +++ b/dev/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/dev/ocaml/Strongly_connected_components/module-type-S/Id/Tbl/index.html b/dev/ocaml/Strongly_connected_components/module-type-S/Id/Tbl/index.html index a47e3c9a..c909ca54 100644 --- a/dev/ocaml/Strongly_connected_components/module-type-S/Id/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Strongly_connected_components/module-type-S/Id/index.html b/dev/ocaml/Strongly_connected_components/module-type-S/Id/index.html index e742e4cc..ae95d618 100644 --- a/dev/ocaml/Strongly_connected_components/module-type-S/Id/index.html +++ b/dev/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/dev/ocaml/Strongly_connected_components/module-type-S/index.html b/dev/ocaml/Strongly_connected_components/module-type-S/index.html index 1ca75135..a46f577e 100644 --- a/dev/ocaml/Strongly_connected_components/module-type-S/index.html +++ b/dev/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/dev/ocaml/Stypes/index.html b/dev/ocaml/Stypes/index.html index 439ac806..646c9a88 100644 --- a/dev/ocaml/Stypes/index.html +++ b/dev/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/dev/ocaml/Subst/Lazy/index.html b/dev/ocaml/Subst/Lazy/index.html index 999173ac..a4aa00d0 100644 --- a/dev/ocaml/Subst/Lazy/index.html +++ b/dev/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/dev/ocaml/Subst/index.html b/dev/ocaml/Subst/index.html index 5df7236f..8fdba677 100644 --- a/dev/ocaml/Subst/index.html +++ b/dev/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/dev/ocaml/Switch/CtxStore/argument-1-A/index.html b/dev/ocaml/Switch/CtxStore/argument-1-A/index.html index 50290fd3..129fb07b 100644 --- a/dev/ocaml/Switch/CtxStore/argument-1-A/index.html +++ b/dev/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/dev/ocaml/Switch/CtxStore/index.html b/dev/ocaml/Switch/CtxStore/index.html index 482162b1..fcc5148b 100644 --- a/dev/ocaml/Switch/CtxStore/index.html +++ b/dev/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/dev/ocaml/Switch/Make/argument-1-Arg/index.html b/dev/ocaml/Switch/Make/argument-1-Arg/index.html index 08690da7..2f630690 100644 --- a/dev/ocaml/Switch/Make/argument-1-Arg/index.html +++ b/dev/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/dev/ocaml/Switch/Make/index.html b/dev/ocaml/Switch/Make/index.html index ff5296b4..d21674bb 100644 --- a/dev/ocaml/Switch/Make/index.html +++ b/dev/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/dev/ocaml/Switch/Store/argument-1-A/index.html b/dev/ocaml/Switch/Store/argument-1-A/index.html index 31ed27a4..62d753ff 100644 --- a/dev/ocaml/Switch/Store/argument-1-A/index.html +++ b/dev/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/dev/ocaml/Switch/Store/index.html b/dev/ocaml/Switch/Store/index.html index 20b52a68..ea6f193b 100644 --- a/dev/ocaml/Switch/Store/index.html +++ b/dev/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/dev/ocaml/Switch/index.html b/dev/ocaml/Switch/index.html index 51769ce2..ae75789d 100644 --- a/dev/ocaml/Switch/index.html +++ b/dev/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/dev/ocaml/Switch/module-type-CtxStored/index.html b/dev/ocaml/Switch/module-type-CtxStored/index.html index 217aaf9c..71207e44 100644 --- a/dev/ocaml/Switch/module-type-CtxStored/index.html +++ b/dev/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/dev/ocaml/Switch/module-type-S/index.html b/dev/ocaml/Switch/module-type-S/index.html index 791d8714..977bd6ed 100644 --- a/dev/ocaml/Switch/module-type-S/index.html +++ b/dev/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/dev/ocaml/Switch/module-type-Stored/index.html b/dev/ocaml/Switch/module-type-Stored/index.html index b892a275..16ec3d7c 100644 --- a/dev/ocaml/Switch/module-type-Stored/index.html +++ b/dev/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/dev/ocaml/Symbol/Map/index.html b/dev/ocaml/Symbol/Map/index.html index 7faeb9a5..07ad9707 100644 --- a/dev/ocaml/Symbol/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Symbol/Set/index.html b/dev/ocaml/Symbol/Set/index.html index 663f523a..c4d21f09 100644 --- a/dev/ocaml/Symbol/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Symbol/T/index.html b/dev/ocaml/Symbol/T/index.html index 4cc43016..b13ad611 100644 --- a/dev/ocaml/Symbol/T/index.html +++ b/dev/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/dev/ocaml/Symbol/Tbl/index.html b/dev/ocaml/Symbol/Tbl/index.html index fdc165ce..8fba03c8 100644 --- a/dev/ocaml/Symbol/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Symbol/index.html b/dev/ocaml/Symbol/index.html index 7d4ef758..4a2f073e 100644 --- a/dev/ocaml/Symbol/index.html +++ b/dev/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/dev/ocaml/Symtable/index.html b/dev/ocaml/Symtable/index.html index 11196bc0..0fbea148 100644 --- a/dev/ocaml/Symtable/index.html +++ b/dev/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/dev/ocaml/Syntaxerr/index.html b/dev/ocaml/Syntaxerr/index.html index 0945b83d..5ec200bc 100644 --- a/dev/ocaml/Syntaxerr/index.html +++ b/dev/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
    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
    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/dev/ocaml/Tag/Map/index.html b/dev/ocaml/Tag/Map/index.html index 1a38ad78..a5465fb3 100644 --- a/dev/ocaml/Tag/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Tag/Set/index.html b/dev/ocaml/Tag/Set/index.html index 955c5d81..de37fab3 100644 --- a/dev/ocaml/Tag/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Tag/T/index.html b/dev/ocaml/Tag/T/index.html index 441690ae..1d9a9437 100644 --- a/dev/ocaml/Tag/T/index.html +++ b/dev/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/dev/ocaml/Tag/Tbl/index.html b/dev/ocaml/Tag/Tbl/index.html index 65302ca2..f0b55aa4 100644 --- a/dev/ocaml/Tag/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Tag/index.html b/dev/ocaml/Tag/index.html index c60027ec..6a3e0323 100644 --- a/dev/ocaml/Tag/index.html +++ b/dev/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/dev/ocaml/Targetint/index.html b/dev/ocaml/Targetint/index.html index d84e0efd..65769b10 100644 --- a/dev/ocaml/Targetint/index.html +++ b/dev/ocaml/Targetint/index.html @@ -1,3 +1,3 @@ -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

    Return the absolute value of its argument.

    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

    Return the absolute value of its argument.

    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/dev/ocaml/Tast_iterator/index.html b/dev/ocaml/Tast_iterator/index.html index cb8f0f16..38e5656f 100644 --- a/dev/ocaml/Tast_iterator/index.html +++ b/dev/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. binding_op : iterator -> Typedtree.binding_op -> unit;
    2. case : 'k. iterator -> 'k Typedtree.case -> unit;
    3. class_declaration : iterator -> Typedtree.class_declaration -> unit;
    4. class_description : iterator -> Typedtree.class_description -> unit;
    5. class_expr : iterator -> Typedtree.class_expr -> unit;
    6. class_field : iterator -> Typedtree.class_field -> unit;
    7. class_signature : iterator -> Typedtree.class_signature -> unit;
    8. class_structure : iterator -> Typedtree.class_structure -> unit;
    9. class_type : iterator -> Typedtree.class_type -> unit;
    10. class_type_declaration : iterator -> Typedtree.class_type_declaration -> unit;
    11. class_type_field : iterator -> Typedtree.class_type_field -> unit;
    12. env : iterator -> Env.t -> unit;
    13. expr : iterator -> Typedtree.expression -> unit;
    14. extension_constructor : iterator -> Typedtree.extension_constructor -> unit;
    15. module_binding : iterator -> Typedtree.module_binding -> unit;
    16. module_coercion : iterator -> Typedtree.module_coercion -> unit;
    17. module_declaration : iterator -> Typedtree.module_declaration -> unit;
    18. module_substitution : iterator -> Typedtree.module_substitution -> unit;
    19. module_expr : iterator -> Typedtree.module_expr -> unit;
    20. module_type : iterator -> Typedtree.module_type -> unit;
    21. 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. binding_op : iterator -> Typedtree.binding_op -> unit;
      2. case : 'k. iterator -> 'k Typedtree.case -> unit;
      3. class_declaration : iterator -> Typedtree.class_declaration -> unit;
      4. class_description : iterator -> Typedtree.class_description -> unit;
      5. class_expr : iterator -> Typedtree.class_expr -> unit;
      6. class_field : iterator -> Typedtree.class_field -> unit;
      7. class_signature : iterator -> Typedtree.class_signature -> unit;
      8. class_structure : iterator -> Typedtree.class_structure -> unit;
      9. class_type : iterator -> Typedtree.class_type -> unit;
      10. class_type_declaration : iterator -> Typedtree.class_type_declaration -> unit;
      11. class_type_field : iterator -> Typedtree.class_type_field -> unit;
      12. env : iterator -> Env.t -> unit;
      13. expr : iterator -> Typedtree.expression -> unit;
      14. extension_constructor : iterator -> Typedtree.extension_constructor -> unit;
      15. module_binding : iterator -> Typedtree.module_binding -> unit;
      16. module_coercion : iterator -> Typedtree.module_coercion -> unit;
      17. module_declaration : iterator -> Typedtree.module_declaration -> unit;
      18. module_substitution : iterator -> Typedtree.module_substitution -> unit;
      19. module_expr : iterator -> Typedtree.module_expr -> unit;
      20. module_type : iterator -> Typedtree.module_type -> unit;
      21. module_type_declaration : iterator -> Typedtree.module_type_declaration -> unit;
      22. package_type : iterator -> Typedtree.package_type -> unit;
      23. pat : 'k. iterator -> 'k Typedtree.general_pattern -> unit;
      24. row_field : iterator -> Typedtree.row_field -> unit;
      25. object_field : iterator -> Typedtree.object_field -> unit;
      26. open_declaration : iterator -> Typedtree.open_declaration -> unit;
      27. open_description : iterator -> Typedtree.open_description -> unit;
      28. signature : iterator -> Typedtree.signature -> unit;
      29. signature_item : iterator -> Typedtree.signature_item -> unit;
      30. structure : iterator -> Typedtree.structure -> unit;
      31. structure_item : iterator -> Typedtree.structure_item -> unit;
      32. typ : iterator -> Typedtree.core_type -> unit;
      33. type_declaration : iterator -> Typedtree.type_declaration -> unit;
      34. type_declarations : iterator -> (Asttypes.rec_flag * Typedtree.type_declaration list) -> unit;
      35. type_extension : iterator -> Typedtree.type_extension -> unit;
      36. type_exception : iterator -> Typedtree.type_exception -> unit;
      37. type_kind : iterator -> Typedtree.type_kind -> unit;
      38. value_binding : iterator -> Typedtree.value_binding -> unit;
      39. value_bindings : iterator -> (Asttypes.rec_flag * Typedtree.value_binding list) -> - unit;
      40. value_description : iterator -> Typedtree.value_description -> unit;
      41. with_constraint : iterator -> Typedtree.with_constraint -> unit;
      }
      val default_iterator : iterator
      \ No newline at end of file + unit;
    22. value_description : iterator -> Typedtree.value_description -> unit;
    23. with_constraint : iterator -> Typedtree.with_constraint -> unit;
    }
    val default_iterator : iterator
    diff --git a/dev/ocaml/Tast_mapper/index.html b/dev/ocaml/Tast_mapper/index.html index 453c3e61..bfc2a2c8 100644 --- a/dev/ocaml/Tast_mapper/index.html +++ b/dev/ocaml/Tast_mapper/index.html @@ -1,5 +1,5 @@ -Tast_mapper (ocaml.Tast_mapper)

    Module Tast_mapper

    A generic Typedtree mapper

    type mapper = {
    1. binding_op : mapper -> Typedtree.binding_op -> Typedtree.binding_op;
    2. case : 'k. mapper -> 'k Typedtree.case -> 'k Typedtree.case;
    3. 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/dev/ocaml/Terminfo/index.html b/dev/ocaml/Terminfo/index.html index f6835d97..fbb7fd49 100644 --- a/dev/ocaml/Terminfo/index.html +++ b/dev/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/dev/ocaml/Thread/index.html b/dev/ocaml/Thread/index.html index db56854a..20274fd8 100644 --- a/dev/ocaml/Thread/index.html +++ b/dev/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 program. 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.

    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 that can be raised by user code to initiate termination of the current thread. Compared to calling the Thread.exit function, raising the Thread.Exit exception will trigger Fun.finally finalizers and catch-all exception handlers. It is the recommended way to terminate threads prematurely.

    • since 4.14.0
    val exit : unit -> unit

    Terminate prematurely the currently executing thread.

    val kill : t -> unit

    This function was supposed to terminate prematurely the thread whose handle is given. It is not currently implemented due to problems with cleanup handlers on many POSIX 1003.1c implementations. It always raises the Invalid_argument exception.

    • deprecated Not implemented, do not use

    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_read : Unix.file_descr -> unit

    This function does nothing in the current implementation of the threading library and can be removed from all user programs.

    • deprecated This function no longer does anything
    val wait_write : Unix.file_descr -> unit

    This function does nothing in the current implementation of the threading library and can be removed from all user programs.

    • deprecated This function no longer does anything
    val wait_timed_read : Unix.file_descr -> float -> bool
    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.

    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 program. 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.

    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 that can be raised by user code to initiate termination of the current thread. Compared to calling the Thread.exit function, raising the Thread.Exit exception will trigger Fun.finally finalizers and catch-all exception handlers. It is the recommended way to terminate threads prematurely.

    • since 4.14.0
    val exit : unit -> unit

    Terminate prematurely the currently executing thread.

    val kill : t -> unit

    This function was supposed to terminate prematurely the thread whose handle is given. It is not currently implemented due to problems with cleanup handlers on many POSIX 1003.1c implementations. It always raises the Invalid_argument exception.

    • deprecated Not implemented, do not use

    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_read : Unix.file_descr -> unit

    This function does nothing in the current implementation of the threading library and can be removed from all user programs.

    • deprecated This function no longer does anything
    val wait_write : Unix.file_descr -> unit

    This function does nothing in the current implementation of the threading library and can be removed from all user programs.

    • deprecated This function no longer does anything
    val wait_timed_read : Unix.file_descr -> float -> bool
    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.

    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.

    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.

    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.

    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.

    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/dev/ocaml/ThreadUnix/index.html b/dev/ocaml/ThreadUnix/index.html index 3eac4b27..fd1a3ad1 100644 --- a/dev/ocaml/ThreadUnix/index.html +++ b/dev/ocaml/ThreadUnix/index.html @@ -1,5 +1,5 @@ -ThreadUnix (ocaml.ThreadUnix)

    Module ThreadUnix

    Thread-compatible system calls.

    • deprecated

      The functionality of this module has been merged back into the Unix module. Threaded programs can now call the functions from module Unix directly, and still get the correct behavior (block the calling thread, if required, but do not block all threads in the process).

    Process handling

    val execv : string -> string array -> unit
    val execve : string -> string array -> string array -> unit
    val execvp : string -> string array -> unit
    val wait : unit -> int * Unix.process_status
    val waitpid : Unix.wait_flag list -> int -> int * Unix.process_status
    val system : string -> Unix.process_status

    Basic input/output

    val read : Unix.file_descr -> bytes -> int -> int -> int
    val write : Unix.file_descr -> bytes -> int -> int -> int
    val write_substring : Unix.file_descr -> string -> int -> int -> int

    Input/output with timeout

    val timed_read : Unix.file_descr -> bytes -> int -> int -> float -> int
    val timed_write : Unix.file_descr -> bytes -> int -> int -> float -> int

    Behave as ThreadUnix.read and ThreadUnix.write, except that Unix_error(ETIMEDOUT,_,_) is raised if no data is available for reading or ready for writing after d seconds. The delay d is given in the fifth argument, in seconds.

    val timed_write_substring : +ThreadUnix (ocaml.ThreadUnix)

    Module ThreadUnix

    Thread-compatible system calls.

    • deprecated

      The functionality of this module has been merged back into the Unix module. Threaded programs can now call the functions from module Unix directly, and still get the correct behavior (block the calling thread, if required, but do not block all threads in the process).

    Process handling

    val execv : string -> string array -> unit
    val execve : string -> string array -> string array -> unit
    val execvp : string -> string array -> unit
    val wait : unit -> int * Unix.process_status
    val waitpid : Unix.wait_flag list -> int -> int * Unix.process_status
    val system : string -> Unix.process_status

    Basic input/output

    val read : Unix.file_descr -> bytes -> int -> int -> int
    val write : Unix.file_descr -> bytes -> int -> int -> int
    val write_substring : Unix.file_descr -> string -> int -> int -> int

    Input/output with timeout

    val timed_read : Unix.file_descr -> bytes -> int -> int -> float -> int
    val timed_write : Unix.file_descr -> bytes -> int -> int -> float -> int

    Behave as ThreadUnix.read and ThreadUnix.write, except that Unix_error(ETIMEDOUT,_,_) is raised if no data is available for reading or ready for writing after d seconds. The delay d is given in the fifth argument, in seconds.

    val timed_write_substring : Unix.file_descr -> string -> int -> @@ -10,13 +10,13 @@ Unix.file_descr list -> Unix.file_descr list -> float -> - Unix.file_descr list * Unix.file_descr list * Unix.file_descr list

    Pipes and redirections

    val pipe : ?cloexec:bool -> unit -> Unix.file_descr * Unix.file_descr
    val open_process_in : string -> in_channel
    val open_process_out : string -> out_channel
    val open_process : string -> in_channel * out_channel

    Time

    val sleep : int -> unit

    Sockets

    val socket : - ?cloexec:bool -> + Unix.file_descr list * Unix.file_descr list * Unix.file_descr list

    Pipes and redirections

    val pipe : ?cloexec:bool -> unit -> Unix.file_descr * Unix.file_descr
    val open_process_in : string -> in_channel
    val open_process_out : string -> out_channel
    val open_process : string -> in_channel * out_channel

    Time

    val sleep : int -> unit

    Sockets

    val socket : + ?cloexec:bool -> Unix.socket_domain -> Unix.socket_type -> int -> Unix.file_descr
    val accept : - ?cloexec:bool -> + ?cloexec:bool -> Unix.file_descr -> Unix.file_descr * Unix.sockaddr
    val connect : Unix.file_descr -> Unix.sockaddr -> unit
    val recv : Unix.file_descr -> bytes -> int -> int -> Unix.msg_flag list -> int
    val recvfrom : Unix.file_descr -> @@ -44,4 +44,4 @@ int -> Unix.msg_flag list -> Unix.sockaddr -> - int
    val open_connection : Unix.sockaddr -> in_channel * out_channel
    \ No newline at end of file + int
    val open_connection : Unix.sockaddr -> in_channel * out_channel
    diff --git a/dev/ocaml/Tmc/index.html b/dev/ocaml/Tmc/index.html index a753d5db..55e01df0 100644 --- a/dev/ocaml/Tmc/index.html +++ b/dev/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/dev/ocaml/Topcommon/index.html b/dev/ocaml/Topcommon/index.html index 27a4ccb8..4175cb6d 100644 --- a/dev/ocaml/Topcommon/index.html +++ b/dev/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/dev/ocaml/Topdirs/index.html b/dev/ocaml/Topdirs/index.html index 5f33f889..30d119b1 100644 --- a/dev/ocaml/Topdirs/index.html +++ b/dev/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
    type 'a printer_type_new = Stdlib.Format.formatter -> 'a -> unit
    type 'a printer_type_old = 'a -> unit
    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
    type 'a printer_type_new = Stdlib.Format.formatter -> 'a -> unit
    type 'a printer_type_old = 'a -> unit
    val load_file : Stdlib.Format.formatter -> string -> bool
    • deprecated
    diff --git a/dev/ocaml/Topeval/index.html b/dev/ocaml/Topeval/index.html index 34992e32..015b280e 100644 --- a/dev/ocaml/Topeval/index.html +++ b/dev/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/dev/ocaml/Tophooks/index.html b/dev/ocaml/Tophooks/index.html index 35f1ee7d..5f1aa46c 100644 --- a/dev/ocaml/Tophooks/index.html +++ b/dev/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/dev/ocaml/Toploop/index.html b/dev/ocaml/Toploop/index.html index d2cc960c..24f7387e 100644 --- a/dev/ocaml/Toploop/index.html +++ b/dev/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 : 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 : 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/dev/ocaml/Topmain/index.html b/dev/ocaml/Topmain/index.html index 67f18f03..189180ac 100644 --- a/dev/ocaml/Topmain/index.html +++ b/dev/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/dev/ocaml/Topstart/index.html b/dev/ocaml/Topstart/index.html index 8779e892..6b24c4e8 100644 --- a/dev/ocaml/Topstart/index.html +++ b/dev/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/dev/ocaml/Trace/index.html b/dev/ocaml/Trace/index.html index 1a946825..02018fab 100644 --- a/dev/ocaml/Trace/index.html +++ b/dev/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/dev/ocaml/Translattribute/index.html b/dev/ocaml/Translattribute/index.html index 8fc6f856..0b5a1941 100644 --- a/dev/ocaml/Translattribute/index.html +++ b/dev/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/dev/ocaml/Translclass/index.html b/dev/ocaml/Translclass/index.html index a346e6a0..5e3f9506 100644 --- a/dev/ocaml/Translclass/index.html +++ b/dev/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/dev/ocaml/Translcore/index.html b/dev/ocaml/Translcore/index.html index 9b7c8fa3..7b646a48 100644 --- a/dev/ocaml/Translcore/index.html +++ b/dev/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/dev/ocaml/Translmod/index.html b/dev/ocaml/Translmod/index.html index 9c62ecdd..36242184 100644 --- a/dev/ocaml/Translmod/index.html +++ b/dev/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/dev/ocaml/Translobj/index.html b/dev/ocaml/Translobj/index.html index be46a968..653dc973 100644 --- a/dev/ocaml/Translobj/index.html +++ b/dev/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/dev/ocaml/Translprim/index.html b/dev/ocaml/Translprim/index.html index f88df1fc..8162e444 100644 --- a/dev/ocaml/Translprim/index.html +++ b/dev/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/dev/ocaml/Traverse_for_exported_symbols/index.html b/dev/ocaml/Traverse_for_exported_symbols/index.html index 7d8d25c5..891d16bb 100644 --- a/dev/ocaml/Traverse_for_exported_symbols/index.html +++ b/dev/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/dev/ocaml/Type_immediacy/Violation/index.html b/dev/ocaml/Type_immediacy/Violation/index.html index 7c625ee8..c645c931 100644 --- a/dev/ocaml/Type_immediacy/Violation/index.html +++ b/dev/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/dev/ocaml/Type_immediacy/index.html b/dev/ocaml/Type_immediacy/index.html index bf0fd1e6..9a6732e7 100644 --- a/dev/ocaml/Type_immediacy/index.html +++ b/dev/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/dev/ocaml/Typeclass/index.html b/dev/ocaml/Typeclass/index.html index d593ad06..4cc3e5b7 100644 --- a/dev/ocaml/Typeclass/index.html +++ b/dev/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_typesharp_id : Ident.t;
    9. cls_abbr : Types.type_declaration;
    10. cls_arity : int;
    11. cls_pub_methods : string list;
    12. 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_typesharp_id : Ident.t;
    7. clsty_abbr : Types.type_declaration;
    8. 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_typesharp_id : Ident.t;
    9. cls_abbr : Types.type_declaration;
    10. cls_arity : int;
    11. cls_pub_methods : string list;
    12. 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_typesharp_id : Ident.t;
    7. clsty_abbr : Types.type_declaration;
    8. clsty_info : Typedtree.class_type_declaration;
    }
    val class_descriptions : @@ -16,8 +16,8 @@ * Types.type_expr * bool * string * Types.type_expr
  • | Non_generalizable_class of Ident.t * Types.class_declaration
  • | 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/dev/ocaml/Typecore/Datatype_kind/index.html b/dev/ocaml/Typecore/Datatype_kind/index.html index bd067249..58f32cfd 100644 --- a/dev/ocaml/Typecore/Datatype_kind/index.html +++ b/dev/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/dev/ocaml/Typecore/index.html b/dev/ocaml/Typecore/index.html index 43b4d9a2..d5c125f4 100644 --- a/dev/ocaml/Typecore/index.html +++ b/dev/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

      *)
    val type_binding : Env.t -> @@ -24,13 +24,13 @@ Env.t -> Parsetree.pattern -> Typedtree.pattern * pattern_variable list
    val check_partial : - ?lev:int -> + ?lev:int -> 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 -> @@ -51,16 +51,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) @@ -79,4 +79,4 @@ Env.t -> Ident.t list -> Typedtree.class_expr list -> - unit
    \ No newline at end of file + unit
    diff --git a/dev/ocaml/Typedecl/index.html b/dev/ocaml/Typedecl/index.html index e9ff2609..854e44fe 100644 --- a/dev/ocaml/Typedecl/index.html +++ b/dev/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 error =
    1. | Repeated_parameter
    2. | Duplicate_constructor of string
    3. | Too_many_constructors
    4. | Duplicate_label of string
    5. | Recursive_abbrev of string
    6. | Cycle_in_def of string * Types.type_expr
    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. expansions : (Types.type_expr * Types.type_expr) list;
      }
    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. expansions : (Types.type_expr * Types.type_expr) list;
    }
  • | 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/dev/ocaml/Typedecl_immediacy/index.html b/dev/ocaml/Typedecl_immediacy/index.html index f480062b..95273fda 100644 --- a/dev/ocaml/Typedecl_immediacy/index.html +++ b/dev/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/dev/ocaml/Typedecl_properties/index.html b/dev/ocaml/Typedecl_properties/index.html index 41ae7e78..9b498ea4 100644 --- a/dev/ocaml/Typedecl_properties/index.html +++ b/dev/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/dev/ocaml/Typedecl_separability/index.html b/dev/ocaml/Typedecl_separability/index.html index 2d680d9e..66a80bf6 100644 --- a/dev/ocaml/Typedecl_separability/index.html +++ b/dev/ocaml/Typedecl_separability/index.html @@ -1,7 +1,7 @@ -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]
    +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/dev/ocaml/Typedecl_unboxed/index.html b/dev/ocaml/Typedecl_unboxed/index.html index 52093db2..9587c8d3 100644 --- a/dev/ocaml/Typedecl_unboxed/index.html +++ b/dev/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/dev/ocaml/Typedecl_variance/index.html b/dev/ocaml/Typedecl_variance/index.html index 40aa3777..ce469137 100644 --- a/dev/ocaml/Typedecl_variance/index.html +++ b/dev/ocaml/Typedecl_variance/index.html @@ -1,12 +1,12 @@ -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_error =
    1. | Variance_not_satisfied of int
    2. | No_variable
    3. | Variance_not_reflected
    4. | Variance_not_deducible
    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 -> Types.type_declaration -> Typedtree.extension_constructor -> (req * Location.t) -> - unit
    val compute_decl : Env.t -> check:bool -> Types.type_declaration -> req -> prop
    val update_decls : + unit
    val compute_decl : Env.t -> check:bool -> Types.type_declaration -> req -> prop
    \ No newline at end of file + list
    diff --git a/dev/ocaml/Typedtree/index.html b/dev/ocaml/Typedtree/index.html index 8bf1b6f5..9d024b08 100644 --- a/dev/ocaml/Typedtree/index.html +++ b/dev/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, _, _) :: ...

        *)
      and 'k pattern_desc =
      1. | Tpat_any : value pattern_desc
        (*

        _

        *)
      2. | Tpat_var : Ident.t * string Asttypes.loc -> value pattern_desc
        (*

        x

        *)
      3. | Tpat_alias : value general_pattern @@ -77,4 +77,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.

      \ No newline at end of file + pattern option * pattern option

      Splits an or pattern into its value (left) and exception (right) parts.

    diff --git a/dev/ocaml/Typemod/Sig_component_kind/index.html b/dev/ocaml/Typemod/Sig_component_kind/index.html index 076842d1..3fe86084 100644 --- a/dev/ocaml/Typemod/Sig_component_kind/index.html +++ b/dev/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/dev/ocaml/Typemod/Signature_names/index.html b/dev/ocaml/Typemod/Signature_names/index.html index 68bd5c35..e5e53dd8 100644 --- a/dev/ocaml/Typemod/Signature_names/index.html +++ b/dev/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/dev/ocaml/Typemod/index.html b/dev/ocaml/Typemod/index.html index 2d3bb3f1..1d5fbe40 100644 --- a/dev/ocaml/Typemod/index.html +++ b/dev/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,10 +32,10 @@ string -> string -> Typedtree.module_coercion
    val initial_env : - loc:Location.t -> - safe_string:bool -> - initially_opened_module:string option -> - open_implicit_modules:string list -> + loc:Location.t -> + safe_string:bool -> + 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 Types.type_expr
    13. | Non_generalizable_module of 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 Types.type_expr
  • | Non_generalizable_module of 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/dev/ocaml/Typeopt/index.html b/dev/ocaml/Typeopt/index.html index 82bcbd33..88357d70 100644 --- a/dev/ocaml/Typeopt/index.html +++ b/dev/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/dev/ocaml/Types/MethSet/index.html b/dev/ocaml/Types/MethSet/index.html index 530572c4..8653c42e 100644 --- a/dev/ocaml/Types/MethSet/index.html +++ b/dev/ocaml/Types/MethSet/index.html @@ -1,3 +1,3 @@ -MethSet (ocaml.Types.MethSet)

    Module Types.MethSet

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Types/Meths/index.html b/dev/ocaml/Types/Meths/index.html index 9ffa28d5..08e80f41 100644 --- a/dev/ocaml/Types/Meths/index.html +++ b/dev/ocaml/Types/Meths/index.html @@ -1,8 +1,8 @@ -Meths (ocaml.Types.Meths)

    Module Types.Meths

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Types/Separability/index.html b/dev/ocaml/Types/Separability/index.html index 1716fe9a..bb00f075 100644 --- a/dev/ocaml/Types/Separability/index.html +++ b/dev/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/dev/ocaml/Types/TransientTypeOps/index.html b/dev/ocaml/Types/TransientTypeOps/index.html index c2359a83..00f8e1a3 100644 --- a/dev/ocaml/Types/TransientTypeOps/index.html +++ b/dev/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/dev/ocaml/Types/Transient_expr/index.html b/dev/ocaml/Types/Transient_expr/index.html index e9721db5..040883f8 100644 --- a/dev/ocaml/Types/Transient_expr/index.html +++ b/dev/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/dev/ocaml/Types/VarSet/index.html b/dev/ocaml/Types/VarSet/index.html index b8faa319..b915c4d1 100644 --- a/dev/ocaml/Types/VarSet/index.html +++ b/dev/ocaml/Types/VarSet/index.html @@ -1,3 +1,3 @@ -VarSet (ocaml.Types.VarSet)

    Module Types.VarSet

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 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.0
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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
    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.0

    Iterators

    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/dev/ocaml/Types/Variance/index.html b/dev/ocaml/Types/Variance/index.html index d8da1c25..9ccdc5f8 100644 --- a/dev/ocaml/Types/Variance/index.html +++ b/dev/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 -> bool -> t -> t
    val mem : f -> t -> bool
    val conjugate : t -> t
    val get_upper : t -> bool * bool
    val get_lower : t -> bool * 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 -> bool -> t -> t
    val mem : f -> t -> bool
    val conjugate : t -> t
    val get_upper : t -> bool * bool
    val get_lower : t -> bool * bool * bool * bool
    val unknown_signature : injective:bool -> arity:int -> t list

    The most pessimistic variance for a completely unknown type.

    diff --git a/dev/ocaml/Types/Vars/index.html b/dev/ocaml/Types/Vars/index.html index 9948b5c7..08ad5b67 100644 --- a/dev/ocaml/Types/Vars/index.html +++ b/dev/ocaml/Types/Vars/index.html @@ -1,8 +1,8 @@ -Vars (ocaml.Types.Vars)

    Module Types.Vars

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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

    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Types/index.html b/dev/ocaml/Types/index.html index 586c77f9..e0ee338e 100644 --- a/dev/ocaml/Types/index.html +++ b/dev/ocaml/Types/index.html @@ -1,26 +1,26 @@ -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 +31,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/dev/ocaml/Typetexp/index.html b/dev/ocaml/Typetexp/index.html index 21e18689..695f577e 100644 --- a/dev/ocaml/Typetexp/index.html +++ b/dev/ocaml/Typetexp/index.html @@ -1,5 +1,5 @@ -Typetexp (ocaml.Typetexp)

    Module Typetexp

    val valid_tyvar_name : string -> bool
    type poly_univars
    val make_poly_univars : string list -> poly_univars
    val check_poly_univars : +Typetexp (ocaml.Typetexp)

    Module Typetexp

    val valid_tyvar_name : string -> bool
    type poly_univars
    val make_poly_univars : string list -> poly_univars
    val check_poly_univars : Env.t -> Location.t -> poly_univars -> @@ -9,7 +9,7 @@ poly_univars -> Types.type_expr list
    val transl_simple_type : Env.t -> - ?univars:poly_univars -> + ?univars:poly_univars -> bool -> Parsetree.core_type -> Typedtree.core_type
    val transl_simple_type_univars : @@ -24,4 +24,4 @@ Location.t -> Env.t -> Parsetree.package_type -> - (Longident.t Asttypes.loc * Parsetree.core_type) list * Parsetree.module_type
    \ No newline at end of file + (Longident.t Asttypes.loc * Parsetree.core_type) list * Parsetree.module_type
    diff --git a/dev/ocaml/Un_anf/index.html b/dev/ocaml/Un_anf/index.html index da5d65b1..0eb06fa1 100644 --- a/dev/ocaml/Un_anf/index.html +++ b/dev/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/dev/ocaml/Unbox_closures/index.html b/dev/ocaml/Unbox_closures/index.html index 9ca34d07..7c161889 100644 --- a/dev/ocaml/Unbox_closures/index.html +++ b/dev/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/dev/ocaml/Unbox_free_vars_of_closures/index.html b/dev/ocaml/Unbox_free_vars_of_closures/index.html index c3b52465..36966f5b 100644 --- a/dev/ocaml/Unbox_free_vars_of_closures/index.html +++ b/dev/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/dev/ocaml/Unbox_specialised_args/index.html b/dev/ocaml/Unbox_specialised_args/index.html index 25a0ee34..948585c5 100644 --- a/dev/ocaml/Unbox_specialised_args/index.html +++ b/dev/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/dev/ocaml/Unix/LargeFile/index.html b/dev/ocaml/Unix/LargeFile/index.html index 8cb7c967..28a39dc3 100644 --- a/dev/ocaml/Unix/LargeFile/index.html +++ b/dev/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/dev/ocaml/Unix/index.html b/dev/ocaml/Unix/index.html index 21df7e0d..adcb8cd0 100644 --- a/dev/ocaml/Unix/index.html +++ b/dev/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.0 (4.12.0 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.0
    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.

    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.

    • 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.0
    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.0 (4.12.0 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.0
    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.0

    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.0 (4.12.0 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.0
    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.

    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.

    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.0
    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.0 (4.12.0 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.0
    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.0

    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.

    Genarray.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. Genarray.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.0

    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.0

    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 : int -> int

    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.

    Genarray.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. Genarray.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.0

    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.0

    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 : int -> int

    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_in : string -> string array -> in_channel

    open_process_args_in prog args runs the program prog with arguments args. The new process executes concurrently with the current process. The standard output of the new process is redirected to a pipe, which can be read via the returned input channel.

    The executable file prog is searched 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.0
    val open_process_args_out : string -> string array -> out_channel

    Same as open_process_args_in, but redirect the standard input of the new process to a pipe. Data written to the returned output channel is sent to the standard 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.

    • since 4.08.0
    val open_process_args : string -> string array -> in_channel * out_channel

    Same as open_process_args_out, but redirects both the standard input and standard output of the new process to pipes connected to the two returned channels. The input channel is connected to the output of the program, and the output channel to the input of the program.

    • since 4.08.0
    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.0
    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.0 (4.12.0 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.0 (4.12.0 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.0 (4.12.0 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.0 (4.12.0 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.0

    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.0

    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.0 (4.12.0 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.0 (4.12.0 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.0

    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.0

    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.

    • raises Invalid_argument

      on Windows

    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.

    • raises Invalid_argument

      on Windows

    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/dev/ocaml/UnixLabels/LargeFile/index.html b/dev/ocaml/UnixLabels/LargeFile/index.html index 9e431842..5a5197e4 100644 --- a/dev/ocaml/UnixLabels/LargeFile/index.html +++ b/dev/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/dev/ocaml/UnixLabels/index.html b/dev/ocaml/UnixLabels/index.html index 2839de81..22cd7ae9 100644 --- a/dev/ocaml/UnixLabels/index.html +++ b/dev/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.0
    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.0
    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.

    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.

    • 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.0
    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.0
    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.0
    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.0
    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.0
    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.

    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.

    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.0
    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.0
    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.0
    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.0

    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.0

    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.

    Genarray.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. Genarray.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.0

    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.0

    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 : int -> int

    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.

    Genarray.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. Genarray.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.0

    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.0

    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 : int -> int

    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 forks 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_in : string -> string array -> in_channel

    open_process_args_in prog args runs the program prog with arguments args. The new process executes concurrently with the current process. The standard output of the new process is redirected to a pipe, which can be read via the returned input channel.

    The executable file prog is searched 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.0
    val open_process_args_out : string -> string array -> out_channel

    Same as open_process_args_in, but redirect the standard input of the new process to a pipe. Data written to the returned output channel is sent to the standard 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.

    • since 4.08.0
    val open_process_args : string -> string array -> in_channel * out_channel

    Same as open_process_args_out, but redirects both the standard input and standard output of the new process to pipes connected to the two returned channels. The input channel is connected to the output of the program, and the output channel to the input of the program.

    • since 4.08.0
    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.0
    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.0
    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.0
    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.0
    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.0
    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.0

    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.0
    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.0

    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.0
    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.0

    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.0

    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.

    • raises Invalid_argument

      on Windows

    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.

    • raises Invalid_argument

      on Windows

    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.0
    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.0

    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.

      *)
    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/dev/ocaml/Untypeast/index.html b/dev/ocaml/Untypeast/index.html index 2350f4c2..8c30907d 100644 --- a/dev/ocaml/Untypeast/index.html +++ b/dev/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/dev/ocaml/Var_within_closure/Map/index.html b/dev/ocaml/Var_within_closure/Map/index.html index c2c10dbd..d5cd2f75 100644 --- a/dev/ocaml/Var_within_closure/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Var_within_closure/Set/index.html b/dev/ocaml/Var_within_closure/Set/index.html index 92ce8b40..6b345e2c 100644 --- a/dev/ocaml/Var_within_closure/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Var_within_closure/T/index.html b/dev/ocaml/Var_within_closure/T/index.html index 9f870308..ca56bbf0 100644 --- a/dev/ocaml/Var_within_closure/T/index.html +++ b/dev/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/dev/ocaml/Var_within_closure/Tbl/index.html b/dev/ocaml/Var_within_closure/Tbl/index.html index 275738e0..df2be4c5 100644 --- a/dev/ocaml/Var_within_closure/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Var_within_closure/index.html b/dev/ocaml/Var_within_closure/index.html index 772d4d3d..5a45d22f 100644 --- a/dev/ocaml/Var_within_closure/index.html +++ b/dev/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/dev/ocaml/Variable/Map/index.html b/dev/ocaml/Variable/Map/index.html index 5f4ca99a..eb77e63a 100644 --- a/dev/ocaml/Variable/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Variable/Pair/Map/index.html b/dev/ocaml/Variable/Pair/Map/index.html index 7fad4ad9..969a87f7 100644 --- a/dev/ocaml/Variable/Pair/Map/index.html +++ b/dev/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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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
    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 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 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 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.0
    val singleton : key -> 'a -> 'a t

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

    • since 3.12.0
    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.0
    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.0
    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 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 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 -> 'b -> 'b) -> 'a t -> 'b -> 'b

    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.

    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.0
    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.0
    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.0
    • 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.0
    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.0
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12.0
    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 Stdlib.Map.Make.

    • since 3.12.0
    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.0
    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.0
    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.0
    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
    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.0
    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
    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.

    Maps and Sequences

    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/dev/ocaml/Variable/Pair/Set/index.html b/dev/ocaml/Variable/Pair/Set/index.html index 86f374ac..f4d19840 100644 --- a/dev/ocaml/Variable/Pair/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Variable/Pair/T/index.html b/dev/ocaml/Variable/Pair/T/index.html index 9bb27823..c30c6113 100644 --- a/dev/ocaml/Variable/Pair/T/index.html +++ b/dev/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/dev/ocaml/Variable/Pair/Tbl/index.html b/dev/ocaml/Variable/Pair/Tbl/index.html index 63c3360d..b30fbd13 100644 --- a/dev/ocaml/Variable/Pair/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Variable/Pair/index.html b/dev/ocaml/Variable/Pair/index.html index 490c111f..cd74751b 100644 --- a/dev/ocaml/Variable/Pair/index.html +++ b/dev/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/dev/ocaml/Variable/Set/index.html b/dev/ocaml/Variable/Set/index.html index 13d86368..d086704b 100644 --- a/dev/ocaml/Variable/Set/index.html +++ b/dev/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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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
    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    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 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.0
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    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 -> 'a -> 'a) -> t -> 'a -> 'a

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    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.

    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.0
    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 cardinal : t -> int

    Return the number of elements of a set.

    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 Stdlib.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
    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.

    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.0
    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

    Iterators

    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/dev/ocaml/Variable/T/index.html b/dev/ocaml/Variable/T/index.html index 8d836537..56511f83 100644 --- a/dev/ocaml/Variable/T/index.html +++ b/dev/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/dev/ocaml/Variable/Tbl/index.html b/dev/ocaml/Variable/Tbl/index.html index 1a2a9ff4..dc947587 100644 --- a/dev/ocaml/Variable/Tbl/index.html +++ b/dev/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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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.0
    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.0
    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.0
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00.0
    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/dev/ocaml/Variable/index.html b/dev/ocaml/Variable/index.html index 82bff000..fb7dac9f 100644 --- a/dev/ocaml/Variable/index.html +++ b/dev/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/dev/ocaml/Warnings/index.html b/dev/ocaml/Warnings/index.html index 01f78ed9..eca5f48f 100644 --- a/dev/ocaml/Warnings/index.html +++ b/dev/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;
    }
    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. | Module_linked_twice of string * string * string
    31. | Unused_value_declaration of string
    32. | Unused_open of string
    33. | Unused_type_declaration of string
    34. | Unused_for_index of string
    35. | Unused_ancestor of string
    36. | Unused_constructor of string * constructor_usage_warning
    37. | Unused_extension of string * bool * constructor_usage_warning
    38. | Unused_rec_flag
    39. | Name_out_of_scope of string * string list * bool
    40. | Ambiguous_name of string list * string list * bool * string
    41. | Disambiguated_name of string
    42. | Nonoptional_label of string
    43. | Open_shadow_identifier of string * string
    44. | Open_shadow_label_constructor of string * string
    45. | Bad_env_variable of string * string
    46. | Attribute_payload of string * string
    47. | Eliminated_optional_arguments of string list
    48. | No_cmi_file of string * string option
    49. | Unexpected_docstring of bool
    50. | Wrong_tailcall_expectation of bool
    51. | Fragile_literal_pattern
    52. | Misplaced_attribute of string
    53. | Duplicated_attribute of string
    54. | Inlining_impossible of string
    55. | Unreachable_case
    56. | Ambiguous_var_in_pattern_guard of string list
    57. | No_cmx_file of string
    58. | Flambda_assignment_to_non_mutable_value
    59. | Unused_module of string
    60. | Unboxable_type_in_prim_decl of string
    61. | Constraint_on_gadt
    62. | Erroneous_printed_signature of string
    63. | Unsafe_array_syntax_without_parsing
    64. | Redefining_unit of string
    65. | Unused_open_bang of string
    66. | Unused_functor_parameter of string
    67. | Match_on_mutable_state_prevent_uncurry
    68. | Unused_field of string * field_usage_warning
    69. | Missing_mli
    70. | Unused_tmc_attribute
    71. | Tmc_breaks_tailcall
    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;
    }
    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;
    }
    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. | Module_linked_twice of string * string * string
    31. | Unused_value_declaration of string
    32. | Unused_open of string
    33. | Unused_type_declaration of string
    34. | Unused_for_index of string
    35. | Unused_ancestor of string
    36. | Unused_constructor of string * constructor_usage_warning
    37. | Unused_extension of string * bool * constructor_usage_warning
    38. | Unused_rec_flag
    39. | Name_out_of_scope of string * string list * bool
    40. | Ambiguous_name of string list * string list * bool * string
    41. | Disambiguated_name of string
    42. | Nonoptional_label of string
    43. | Open_shadow_identifier of string * string
    44. | Open_shadow_label_constructor of string * string
    45. | Bad_env_variable of string * string
    46. | Attribute_payload of string * string
    47. | Eliminated_optional_arguments of string list
    48. | No_cmi_file of string * string option
    49. | Unexpected_docstring of bool
    50. | Wrong_tailcall_expectation of bool
    51. | Fragile_literal_pattern
    52. | Misplaced_attribute of string
    53. | Duplicated_attribute of string
    54. | Inlining_impossible of string
    55. | Unreachable_case
    56. | Ambiguous_var_in_pattern_guard of string list
    57. | No_cmx_file of string
    58. | Flambda_assignment_to_non_mutable_value
    59. | Unused_module of string
    60. | Unboxable_type_in_prim_decl of string
    61. | Constraint_on_gadt
    62. | Erroneous_printed_signature of string
    63. | Unsafe_array_syntax_without_parsing
    64. | Redefining_unit of string
    65. | Unused_open_bang of string
    66. | Unused_functor_parameter of string
    67. | Match_on_mutable_state_prevent_uncurry
    68. | Unused_field of string * field_usage_warning
    69. | Missing_mli
    70. | Unused_tmc_attribute
    71. | Tmc_breaks_tailcall
    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;
    }
    val descriptions : description list
    diff --git a/dev/ocaml/X86_ast/index.html b/dev/ocaml/X86_ast/index.html index 149fcc5b..64aa6caf 100644 --- a/dev/ocaml/X86_ast/index.html +++ b/dev/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 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. | COMISD of arg * arg
    11. | CQO
    12. | CVTSD2SI of arg * arg
    13. | CVTSD2SS of arg * arg
    14. | CVTSI2SD of arg * arg
    15. | CVTSS2SD of arg * arg
    16. | CVTTSD2SI of arg * arg
    17. | DEC of arg
    18. | DIVSD of arg * arg
    19. | FABS
    20. | FADD of arg
    21. | FADDP of arg * arg
    22. | FCHS
    23. | FCOMP of arg
    24. | FCOMPP
    25. | FCOS
    26. | FDIV of arg
    27. | FDIVP of arg * arg
    28. | FDIVR of arg
    29. | FDIVRP of arg * arg
    30. | FILD of arg
    31. | FISTP of arg
    32. | FLD of arg
    33. | FLD1
    34. | FLDCW of arg
    35. | FLDLG2
    36. | FLDLN2
    37. | FLDZ
    38. | FMUL of arg
    39. | FMULP of arg * arg
    40. | FNSTCW of arg
    41. | FNSTSW of arg
    42. | FPATAN
    43. | FPTAN
    44. | FSIN
    45. | FSQRT
    46. | FSTP of arg
    47. | FSUB of arg
    48. | FSUBP of arg * arg
    49. | FSUBR of arg
    50. | FSUBRP of arg * arg
    51. | FXCH of arg
    52. | FYL2X
    53. | HLT
    54. | IDIV of arg
    55. | IMUL of arg * arg option
    56. | INC of arg
    57. | J of condition * arg
    58. | JMP of arg
    59. | LEA of arg * arg
    60. | LEAVE
    61. | MOV of arg * arg
    62. | MOVAPD of arg * arg
    63. | MOVLPD of arg * arg
    64. | MOVSD of arg * arg
    65. | MOVSS of arg * arg
    66. | MOVSX of arg * arg
    67. | MOVSXD of arg * arg
    68. | MOVZX of arg * arg
    69. | MULSD of arg * arg
    70. | NEG of arg
    71. | NOP
    72. | OR of arg * arg
    73. | POP of arg
    74. | PUSH of arg
    75. | RET
    76. | ROUNDSD of rounding * arg * arg
    77. | SAL of arg * arg
    78. | SAR of arg * arg
    79. | SET of condition * arg
    80. | SHR of arg * arg
    81. | SQRTSD of arg * arg
    82. | SUB of arg * arg
    83. | SUBSD of arg * arg
    84. | TEST of arg * arg
    85. | UCOMISD of arg * arg
    86. | XCHG of arg * arg
    87. | XOR of arg * arg
    88. | 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. | File of int * string
    20. | Indirect_symbol of string
    21. | Loc of int * int * int
    22. | Private_extern of string
    23. | Set of string * constant
    24. | Size of string * constant
    25. | 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 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. | COMISD of arg * arg
    11. | CQO
    12. | CVTSD2SI of arg * arg
    13. | CVTSD2SS of arg * arg
    14. | CVTSI2SD of arg * arg
    15. | CVTSS2SD of arg * arg
    16. | CVTTSD2SI of arg * arg
    17. | DEC of arg
    18. | DIVSD of arg * arg
    19. | FABS
    20. | FADD of arg
    21. | FADDP of arg * arg
    22. | FCHS
    23. | FCOMP of arg
    24. | FCOMPP
    25. | FCOS
    26. | FDIV of arg
    27. | FDIVP of arg * arg
    28. | FDIVR of arg
    29. | FDIVRP of arg * arg
    30. | FILD of arg
    31. | FISTP of arg
    32. | FLD of arg
    33. | FLD1
    34. | FLDCW of arg
    35. | FLDLG2
    36. | FLDLN2
    37. | FLDZ
    38. | FMUL of arg
    39. | FMULP of arg * arg
    40. | FNSTCW of arg
    41. | FNSTSW of arg
    42. | FPATAN
    43. | FPTAN
    44. | FSIN
    45. | FSQRT
    46. | FSTP of arg
    47. | FSUB of arg
    48. | FSUBP of arg * arg
    49. | FSUBR of arg
    50. | FSUBRP of arg * arg
    51. | FXCH of arg
    52. | FYL2X
    53. | HLT
    54. | IDIV of arg
    55. | IMUL of arg * arg option
    56. | INC of arg
    57. | J of condition * arg
    58. | JMP of arg
    59. | LEA of arg * arg
    60. | LEAVE
    61. | MOV of arg * arg
    62. | MOVAPD of arg * arg
    63. | MOVLPD of arg * arg
    64. | MOVSD of arg * arg
    65. | MOVSS of arg * arg
    66. | MOVSX of arg * arg
    67. | MOVSXD of arg * arg
    68. | MOVZX of arg * arg
    69. | MULSD of arg * arg
    70. | NEG of arg
    71. | NOP
    72. | OR of arg * arg
    73. | POP of arg
    74. | PUSH of arg
    75. | RET
    76. | ROUNDSD of rounding * arg * arg
    77. | SAL of arg * arg
    78. | SAR of arg * arg
    79. | SET of condition * arg
    80. | SHR of arg * arg
    81. | SQRTSD of arg * arg
    82. | SUB of arg * arg
    83. | SUBSD of arg * arg
    84. | TEST of arg * arg
    85. | UCOMISD of arg * arg
    86. | XCHG of arg * arg
    87. | XOR of arg * arg
    88. | 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. | File of int * string
    20. | Indirect_symbol of string
    21. | Loc of int * int * int
    22. | Private_extern of string
    23. | Set of string * constant
    24. | Size of string * constant
    25. | Type of string * string
    type asm_program = asm_line list
    diff --git a/dev/ocaml/X86_dsl/D/index.html b/dev/ocaml/X86_dsl/D/index.html index 17f96744..13a1086e 100644 --- a/dev/ocaml/X86_dsl/D/index.html +++ b/dev/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 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 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/dev/ocaml/X86_dsl/I/index.html b/dev/ocaml/X86_dsl/I/index.html index cab1829f..a0aa91d9 100644 --- a/dev/ocaml/X86_dsl/I/index.html +++ b/dev/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 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 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 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 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/dev/ocaml/X86_dsl/index.html b/dev/ocaml/X86_dsl/index.html index 8bd46e69..e343a111 100644 --- a/dev/ocaml/X86_dsl/index.html +++ b/dev/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 r10 : X86_ast.arg
    val r11 : 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 r10 : X86_ast.arg
    val r11 : 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/dev/ocaml/X86_gas/index.html b/dev/ocaml/X86_gas/index.html index 62b22c8a..c25808b9 100644 --- a/dev/ocaml/X86_gas/index.html +++ b/dev/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/dev/ocaml/X86_masm/index.html b/dev/ocaml/X86_masm/index.html index 2b0ac374..7397ec2b 100644 --- a/dev/ocaml/X86_masm/index.html +++ b/dev/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/dev/ocaml/X86_proc/index.html b/dev/ocaml/X86_proc/index.html index 35eff32a..675a163a 100644 --- a/dev/ocaml/X86_proc/index.html +++ b/dev/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_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_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_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_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/dev/ocaml/index.html b/dev/ocaml/index.html index d680efd6..cf465a05 100644 --- a/dev/ocaml/index.html +++ b/dev/ocaml/index.html @@ -1,2 +1,2 @@ -index (ocaml.index)

    Package ocaml

    Stdlib

    Threads

    • Condition Condition variables to synchronize between threads.
    • Event First-class synchronous communication.
    • Mutex Locks for mutual exclusion.
    • Semaphore Semaphores
    • Thread Lightweight threads for Posix 1003.1c and Win32.
    • ThreadUnix Thread-compatible system calls.

    Compiler libs

    Package info

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

    Package ocaml

    Stdlib

    Threads

    • Condition Condition variables to synchronize between threads.
    • Event First-class synchronous communication.
    • Mutex Locks for mutual exclusion.
    • Semaphore Semaphores
    • Thread Lightweight threads for Posix 1003.1c and Win32.
    • ThreadUnix Thread-compatible system calls.

    Compiler libs

    Package info

    changes-files
    license-files
    readme-files
    diff --git a/dev/odoc.css b/dev/odoc.css index 8b0ed5a8..7230f826 100644 --- a/dev/odoc.css +++ b/dev/odoc.css @@ -1,12 +1,97 @@ @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 2.3.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 { @@ -14,6 +99,7 @@ --color: #333333; --link-color: #2C94BD; + --source-color: grey; --anchor-hover: #555; --anchor-color: #d5d5d5; --xref-shadow: #cc6666; @@ -33,6 +119,7 @@ --toc-list-border: #ccc; --spec-summary-border-color: #5c9cf5; + --spec-label-color: green; --spec-summary-background: var(--code-background); --spec-summary-hover-background: #ebeff2; --spec-details-after-background: rgba(0, 4, 15, 0.05); @@ -72,6 +159,8 @@ --hljs-type: #ac885b; --hljs-meta: #82aaff; --hljs-variable: #cf6a4c; + + --spec-label-color: lightgreen; } @media (prefers-color-scheme: dark) { @@ -118,6 +207,8 @@ --hljs-type: #ac885b; --hljs-meta: #82aaff; --hljs-variable: #cf6a4c; + + --spec-label-color: lightgreen; } } @@ -142,6 +233,7 @@ table { html { font-size: 15px; + scroll-behavior: smooth; } body { @@ -149,16 +241,23 @@ body { background: #FFFFFF; color: var(--color); background-color: var(--main-background); + font-family: "Noticia Text", Georgia, serif; + line-height: 1.5; } 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; +} + +body.odoc { + max-width: 100ex; +} + +body.odoc-src { + margin-right: calc(10vw + 20ex); } header { @@ -238,6 +337,10 @@ a { color: var(--link-color); } +.odoc-src pre a { + color: inherit; +} + a:hover { box-shadow: 0 1px 0 0 var(--link-color); } @@ -289,6 +392,14 @@ a.anchor { 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-color); + font-family: "Fira Sans", Helvetica, Arial, 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 */ @@ -372,32 +483,32 @@ tt, code, pre { font-weight: 400; } -pre { +.odoc pre { padding: 0.1em; border: 1px solid var(--pre-border-color); border-radius: 5px; overflow-x: auto; } -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 +530,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; } @@ -536,6 +651,12 @@ 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: 'โš ๏ธ '; +} + /* Lists of modules */ .modules { list-style-type: none; margin-left: -3ex; } @@ -674,10 +795,26 @@ 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) { - body.odoc { +@media only screen and (max-width: 110ex) { + body { margin: 2em; } .odoc-toc { @@ -704,6 +841,47 @@ td.def-doc *:first-child { } } +/* Source code. */ + +.source_container { + display: flex; +} + +.source_line_column { + padding-right: 0.5em; + text-align: right; + background: #eee8d5; +} + +.source_line { + padding: 0 1em; +} + +.source_code { + flex-grow: 1; + background: #fdf6e3; + padding: 0 0.3em; + color: #657b83; +} + +/* 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 { @@ -777,6 +955,34 @@ td.def-doc *:first-child { text-decoration: underline; } +.VAL, .TYPE, .LET, .REC, .IN, .OPEN, .NONREC, .MODULE, .METHOD, .LETOP, .INHERIT, .INCLUDE, .FUNCTOR, .EXTERNAL, .CONSTRAINT, .ASSERT, .AND, .END, .CLASS, .STRUCT, .SIG { + color: #859900;; +} + +.WITH, .WHILE, .WHEN, .VIRTUAL, .TRY, .TO, .THEN, .PRIVATE, .OF, .NEW, .MUTABLE, .MATCH, .LAZY, .IF, .FUNCTION, .FUN, .FOR, .EXCEPTION, .ELSE, .TO, .DOWNTO, .DO, .DONE, .BEGIN, .AS { + color: #cb4b16; +} + +.TRUE, .FALSE { + color: #b58900; +} + +.failwith, .INT, .SEMISEMI, .LIDENT { + color: #2aa198; +} + +.STRING, .CHAR, .UIDENT { + color: #b58900; +} + +.DOCSTRING { + color: #268bd2; +} + +.COMMENT { + color: #93a1a1; +} + /*--------------------------------------------------------------------------- Copyright (c) 2016 The odoc contributors

    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/dev/fonts/fira-sans-v17-latin-700italic.woff2 b/dev/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/dev/fonts/fira-sans-v17-latin-italic.woff2 b/dev/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