From 1b7afbcaa5fb0b27d183a2b45559746fd5a72897 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 28 Mar 2018 20:36:52 -0500 Subject: [PATCH] doc for 2.1 --- 2.1/containers.data/CCBV.odoc | Bin 0 -> 4719 bytes 2.1/containers.data/CCBV/.jbuilder-keep | 0 2.1/containers.data/CCBV/index.html | 18 ++ 2.1/containers.data/CCBijection.odoc | Bin 0 -> 4105 bytes .../CCBijection/.jbuilder-keep | 0 .../CCBijection/Make/argument-1-L/index.html | 2 + .../CCBijection/Make/argument-2-R/index.html | 2 + .../CCBijection/Make/index.html | 7 + 2.1/containers.data/CCBijection/index.html | 4 + .../module-type-OrderedType/index.html | 2 + .../CCBijection/module-type-S/index.html | 7 + 2.1/containers.data/CCBitField.odoc | Bin 0 -> 1955 bytes 2.1/containers.data/CCBitField/.jbuilder-keep | 0 .../CCBitField/Make/argument-1-X/index.html | 2 + .../CCBitField/Make/index.html | 4 + 2.1/containers.data/CCBitField/index.html | 15 ++ .../CCBitField/module-type-S/index.html | 4 + 2.1/containers.data/CCCache.odoc | Bin 0 -> 3840 bytes 2.1/containers.data/CCCache/.jbuilder-keep | 0 2.1/containers.data/CCCache/index.html | 38 +++ 2.1/containers.data/CCDeque.odoc | Bin 0 -> 3800 bytes 2.1/containers.data/CCDeque/.jbuilder-keep | 0 2.1/containers.data/CCDeque/index.html | 14 ++ 2.1/containers.data/CCFQueue.odoc | Bin 0 -> 4475 bytes 2.1/containers.data/CCFQueue/.jbuilder-keep | 0 2.1/containers.data/CCFQueue/index.html | 8 + 2.1/containers.data/CCFun_vec.odoc | Bin 0 -> 2379 bytes 2.1/containers.data/CCFun_vec/.jbuilder-keep | 0 2.1/containers.data/CCFun_vec/index.html | 3 + 2.1/containers.data/CCGraph.odoc | Bin 0 -> 13507 bytes 2.1/containers.data/CCGraph/.jbuilder-keep | 0 2.1/containers.data/CCGraph/Dot/index.html | 2 + .../CCGraph/Lazy_tree/index.html | 2 + 2.1/containers.data/CCGraph/Map/index.html | 4 + 2.1/containers.data/CCGraph/Seq/index.html | 2 + .../CCGraph/Traverse/Event/index.html | 2 + .../CCGraph/Traverse/index.html | 7 + 2.1/containers.data/CCGraph/index.html | 36 +++ .../CCGraph/module-type-MAP/index.html | 4 + 2.1/containers.data/CCHashSet.odoc | Bin 0 -> 4641 bytes 2.1/containers.data/CCHashSet/.jbuilder-keep | 0 .../CCHashSet/Make/argument-1-E/index.html | 2 + 2.1/containers.data/CCHashSet/Make/index.html | 3 + 2.1/containers.data/CCHashSet/index.html | 2 + .../CCHashSet/module-type-ELEMENT/index.html | 2 + .../CCHashSet/module-type-S/index.html | 3 + 2.1/containers.data/CCHashTrie.odoc | Bin 0 -> 7391 bytes 2.1/containers.data/CCHashTrie/.jbuilder-keep | 0 .../CCHashTrie/Make/argument-1-K/index.html | 2 + .../CCHashTrie/Make/index.html | 9 + .../CCHashTrie/Transient/index.html | 7 + 2.1/containers.data/CCHashTrie/index.html | 6 + .../CCHashTrie/module-type-KEY/index.html | 2 + .../CCHashTrie/module-type-S/index.html | 9 + 2.1/containers.data/CCHet.odoc | Bin 0 -> 2212 bytes 2.1/containers.data/CCHet/.jbuilder-keep | 0 2.1/containers.data/CCHet/Key/index.html | 2 + 2.1/containers.data/CCHet/Map/index.html | 2 + 2.1/containers.data/CCHet/Tbl/index.html | 2 + 2.1/containers.data/CCHet/index.html | 3 + 2.1/containers.data/CCImmutArray.odoc | Bin 0 -> 2915 bytes .../CCImmutArray/.jbuilder-keep | 0 2.1/containers.data/CCImmutArray/index.html | 8 + 2.1/containers.data/CCIntMap.odoc | Bin 0 -> 3519 bytes 2.1/containers.data/CCIntMap/.jbuilder-keep | 0 2.1/containers.data/CCIntMap/index.html | 3 + 2.1/containers.data/CCMixmap.odoc | Bin 0 -> 4122 bytes 2.1/containers.data/CCMixmap/.jbuilder-keep | 0 .../CCMixmap/Make/argument-1-X/index.html | 2 + 2.1/containers.data/CCMixmap/Make/index.html | 4 + 2.1/containers.data/CCMixmap/index.html | 25 ++ .../CCMixmap/module-type-ORD/index.html | 2 + .../CCMixmap/module-type-S/index.html | 4 + 2.1/containers.data/CCMixset.odoc | Bin 0 -> 1691 bytes 2.1/containers.data/CCMixset/.jbuilder-keep | 0 2.1/containers.data/CCMixset/index.html | 17 ++ 2.1/containers.data/CCMixtbl.odoc | Bin 0 -> 3460 bytes 2.1/containers.data/CCMixtbl/.jbuilder-keep | 0 2.1/containers.data/CCMixtbl/index.html | 32 +++ 2.1/containers.data/CCMultiMap.odoc | Bin 0 -> 6681 bytes 2.1/containers.data/CCMultiMap/.jbuilder-keep | 0 .../CCMultiMap/Make/argument-1-K/index.html | 2 + .../CCMultiMap/Make/argument-2-V/index.html | 2 + .../CCMultiMap/Make/index.html | 3 + .../MakeBidir/argument-1-L/index.html | 2 + .../MakeBidir/argument-2-R/index.html | 2 + .../CCMultiMap/MakeBidir/index.html | 2 + 2.1/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 | 3 + 2.1/containers.data/CCMultiSet.odoc | Bin 0 -> 4513 bytes 2.1/containers.data/CCMultiSet/.jbuilder-keep | 0 .../CCMultiSet/Make/index.html | 8 + 2.1/containers.data/CCMultiSet/index.html | 2 + .../CCMultiSet/module-type-S/index.html | 8 + 2.1/containers.data/CCPersistentArray.odoc | Bin 0 -> 4501 bytes .../CCPersistentArray/.jbuilder-keep | 0 .../CCPersistentArray/index.html | 20 ++ 2.1/containers.data/CCPersistentHashtbl.odoc | Bin 0 -> 6204 bytes .../CCPersistentHashtbl/.jbuilder-keep | 0 .../Make/argument-1-H/index.html | 2 + .../CCPersistentHashtbl/Make/index.html | 10 + .../CCPersistentHashtbl/index.html | 5 + .../module-type-HashedType/index.html | 2 + .../module-type-S/index.html | 10 + 2.1/containers.data/CCRAL.odoc | Bin 0 -> 5936 bytes 2.1/containers.data/CCRAL/.jbuilder-keep | 0 2.1/containers.data/CCRAL/Infix/index.html | 2 + 2.1/containers.data/CCRAL/index.html | 6 + 2.1/containers.data/CCRingBuffer.odoc | Bin 0 -> 13025 bytes .../CCRingBuffer/.jbuilder-keep | 0 .../CCRingBuffer/Array/Byte/index.html | 5 + .../Array/Make/argument-1-Elt/index.html | 2 + .../CCRingBuffer/Array/Make/index.html | 5 + .../CCRingBuffer/Array/index.html | 2 + .../Array/module-type-S/index.html | 5 + .../CCRingBuffer/Byte/index.html | 15 ++ .../CCRingBuffer/Make/Array/index.html | 5 + .../CCRingBuffer/Make/argument-1-X/index.html | 2 + .../CCRingBuffer/Make/index.html | 15 ++ .../MakeFromArray/argument-1-A/index.html | 5 + .../CCRingBuffer/MakeFromArray/index.html | 15 ++ 2.1/containers.data/CCRingBuffer/index.html | 3 + .../module-type-S/Array/index.html | 5 + .../CCRingBuffer/module-type-S/index.html | 16 ++ 2.1/containers.data/CCSimple_queue.odoc | Bin 0 -> 3157 bytes .../CCSimple_queue/.jbuilder-keep | 0 .../CCSimple_queue/Infix/index.html | 2 + 2.1/containers.data/CCSimple_queue/index.html | 4 + 2.1/containers.data/CCTrie.odoc | Bin 0 -> 10017 bytes 2.1/containers.data/CCTrie/.jbuilder-keep | 0 .../CCTrie/Make/argument-1-W/index.html | 2 + 2.1/containers.data/CCTrie/Make/index.html | 11 + .../CCTrie/MakeArray/argument-1-X/index.html | 2 + .../CCTrie/MakeArray/index.html | 11 + .../CCTrie/MakeList/argument-1-X/index.html | 2 + .../CCTrie/MakeList/index.html | 11 + 2.1/containers.data/CCTrie/String/index.html | 11 + 2.1/containers.data/CCTrie/index.html | 2 + .../CCTrie/module-type-ORDERED/index.html | 2 + .../CCTrie/module-type-S/index.html | 11 + .../CCTrie/module-type-WORD/index.html | 2 + 2.1/containers.data/CCWBTree.odoc | Bin 0 -> 9127 bytes 2.1/containers.data/CCWBTree/.jbuilder-keep | 0 .../CCWBTree/Make/argument-1-X/index.html | 2 + 2.1/containers.data/CCWBTree/Make/index.html | 12 + .../CCWBTree/MakeFull/argument-1-X/index.html | 2 + .../CCWBTree/MakeFull/index.html | 12 + 2.1/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 | 12 + 2.1/containers.data/CCZipper.odoc | Bin 0 -> 2884 bytes 2.1/containers.data/CCZipper/.jbuilder-keep | 0 2.1/containers.data/CCZipper/index.html | 11 + 2.1/containers.data/index-generated.mld | 2 + 2.1/containers.data/index.html | 3 + 2.1/containers.data/page-index.odoc | Bin 0 -> 635 bytes 2.1/containers.iter/CCKList.odoc | Bin 0 -> 8414 bytes 2.1/containers.iter/CCKList/.jbuilder-keep | 0 2.1/containers.iter/CCKList/Infix/index.html | 2 + .../CCKList/Traverse/argument-1-M/index.html | 2 + .../CCKList/Traverse/index.html | 2 + 2.1/containers.iter/CCKList/index.html | 16 ++ .../CCKList/module-type-MONAD/index.html | 2 + 2.1/containers.iter/CCKTree.odoc | Bin 0 -> 4648 bytes 2.1/containers.iter/CCKTree/.jbuilder-keep | 0 2.1/containers.iter/CCKTree/Dot/index.html | 4 + .../CCKTree/class-type-pset/index.html | 2 + 2.1/containers.iter/CCKTree/index.html | 22 ++ 2.1/containers.iter/CCLazy_list.odoc | Bin 0 -> 2010 bytes .../CCLazy_list/.jbuilder-keep | 0 .../CCLazy_list/Infix/index.html | 2 + 2.1/containers.iter/CCLazy_list/index.html | 3 + 2.1/containers.iter/index-generated.mld | 2 + 2.1/containers.iter/index.html | 3 + 2.1/containers.iter/page-index.odoc | Bin 0 -> 282 bytes 2.1/containers.monomorphic/CCMonomorphic.odoc | Bin 0 -> 1368 bytes .../CCMonomorphic/.jbuilder-keep | 0 .../CCMonomorphic/index.html | 2 + .../index-generated.mld | 2 + 2.1/containers.monomorphic/index.html | 3 + 2.1/containers.monomorphic/page-index.odoc | Bin 0 -> 279 bytes 2.1/containers.sexp/CCSexp.odoc | Bin 0 -> 3528 bytes 2.1/containers.sexp/CCSexp/.jbuilder-keep | 0 2.1/containers.sexp/CCSexp/Decoder/index.html | 3 + 2.1/containers.sexp/CCSexp/index.html | 8 + 2.1/containers.sexp/CCSexp_lex.odoc | Bin 0 -> 1057 bytes 2.1/containers.sexp/CCSexp_lex/.jbuilder-keep | 0 2.1/containers.sexp/CCSexp_lex/index.html | 2 + 2.1/containers.sexp/index-generated.mld | 2 + 2.1/containers.sexp/index.html | 3 + 2.1/containers.sexp/page-index.odoc | Bin 0 -> 267 bytes 2.1/containers.thread/CCBlockingQueue.odoc | Bin 0 -> 1877 bytes .../CCBlockingQueue/.jbuilder-keep | 0 .../CCBlockingQueue/index.html | 9 + 2.1/containers.thread/CCLock.odoc | Bin 0 -> 3059 bytes 2.1/containers.thread/CCLock/.jbuilder-keep | 0 .../CCLock/LockRef/index.html | 2 + 2.1/containers.thread/CCLock/index.html | 10 + 2.1/containers.thread/CCPool.odoc | Bin 0 -> 5814 bytes 2.1/containers.thread/CCPool/.jbuilder-keep | 0 .../CCPool/Make/Fut/Infix/index.html | 2 + .../CCPool/Make/Fut/index.html | 22 ++ .../CCPool/Make/argument-1-P/index.html | 2 + 2.1/containers.thread/CCPool/Make/index.html | 3 + 2.1/containers.thread/CCPool/index.html | 2 + .../CCPool/module-type-PARAM/index.html | 2 + 2.1/containers.thread/CCSemaphore.odoc | Bin 0 -> 1265 bytes .../CCSemaphore/.jbuilder-keep | 0 2.1/containers.thread/CCSemaphore/index.html | 6 + 2.1/containers.thread/CCThread.odoc | Bin 0 -> 2021 bytes 2.1/containers.thread/CCThread/.jbuilder-keep | 0 2.1/containers.thread/CCThread/Arr/index.html | 3 + .../CCThread/Barrier/index.html | 6 + 2.1/containers.thread/CCThread/index.html | 2 + 2.1/containers.thread/CCTimer.odoc | Bin 0 -> 1645 bytes 2.1/containers.thread/CCTimer/.jbuilder-keep | 0 2.1/containers.thread/CCTimer/index.html | 6 + 2.1/containers.thread/index-generated.mld | 2 + 2.1/containers.thread/index.html | 3 + 2.1/containers.thread/page-index.odoc | Bin 0 -> 334 bytes .../Containers_top/.jbuilder-keep | 0 2.1/containers.top/Containers_top/index.html | 2 + 2.1/containers.top/containers_top.odoc | Bin 0 -> 1331 bytes 2.1/containers.top/index-generated.mld | 2 + 2.1/containers.top/index.html | 3 + 2.1/containers.top/page-index.odoc | Bin 0 -> 256 bytes 2.1/containers.unix/CCUnix.odoc | Bin 0 -> 5475 bytes 2.1/containers.unix/CCUnix/.jbuilder-keep | 0 2.1/containers.unix/CCUnix/Infix/index.html | 2 + 2.1/containers.unix/CCUnix/index.html | 18 ++ 2.1/containers.unix/index-generated.mld | 2 + 2.1/containers.unix/index.html | 3 + 2.1/containers.unix/page-index.odoc | Bin 0 -> 251 bytes 2.1/containers/CCArray.odoc | Bin 0 -> 11872 bytes 2.1/containers/CCArray/.jbuilder-keep | 0 2.1/containers/CCArray/index.html | 53 ++++ .../CCArray/module-type-MONO_ARRAY/index.html | 2 + 2.1/containers/CCArrayLabels.odoc | Bin 0 -> 12065 bytes 2.1/containers/CCArrayLabels/.jbuilder-keep | 0 2.1/containers/CCArrayLabels/index.html | 52 ++++ .../module-type-MONO_ARRAY/index.html | 2 + 2.1/containers/CCArray_slice.odoc | Bin 0 -> 9619 bytes 2.1/containers/CCArray_slice/.jbuilder-keep | 0 2.1/containers/CCArray_slice/index.html | 42 ++++ 2.1/containers/CCBool.odoc | Bin 0 -> 866 bytes 2.1/containers/CCBool/.jbuilder-keep | 0 2.1/containers/CCBool/index.html | 2 + 2.1/containers/CCChar.odoc | Bin 0 -> 2236 bytes 2.1/containers/CCChar/.jbuilder-keep | 0 2.1/containers/CCChar/index.html | 9 + 2.1/containers/CCEqual.odoc | Bin 0 -> 1602 bytes 2.1/containers/CCEqual/.jbuilder-keep | 0 2.1/containers/CCEqual/Infix/index.html | 2 + 2.1/containers/CCEqual/index.html | 7 + 2.1/containers/CCFloat.odoc | Bin 0 -> 4264 bytes 2.1/containers/CCFloat/.jbuilder-keep | 0 2.1/containers/CCFloat/Infix/index.html | 2 + 2.1/containers/CCFloat/index.html | 8 + 2.1/containers/CCFormat.odoc | Bin 0 -> 18641 bytes 2.1/containers/CCFormat/.jbuilder-keep | 0 2.1/containers/CCFormat/Dump/index.html | 2 + 2.1/containers/CCFormat/index.html | 44 ++++ 2.1/containers/CCFun.odoc | Bin 0 -> 3536 bytes 2.1/containers/CCFun/.jbuilder-keep | 0 .../CCFun/Monad/argument-1-X/index.html | 2 + 2.1/containers/CCFun/Monad/index.html | 2 + 2.1/containers/CCFun/index.html | 18 ++ 2.1/containers/CCHash.odoc | Bin 0 -> 2950 bytes 2.1/containers/CCHash/.jbuilder-keep | 0 2.1/containers/CCHash/index.html | 8 + 2.1/containers/CCHashtbl.odoc | Bin 0 -> 9687 bytes 2.1/containers/CCHashtbl/.jbuilder-keep | 0 2.1/containers/CCHashtbl/Poly/index.html | 21 ++ 2.1/containers/CCHashtbl/index.html | 21 ++ .../CCHashtbl/module-type-S/index.html | 21 ++ 2.1/containers/CCHeap.odoc | Bin 0 -> 6505 bytes 2.1/containers/CCHeap/.jbuilder-keep | 0 .../CCHeap/Make/argument-1-E/index.html | 2 + 2.1/containers/CCHeap/Make/index.html | 13 + 2.1/containers/CCHeap/index.html | 2 + .../CCHeap/module-type-PARTIAL_ORD/index.html | 2 + .../CCHeap/module-type-S/index.html | 13 + 2.1/containers/CCIO.odoc | Bin 0 -> 7528 bytes 2.1/containers/CCIO/.jbuilder-keep | 0 2.1/containers/CCIO/File/index.html | 14 ++ 2.1/containers/CCIO/index.html | 23 ++ 2.1/containers/CCInt.odoc | Bin 0 -> 4526 bytes 2.1/containers/CCInt/.jbuilder-keep | 0 2.1/containers/CCInt/Infix/index.html | 2 + 2.1/containers/CCInt/index.html | 10 + 2.1/containers/CCInt32.odoc | Bin 0 -> 7236 bytes 2.1/containers/CCInt32/.jbuilder-keep | 0 2.1/containers/CCInt32/Infix/index.html | 2 + 2.1/containers/CCInt32/index.html | 39 +++ 2.1/containers/CCInt64.odoc | Bin 0 -> 8822 bytes 2.1/containers/CCInt64/.jbuilder-keep | 0 2.1/containers/CCInt64/Infix/index.html | 2 + 2.1/containers/CCInt64/index.html | 46 ++++ 2.1/containers/CCList.odoc | Bin 0 -> 26812 bytes 2.1/containers/CCList/.jbuilder-keep | 0 2.1/containers/CCList/Assoc/index.html | 4 + 2.1/containers/CCList/Infix/index.html | 2 + 2.1/containers/CCList/Ref/index.html | 3 + .../CCList/Traverse/argument-1-M/index.html | 2 + 2.1/containers/CCList/Traverse/index.html | 4 + 2.1/containers/CCList/index.html | 96 +++++++ .../CCList/module-type-MONAD/index.html | 2 + 2.1/containers/CCListLabels.odoc | Bin 0 -> 21796 bytes 2.1/containers/CCListLabels/.jbuilder-keep | 0 2.1/containers/CCListLabels/Assoc/index.html | 4 + 2.1/containers/CCListLabels/Infix/index.html | 2 + 2.1/containers/CCListLabels/Ref/index.html | 3 + .../Traverse/argument-1-M/index.html | 2 + .../CCListLabels/Traverse/index.html | 4 + 2.1/containers/CCListLabels/index.html | 60 +++++ .../CCListLabels/module-type-MONAD/index.html | 2 + 2.1/containers/CCMap.odoc | Bin 0 -> 5454 bytes 2.1/containers/CCMap/.jbuilder-keep | 0 2.1/containers/CCMap/index.html | 2 + 2.1/containers/CCMap/module-type-S/index.html | 10 + 2.1/containers/CCNativeint.odoc | Bin 0 -> 7521 bytes 2.1/containers/CCNativeint/.jbuilder-keep | 0 2.1/containers/CCNativeint/Infix/index.html | 2 + 2.1/containers/CCNativeint/index.html | 40 +++ 2.1/containers/CCOpt.odoc | Bin 0 -> 6412 bytes 2.1/containers/CCOpt/.jbuilder-keep | 0 2.1/containers/CCOpt/Infix/index.html | 2 + 2.1/containers/CCOpt/index.html | 10 + 2.1/containers/CCOrd.odoc | Bin 0 -> 2532 bytes 2.1/containers/CCOrd/.jbuilder-keep | 0 2.1/containers/CCOrd/Infix/index.html | 4 + 2.1/containers/CCOrd/index.html | 15 ++ 2.1/containers/CCPair.odoc | Bin 0 -> 2542 bytes 2.1/containers/CCPair/.jbuilder-keep | 0 2.1/containers/CCPair/index.html | 4 + 2.1/containers/CCParse.odoc | Bin 0 -> 10061 bytes 2.1/containers/CCParse/.jbuilder-keep | 0 2.1/containers/CCParse/Infix/index.html | 13 + 2.1/containers/CCParse/U/index.html | 6 + 2.1/containers/CCParse/index.html | 51 ++++ 2.1/containers/CCRandom.odoc | Bin 0 -> 6138 bytes 2.1/containers/CCRandom/.jbuilder-keep | 0 2.1/containers/CCRandom/index.html | 23 ++ 2.1/containers/CCRef.odoc | Bin 0 -> 1662 bytes 2.1/containers/CCRef/.jbuilder-keep | 0 2.1/containers/CCRef/index.html | 2 + 2.1/containers/CCResult.odoc | Bin 0 -> 9191 bytes 2.1/containers/CCResult/.jbuilder-keep | 0 2.1/containers/CCResult/Infix/index.html | 5 + .../CCResult/Traverse/argument-1-M/index.html | 2 + 2.1/containers/CCResult/Traverse/index.html | 2 + 2.1/containers/CCResult/index.html | 27 ++ .../CCResult/module-type-MONAD/index.html | 2 + 2.1/containers/CCSet.odoc | Bin 0 -> 3841 bytes 2.1/containers/CCSet/.jbuilder-keep | 0 2.1/containers/CCSet/index.html | 2 + 2.1/containers/CCSet/module-type-S/index.html | 3 + 2.1/containers/CCString.odoc | Bin 0 -> 17813 bytes 2.1/containers/CCString/.jbuilder-keep | 0 2.1/containers/CCString/Find/index.html | 2 + 2.1/containers/CCString/Split/index.html | 9 + 2.1/containers/CCString/Sub/index.html | 3 + 2.1/containers/CCString/index.html | 21 ++ .../CCString/module-type-S/index.html | 3 + 2.1/containers/CCUtf8_string.odoc | Bin 0 -> 2434 bytes 2.1/containers/CCUtf8_string/.jbuilder-keep | 0 2.1/containers/CCUtf8_string/index.html | 3 + 2.1/containers/CCVector.odoc | Bin 0 -> 10041 bytes 2.1/containers/CCVector/.jbuilder-keep | 0 2.1/containers/CCVector/index.html | 23 ++ 2.1/containers/Containers/.jbuilder-keep | 0 .../Containers/Hashtbl/Make/index.html | 2 + .../MakeSeeded/argument-1-H/index.html | 2 + .../Containers/Hashtbl/MakeSeeded/index.html | 2 + 2.1/containers/Containers/Hashtbl/index.html | 21 ++ .../Hashtbl/module-type-HashedType/index.html | 2 + .../Hashtbl/module-type-S'/index.html | 21 ++ .../Hashtbl/module-type-S/index.html | 2 + .../module-type-SeededHashedType/index.html | 2 + .../Hashtbl/module-type-SeededS/index.html | 2 + 2.1/containers/Containers/index.html | 2 + 2.1/containers/containers.odoc | Bin 0 -> 9175 bytes 2.1/containers/index-generated.mld | 2 + 2.1/containers/index.html | 3 + 2.1/containers/page-index.odoc | Bin 0 -> 654 bytes 2.1/index.html | 23 ++ 2.1/odoc.css | 234 ++++++++++++++++++ dev/containers.data/CCBV.odoc | Bin 0 -> 4719 bytes dev/containers.data/CCBV/.jbuilder-keep | 0 dev/containers.data/CCBV/index.html | 18 ++ dev/containers.data/CCBijection.odoc | Bin 0 -> 4105 bytes .../CCBijection/.jbuilder-keep | 0 .../CCBijection/Make/argument-1-L/index.html | 2 + .../CCBijection/Make/argument-2-R/index.html | 2 + .../CCBijection/Make/index.html | 7 + dev/containers.data/CCBijection/index.html | 4 + .../module-type-OrderedType/index.html | 2 + .../CCBijection/module-type-S/index.html | 7 + dev/containers.data/CCBitField.odoc | Bin 0 -> 1955 bytes dev/containers.data/CCBitField/.jbuilder-keep | 0 .../CCBitField/Make/argument-1-X/index.html | 2 + .../CCBitField/Make/index.html | 4 + dev/containers.data/CCBitField/index.html | 15 ++ .../CCBitField/module-type-S/index.html | 4 + dev/containers.data/CCCache.odoc | Bin 0 -> 3840 bytes dev/containers.data/CCCache/.jbuilder-keep | 0 dev/containers.data/CCCache/index.html | 38 +++ dev/containers.data/CCDeque.odoc | Bin 0 -> 3800 bytes dev/containers.data/CCDeque/.jbuilder-keep | 0 dev/containers.data/CCDeque/index.html | 14 ++ dev/containers.data/CCFQueue.odoc | Bin 0 -> 4475 bytes dev/containers.data/CCFQueue/.jbuilder-keep | 0 dev/containers.data/CCFQueue/index.html | 8 + dev/containers.data/CCFun_vec.odoc | Bin 0 -> 2379 bytes dev/containers.data/CCFun_vec/.jbuilder-keep | 0 dev/containers.data/CCFun_vec/index.html | 3 + dev/containers.data/CCGraph.odoc | Bin 0 -> 13507 bytes dev/containers.data/CCGraph/.jbuilder-keep | 0 dev/containers.data/CCGraph/Dot/index.html | 2 + .../CCGraph/Lazy_tree/index.html | 2 + dev/containers.data/CCGraph/Map/index.html | 4 + dev/containers.data/CCGraph/Seq/index.html | 2 + .../CCGraph/Traverse/Event/index.html | 2 + .../CCGraph/Traverse/index.html | 7 + dev/containers.data/CCGraph/index.html | 36 +++ .../CCGraph/module-type-MAP/index.html | 4 + dev/containers.data/CCHashSet.odoc | Bin 0 -> 4641 bytes dev/containers.data/CCHashSet/.jbuilder-keep | 0 .../CCHashSet/Make/argument-1-E/index.html | 2 + dev/containers.data/CCHashSet/Make/index.html | 3 + dev/containers.data/CCHashSet/index.html | 2 + .../CCHashSet/module-type-ELEMENT/index.html | 2 + .../CCHashSet/module-type-S/index.html | 3 + dev/containers.data/CCHashTrie.odoc | Bin 0 -> 7391 bytes dev/containers.data/CCHashTrie/.jbuilder-keep | 0 .../CCHashTrie/Make/argument-1-K/index.html | 2 + .../CCHashTrie/Make/index.html | 9 + .../CCHashTrie/Transient/index.html | 7 + dev/containers.data/CCHashTrie/index.html | 6 + .../CCHashTrie/module-type-KEY/index.html | 2 + .../CCHashTrie/module-type-S/index.html | 9 + dev/containers.data/CCHet.odoc | Bin 0 -> 2212 bytes dev/containers.data/CCHet/.jbuilder-keep | 0 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 | 3 + dev/containers.data/CCImmutArray.odoc | Bin 0 -> 2915 bytes .../CCImmutArray/.jbuilder-keep | 0 dev/containers.data/CCImmutArray/index.html | 8 + dev/containers.data/CCIntMap.odoc | Bin 0 -> 3519 bytes dev/containers.data/CCIntMap/.jbuilder-keep | 0 dev/containers.data/CCIntMap/index.html | 3 + dev/containers.data/CCMixmap.odoc | Bin 0 -> 4122 bytes dev/containers.data/CCMixmap/.jbuilder-keep | 0 .../CCMixmap/Make/argument-1-X/index.html | 2 + dev/containers.data/CCMixmap/Make/index.html | 4 + dev/containers.data/CCMixmap/index.html | 25 ++ .../CCMixmap/module-type-ORD/index.html | 2 + .../CCMixmap/module-type-S/index.html | 4 + dev/containers.data/CCMixset.odoc | Bin 0 -> 1691 bytes dev/containers.data/CCMixset/.jbuilder-keep | 0 dev/containers.data/CCMixset/index.html | 17 ++ dev/containers.data/CCMixtbl.odoc | Bin 0 -> 3460 bytes dev/containers.data/CCMixtbl/.jbuilder-keep | 0 dev/containers.data/CCMixtbl/index.html | 32 +++ dev/containers.data/CCMultiMap.odoc | Bin 0 -> 6681 bytes dev/containers.data/CCMultiMap/.jbuilder-keep | 0 .../CCMultiMap/Make/argument-1-K/index.html | 2 + .../CCMultiMap/Make/argument-2-V/index.html | 2 + .../CCMultiMap/Make/index.html | 3 + .../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 | 3 + dev/containers.data/CCMultiSet.odoc | Bin 0 -> 4513 bytes dev/containers.data/CCMultiSet/.jbuilder-keep | 0 .../CCMultiSet/Make/index.html | 8 + dev/containers.data/CCMultiSet/index.html | 2 + .../CCMultiSet/module-type-S/index.html | 8 + dev/containers.data/CCPersistentArray.odoc | Bin 0 -> 4501 bytes .../CCPersistentArray/.jbuilder-keep | 0 .../CCPersistentArray/index.html | 20 ++ dev/containers.data/CCPersistentHashtbl.odoc | Bin 0 -> 6204 bytes .../CCPersistentHashtbl/.jbuilder-keep | 0 .../Make/argument-1-H/index.html | 2 + .../CCPersistentHashtbl/Make/index.html | 10 + .../CCPersistentHashtbl/index.html | 5 + .../module-type-HashedType/index.html | 2 + .../module-type-S/index.html | 10 + dev/containers.data/CCRAL.odoc | Bin 0 -> 5936 bytes dev/containers.data/CCRAL/.jbuilder-keep | 0 dev/containers.data/CCRAL/Infix/index.html | 2 + dev/containers.data/CCRAL/index.html | 6 + dev/containers.data/CCRingBuffer.odoc | Bin 0 -> 13025 bytes .../CCRingBuffer/.jbuilder-keep | 0 .../CCRingBuffer/Array/Byte/index.html | 5 + .../Array/Make/argument-1-Elt/index.html | 2 + .../CCRingBuffer/Array/Make/index.html | 5 + .../CCRingBuffer/Array/index.html | 2 + .../Array/module-type-S/index.html | 5 + .../CCRingBuffer/Byte/index.html | 15 ++ .../CCRingBuffer/Make/Array/index.html | 5 + .../CCRingBuffer/Make/argument-1-X/index.html | 2 + .../CCRingBuffer/Make/index.html | 15 ++ .../MakeFromArray/argument-1-A/index.html | 5 + .../CCRingBuffer/MakeFromArray/index.html | 15 ++ dev/containers.data/CCRingBuffer/index.html | 3 + .../module-type-S/Array/index.html | 5 + .../CCRingBuffer/module-type-S/index.html | 16 ++ dev/containers.data/CCSimple_queue.odoc | Bin 0 -> 3157 bytes .../CCSimple_queue/.jbuilder-keep | 0 .../CCSimple_queue/Infix/index.html | 2 + dev/containers.data/CCSimple_queue/index.html | 4 + dev/containers.data/CCTrie.odoc | Bin 0 -> 10017 bytes dev/containers.data/CCTrie/.jbuilder-keep | 0 .../CCTrie/Make/argument-1-W/index.html | 2 + dev/containers.data/CCTrie/Make/index.html | 11 + .../CCTrie/MakeArray/argument-1-X/index.html | 2 + .../CCTrie/MakeArray/index.html | 11 + .../CCTrie/MakeList/argument-1-X/index.html | 2 + .../CCTrie/MakeList/index.html | 11 + dev/containers.data/CCTrie/String/index.html | 11 + dev/containers.data/CCTrie/index.html | 2 + .../CCTrie/module-type-ORDERED/index.html | 2 + .../CCTrie/module-type-S/index.html | 11 + .../CCTrie/module-type-WORD/index.html | 2 + dev/containers.data/CCWBTree.odoc | Bin 0 -> 9127 bytes dev/containers.data/CCWBTree/.jbuilder-keep | 0 .../CCWBTree/Make/argument-1-X/index.html | 2 + dev/containers.data/CCWBTree/Make/index.html | 12 + .../CCWBTree/MakeFull/argument-1-X/index.html | 2 + .../CCWBTree/MakeFull/index.html | 12 + 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 | 12 + dev/containers.data/CCZipper.odoc | Bin 0 -> 2884 bytes dev/containers.data/CCZipper/.jbuilder-keep | 0 dev/containers.data/CCZipper/index.html | 11 + dev/containers.data/index-generated.mld | 2 + dev/containers.data/index.html | 3 + dev/containers.data/page-index.odoc | Bin 0 -> 635 bytes dev/containers.iter/CCKList.odoc | Bin 0 -> 8414 bytes dev/containers.iter/CCKList/.jbuilder-keep | 0 dev/containers.iter/CCKList/Infix/index.html | 2 + .../CCKList/Traverse/argument-1-M/index.html | 2 + .../CCKList/Traverse/index.html | 2 + dev/containers.iter/CCKList/index.html | 16 ++ .../CCKList/module-type-MONAD/index.html | 2 + dev/containers.iter/CCKTree.odoc | Bin 0 -> 4648 bytes dev/containers.iter/CCKTree/.jbuilder-keep | 0 dev/containers.iter/CCKTree/Dot/index.html | 4 + .../CCKTree/class-type-pset/index.html | 2 + dev/containers.iter/CCKTree/index.html | 22 ++ dev/containers.iter/CCLazy_list.odoc | Bin 0 -> 2010 bytes .../CCLazy_list/.jbuilder-keep | 0 .../CCLazy_list/Infix/index.html | 2 + dev/containers.iter/CCLazy_list/index.html | 3 + dev/containers.iter/index-generated.mld | 2 + dev/containers.iter/index.html | 3 + dev/containers.iter/page-index.odoc | Bin 0 -> 282 bytes dev/containers.monomorphic/CCMonomorphic.odoc | Bin 0 -> 1368 bytes .../CCMonomorphic/.jbuilder-keep | 0 .../CCMonomorphic/index.html | 2 + .../index-generated.mld | 2 + dev/containers.monomorphic/index.html | 3 + dev/containers.monomorphic/page-index.odoc | Bin 0 -> 279 bytes dev/containers.sexp/CCSexp.odoc | Bin 0 -> 3528 bytes dev/containers.sexp/CCSexp/.jbuilder-keep | 0 dev/containers.sexp/CCSexp/Decoder/index.html | 3 + dev/containers.sexp/CCSexp/index.html | 8 + dev/containers.sexp/CCSexp_lex.odoc | Bin 0 -> 1057 bytes dev/containers.sexp/CCSexp_lex/.jbuilder-keep | 0 dev/containers.sexp/CCSexp_lex/index.html | 2 + dev/containers.sexp/index-generated.mld | 2 + dev/containers.sexp/index.html | 3 + dev/containers.sexp/page-index.odoc | Bin 0 -> 267 bytes dev/containers.thread/CCBlockingQueue.odoc | Bin 0 -> 1877 bytes .../CCBlockingQueue/.jbuilder-keep | 0 .../CCBlockingQueue/index.html | 9 + dev/containers.thread/CCLock.odoc | Bin 0 -> 3059 bytes dev/containers.thread/CCLock/.jbuilder-keep | 0 .../CCLock/LockRef/index.html | 2 + dev/containers.thread/CCLock/index.html | 10 + dev/containers.thread/CCPool.odoc | Bin 0 -> 5814 bytes dev/containers.thread/CCPool/.jbuilder-keep | 0 .../CCPool/Make/Fut/Infix/index.html | 2 + .../CCPool/Make/Fut/index.html | 22 ++ .../CCPool/Make/argument-1-P/index.html | 2 + dev/containers.thread/CCPool/Make/index.html | 3 + dev/containers.thread/CCPool/index.html | 2 + .../CCPool/module-type-PARAM/index.html | 2 + dev/containers.thread/CCSemaphore.odoc | Bin 0 -> 1265 bytes .../CCSemaphore/.jbuilder-keep | 0 dev/containers.thread/CCSemaphore/index.html | 6 + dev/containers.thread/CCThread.odoc | Bin 0 -> 2021 bytes dev/containers.thread/CCThread/.jbuilder-keep | 0 dev/containers.thread/CCThread/Arr/index.html | 3 + .../CCThread/Barrier/index.html | 6 + dev/containers.thread/CCThread/index.html | 2 + dev/containers.thread/CCTimer.odoc | Bin 0 -> 1645 bytes dev/containers.thread/CCTimer/.jbuilder-keep | 0 dev/containers.thread/CCTimer/index.html | 6 + dev/containers.thread/index-generated.mld | 2 + dev/containers.thread/index.html | 3 + dev/containers.thread/page-index.odoc | Bin 0 -> 334 bytes .../Containers_top/.jbuilder-keep | 0 dev/containers.top/Containers_top/index.html | 2 + dev/containers.top/containers_top.odoc | Bin 0 -> 1331 bytes dev/containers.top/index-generated.mld | 2 + dev/containers.top/index.html | 3 + dev/containers.top/page-index.odoc | Bin 0 -> 256 bytes dev/containers.unix/CCUnix.odoc | Bin 0 -> 5475 bytes dev/containers.unix/CCUnix/.jbuilder-keep | 0 dev/containers.unix/CCUnix/Infix/index.html | 2 + dev/containers.unix/CCUnix/index.html | 18 ++ dev/containers.unix/index-generated.mld | 2 + dev/containers.unix/index.html | 3 + dev/containers.unix/page-index.odoc | Bin 0 -> 251 bytes dev/containers/CCArray.odoc | Bin 0 -> 11872 bytes dev/containers/CCArray/.jbuilder-keep | 0 dev/containers/CCArray/index.html | 53 ++++ .../CCArray/module-type-MONO_ARRAY/index.html | 2 + dev/containers/CCArrayLabels.odoc | Bin 0 -> 12065 bytes dev/containers/CCArrayLabels/.jbuilder-keep | 0 dev/containers/CCArrayLabels/index.html | 52 ++++ .../module-type-MONO_ARRAY/index.html | 2 + dev/containers/CCArray_slice.odoc | Bin 0 -> 9619 bytes dev/containers/CCArray_slice/.jbuilder-keep | 0 dev/containers/CCArray_slice/index.html | 42 ++++ dev/containers/CCBool.odoc | Bin 0 -> 866 bytes dev/containers/CCBool/.jbuilder-keep | 0 dev/containers/CCBool/index.html | 2 + dev/containers/CCChar.odoc | Bin 0 -> 2236 bytes dev/containers/CCChar/.jbuilder-keep | 0 dev/containers/CCChar/index.html | 9 + dev/containers/CCEqual.odoc | Bin 0 -> 1602 bytes dev/containers/CCEqual/.jbuilder-keep | 0 dev/containers/CCEqual/Infix/index.html | 2 + dev/containers/CCEqual/index.html | 7 + dev/containers/CCFloat.odoc | Bin 0 -> 4264 bytes dev/containers/CCFloat/.jbuilder-keep | 0 dev/containers/CCFloat/Infix/index.html | 2 + dev/containers/CCFloat/index.html | 8 + dev/containers/CCFormat.odoc | Bin 0 -> 18641 bytes dev/containers/CCFormat/.jbuilder-keep | 0 dev/containers/CCFormat/Dump/index.html | 2 + dev/containers/CCFormat/index.html | 44 ++++ dev/containers/CCFun.odoc | Bin 0 -> 3536 bytes dev/containers/CCFun/.jbuilder-keep | 0 .../CCFun/Monad/argument-1-X/index.html | 2 + dev/containers/CCFun/Monad/index.html | 2 + dev/containers/CCFun/index.html | 18 ++ dev/containers/CCHash.odoc | Bin 0 -> 2950 bytes dev/containers/CCHash/.jbuilder-keep | 0 dev/containers/CCHash/index.html | 8 + dev/containers/CCHashtbl.odoc | Bin 0 -> 9687 bytes dev/containers/CCHashtbl/.jbuilder-keep | 0 dev/containers/CCHashtbl/Poly/index.html | 21 ++ dev/containers/CCHashtbl/index.html | 21 ++ .../CCHashtbl/module-type-S/index.html | 21 ++ dev/containers/CCHeap.odoc | Bin 0 -> 6505 bytes dev/containers/CCHeap/.jbuilder-keep | 0 .../CCHeap/Make/argument-1-E/index.html | 2 + dev/containers/CCHeap/Make/index.html | 13 + dev/containers/CCHeap/index.html | 2 + .../CCHeap/module-type-PARTIAL_ORD/index.html | 2 + .../CCHeap/module-type-S/index.html | 13 + dev/containers/CCIO.odoc | Bin 0 -> 7528 bytes dev/containers/CCIO/.jbuilder-keep | 0 dev/containers/CCIO/File/index.html | 14 ++ dev/containers/CCIO/index.html | 23 ++ dev/containers/CCInt.odoc | Bin 0 -> 4526 bytes dev/containers/CCInt/.jbuilder-keep | 0 dev/containers/CCInt/Infix/index.html | 2 + dev/containers/CCInt/index.html | 10 + dev/containers/CCInt32.odoc | Bin 0 -> 7236 bytes dev/containers/CCInt32/.jbuilder-keep | 0 dev/containers/CCInt32/Infix/index.html | 2 + dev/containers/CCInt32/index.html | 39 +++ dev/containers/CCInt64.odoc | Bin 0 -> 8822 bytes dev/containers/CCInt64/.jbuilder-keep | 0 dev/containers/CCInt64/Infix/index.html | 2 + dev/containers/CCInt64/index.html | 46 ++++ dev/containers/CCList.odoc | Bin 0 -> 26812 bytes dev/containers/CCList/.jbuilder-keep | 0 dev/containers/CCList/Assoc/index.html | 4 + dev/containers/CCList/Infix/index.html | 2 + dev/containers/CCList/Ref/index.html | 3 + .../CCList/Traverse/argument-1-M/index.html | 2 + dev/containers/CCList/Traverse/index.html | 4 + dev/containers/CCList/index.html | 96 +++++++ .../CCList/module-type-MONAD/index.html | 2 + dev/containers/CCListLabels.odoc | Bin 0 -> 21796 bytes dev/containers/CCListLabels/.jbuilder-keep | 0 dev/containers/CCListLabels/Assoc/index.html | 4 + dev/containers/CCListLabels/Infix/index.html | 2 + dev/containers/CCListLabels/Ref/index.html | 3 + .../Traverse/argument-1-M/index.html | 2 + .../CCListLabels/Traverse/index.html | 4 + dev/containers/CCListLabels/index.html | 60 +++++ .../CCListLabels/module-type-MONAD/index.html | 2 + dev/containers/CCMap.odoc | Bin 0 -> 5454 bytes dev/containers/CCMap/.jbuilder-keep | 0 dev/containers/CCMap/index.html | 2 + dev/containers/CCMap/module-type-S/index.html | 10 + dev/containers/CCNativeint.odoc | Bin 0 -> 7521 bytes dev/containers/CCNativeint/.jbuilder-keep | 0 dev/containers/CCNativeint/Infix/index.html | 2 + dev/containers/CCNativeint/index.html | 40 +++ dev/containers/CCOpt.odoc | Bin 0 -> 6412 bytes dev/containers/CCOpt/.jbuilder-keep | 0 dev/containers/CCOpt/Infix/index.html | 2 + dev/containers/CCOpt/index.html | 10 + dev/containers/CCOrd.odoc | Bin 0 -> 2532 bytes dev/containers/CCOrd/.jbuilder-keep | 0 dev/containers/CCOrd/Infix/index.html | 4 + dev/containers/CCOrd/index.html | 15 ++ dev/containers/CCPair.odoc | Bin 0 -> 2542 bytes dev/containers/CCPair/.jbuilder-keep | 0 dev/containers/CCPair/index.html | 4 + dev/containers/CCParse.odoc | Bin 0 -> 10061 bytes dev/containers/CCParse/.jbuilder-keep | 0 dev/containers/CCParse/Infix/index.html | 13 + dev/containers/CCParse/U/index.html | 6 + dev/containers/CCParse/index.html | 51 ++++ dev/containers/CCRandom.odoc | Bin 0 -> 6138 bytes dev/containers/CCRandom/.jbuilder-keep | 0 dev/containers/CCRandom/index.html | 23 ++ dev/containers/CCRef.odoc | Bin 0 -> 1662 bytes dev/containers/CCRef/.jbuilder-keep | 0 dev/containers/CCRef/index.html | 2 + dev/containers/CCResult.odoc | Bin 0 -> 9191 bytes dev/containers/CCResult/.jbuilder-keep | 0 dev/containers/CCResult/Infix/index.html | 5 + .../CCResult/Traverse/argument-1-M/index.html | 2 + dev/containers/CCResult/Traverse/index.html | 2 + dev/containers/CCResult/index.html | 27 ++ .../CCResult/module-type-MONAD/index.html | 2 + dev/containers/CCSet.odoc | Bin 0 -> 3841 bytes dev/containers/CCSet/.jbuilder-keep | 0 dev/containers/CCSet/index.html | 2 + dev/containers/CCSet/module-type-S/index.html | 3 + dev/containers/CCString.odoc | Bin 0 -> 17813 bytes dev/containers/CCString/.jbuilder-keep | 0 dev/containers/CCString/Find/index.html | 2 + dev/containers/CCString/Split/index.html | 9 + dev/containers/CCString/Sub/index.html | 3 + dev/containers/CCString/index.html | 21 ++ .../CCString/module-type-S/index.html | 3 + dev/containers/CCUtf8_string.odoc | Bin 0 -> 2434 bytes dev/containers/CCUtf8_string/.jbuilder-keep | 0 dev/containers/CCUtf8_string/index.html | 3 + dev/containers/CCVector.odoc | Bin 0 -> 10041 bytes dev/containers/CCVector/.jbuilder-keep | 0 dev/containers/CCVector/index.html | 23 ++ dev/containers/Containers/.jbuilder-keep | 0 .../Containers/Hashtbl/Make/index.html | 2 + .../MakeSeeded/argument-1-H/index.html | 2 + .../Containers/Hashtbl/MakeSeeded/index.html | 2 + dev/containers/Containers/Hashtbl/index.html | 21 ++ .../Hashtbl/module-type-HashedType/index.html | 2 + .../Hashtbl/module-type-S'/index.html | 21 ++ .../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 + dev/containers/containers.odoc | Bin 0 -> 9175 bytes dev/containers/index-generated.mld | 2 + dev/containers/index.html | 3 + dev/containers/page-index.odoc | Bin 0 -> 654 bytes dev/index.html | 16 +- dev/odoc.css | 234 ++++++++++++++++++ index.md | 1 + last | 2 +- 782 files changed, 4323 insertions(+), 9 deletions(-) create mode 100644 2.1/containers.data/CCBV.odoc create mode 100644 2.1/containers.data/CCBV/.jbuilder-keep create mode 100644 2.1/containers.data/CCBV/index.html create mode 100644 2.1/containers.data/CCBijection.odoc create mode 100644 2.1/containers.data/CCBijection/.jbuilder-keep create mode 100644 2.1/containers.data/CCBijection/Make/argument-1-L/index.html create mode 100644 2.1/containers.data/CCBijection/Make/argument-2-R/index.html create mode 100644 2.1/containers.data/CCBijection/Make/index.html create mode 100644 2.1/containers.data/CCBijection/index.html create mode 100644 2.1/containers.data/CCBijection/module-type-OrderedType/index.html create mode 100644 2.1/containers.data/CCBijection/module-type-S/index.html create mode 100644 2.1/containers.data/CCBitField.odoc create mode 100644 2.1/containers.data/CCBitField/.jbuilder-keep create mode 100644 2.1/containers.data/CCBitField/Make/argument-1-X/index.html create mode 100644 2.1/containers.data/CCBitField/Make/index.html create mode 100644 2.1/containers.data/CCBitField/index.html create mode 100644 2.1/containers.data/CCBitField/module-type-S/index.html create mode 100644 2.1/containers.data/CCCache.odoc create mode 100644 2.1/containers.data/CCCache/.jbuilder-keep create mode 100644 2.1/containers.data/CCCache/index.html create mode 100644 2.1/containers.data/CCDeque.odoc create mode 100644 2.1/containers.data/CCDeque/.jbuilder-keep create mode 100644 2.1/containers.data/CCDeque/index.html create mode 100644 2.1/containers.data/CCFQueue.odoc create mode 100644 2.1/containers.data/CCFQueue/.jbuilder-keep create mode 100644 2.1/containers.data/CCFQueue/index.html create mode 100644 2.1/containers.data/CCFun_vec.odoc create mode 100644 2.1/containers.data/CCFun_vec/.jbuilder-keep create mode 100644 2.1/containers.data/CCFun_vec/index.html create mode 100644 2.1/containers.data/CCGraph.odoc create mode 100644 2.1/containers.data/CCGraph/.jbuilder-keep create mode 100644 2.1/containers.data/CCGraph/Dot/index.html create mode 100644 2.1/containers.data/CCGraph/Lazy_tree/index.html create mode 100644 2.1/containers.data/CCGraph/Map/index.html create mode 100644 2.1/containers.data/CCGraph/Seq/index.html create mode 100644 2.1/containers.data/CCGraph/Traverse/Event/index.html create mode 100644 2.1/containers.data/CCGraph/Traverse/index.html create mode 100644 2.1/containers.data/CCGraph/index.html create mode 100644 2.1/containers.data/CCGraph/module-type-MAP/index.html create mode 100644 2.1/containers.data/CCHashSet.odoc create mode 100644 2.1/containers.data/CCHashSet/.jbuilder-keep create mode 100644 2.1/containers.data/CCHashSet/Make/argument-1-E/index.html create mode 100644 2.1/containers.data/CCHashSet/Make/index.html create mode 100644 2.1/containers.data/CCHashSet/index.html create mode 100644 2.1/containers.data/CCHashSet/module-type-ELEMENT/index.html create mode 100644 2.1/containers.data/CCHashSet/module-type-S/index.html create mode 100644 2.1/containers.data/CCHashTrie.odoc create mode 100644 2.1/containers.data/CCHashTrie/.jbuilder-keep create mode 100644 2.1/containers.data/CCHashTrie/Make/argument-1-K/index.html create mode 100644 2.1/containers.data/CCHashTrie/Make/index.html create mode 100644 2.1/containers.data/CCHashTrie/Transient/index.html create mode 100644 2.1/containers.data/CCHashTrie/index.html create mode 100644 2.1/containers.data/CCHashTrie/module-type-KEY/index.html create mode 100644 2.1/containers.data/CCHashTrie/module-type-S/index.html create mode 100644 2.1/containers.data/CCHet.odoc create mode 100644 2.1/containers.data/CCHet/.jbuilder-keep create mode 100644 2.1/containers.data/CCHet/Key/index.html create mode 100644 2.1/containers.data/CCHet/Map/index.html create mode 100644 2.1/containers.data/CCHet/Tbl/index.html create mode 100644 2.1/containers.data/CCHet/index.html create mode 100644 2.1/containers.data/CCImmutArray.odoc create mode 100644 2.1/containers.data/CCImmutArray/.jbuilder-keep create mode 100644 2.1/containers.data/CCImmutArray/index.html create mode 100644 2.1/containers.data/CCIntMap.odoc create mode 100644 2.1/containers.data/CCIntMap/.jbuilder-keep create mode 100644 2.1/containers.data/CCIntMap/index.html create mode 100644 2.1/containers.data/CCMixmap.odoc create mode 100644 2.1/containers.data/CCMixmap/.jbuilder-keep create mode 100644 2.1/containers.data/CCMixmap/Make/argument-1-X/index.html create mode 100644 2.1/containers.data/CCMixmap/Make/index.html create mode 100644 2.1/containers.data/CCMixmap/index.html create mode 100644 2.1/containers.data/CCMixmap/module-type-ORD/index.html create mode 100644 2.1/containers.data/CCMixmap/module-type-S/index.html create mode 100644 2.1/containers.data/CCMixset.odoc create mode 100644 2.1/containers.data/CCMixset/.jbuilder-keep create mode 100644 2.1/containers.data/CCMixset/index.html create mode 100644 2.1/containers.data/CCMixtbl.odoc create mode 100644 2.1/containers.data/CCMixtbl/.jbuilder-keep create mode 100644 2.1/containers.data/CCMixtbl/index.html create mode 100644 2.1/containers.data/CCMultiMap.odoc create mode 100644 2.1/containers.data/CCMultiMap/.jbuilder-keep create mode 100644 2.1/containers.data/CCMultiMap/Make/argument-1-K/index.html create mode 100644 2.1/containers.data/CCMultiMap/Make/argument-2-V/index.html create mode 100644 2.1/containers.data/CCMultiMap/Make/index.html create mode 100644 2.1/containers.data/CCMultiMap/MakeBidir/argument-1-L/index.html create mode 100644 2.1/containers.data/CCMultiMap/MakeBidir/argument-2-R/index.html create mode 100644 2.1/containers.data/CCMultiMap/MakeBidir/index.html create mode 100644 2.1/containers.data/CCMultiMap/index.html create mode 100644 2.1/containers.data/CCMultiMap/module-type-BIDIR/index.html create mode 100644 2.1/containers.data/CCMultiMap/module-type-OrderedType/index.html create mode 100644 2.1/containers.data/CCMultiMap/module-type-S/index.html create mode 100644 2.1/containers.data/CCMultiSet.odoc create mode 100644 2.1/containers.data/CCMultiSet/.jbuilder-keep create mode 100644 2.1/containers.data/CCMultiSet/Make/index.html create mode 100644 2.1/containers.data/CCMultiSet/index.html create mode 100644 2.1/containers.data/CCMultiSet/module-type-S/index.html create mode 100644 2.1/containers.data/CCPersistentArray.odoc create mode 100644 2.1/containers.data/CCPersistentArray/.jbuilder-keep create mode 100644 2.1/containers.data/CCPersistentArray/index.html create mode 100644 2.1/containers.data/CCPersistentHashtbl.odoc create mode 100644 2.1/containers.data/CCPersistentHashtbl/.jbuilder-keep create mode 100644 2.1/containers.data/CCPersistentHashtbl/Make/argument-1-H/index.html create mode 100644 2.1/containers.data/CCPersistentHashtbl/Make/index.html create mode 100644 2.1/containers.data/CCPersistentHashtbl/index.html create mode 100644 2.1/containers.data/CCPersistentHashtbl/module-type-HashedType/index.html create mode 100644 2.1/containers.data/CCPersistentHashtbl/module-type-S/index.html create mode 100644 2.1/containers.data/CCRAL.odoc create mode 100644 2.1/containers.data/CCRAL/.jbuilder-keep create mode 100644 2.1/containers.data/CCRAL/Infix/index.html create mode 100644 2.1/containers.data/CCRAL/index.html create mode 100644 2.1/containers.data/CCRingBuffer.odoc create mode 100644 2.1/containers.data/CCRingBuffer/.jbuilder-keep create mode 100644 2.1/containers.data/CCRingBuffer/Array/Byte/index.html create mode 100644 2.1/containers.data/CCRingBuffer/Array/Make/argument-1-Elt/index.html create mode 100644 2.1/containers.data/CCRingBuffer/Array/Make/index.html create mode 100644 2.1/containers.data/CCRingBuffer/Array/index.html create mode 100644 2.1/containers.data/CCRingBuffer/Array/module-type-S/index.html create mode 100644 2.1/containers.data/CCRingBuffer/Byte/index.html create mode 100644 2.1/containers.data/CCRingBuffer/Make/Array/index.html create mode 100644 2.1/containers.data/CCRingBuffer/Make/argument-1-X/index.html create mode 100644 2.1/containers.data/CCRingBuffer/Make/index.html create mode 100644 2.1/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html create mode 100644 2.1/containers.data/CCRingBuffer/MakeFromArray/index.html create mode 100644 2.1/containers.data/CCRingBuffer/index.html create mode 100644 2.1/containers.data/CCRingBuffer/module-type-S/Array/index.html create mode 100644 2.1/containers.data/CCRingBuffer/module-type-S/index.html create mode 100644 2.1/containers.data/CCSimple_queue.odoc create mode 100644 2.1/containers.data/CCSimple_queue/.jbuilder-keep create mode 100644 2.1/containers.data/CCSimple_queue/Infix/index.html create mode 100644 2.1/containers.data/CCSimple_queue/index.html create mode 100644 2.1/containers.data/CCTrie.odoc create mode 100644 2.1/containers.data/CCTrie/.jbuilder-keep create mode 100644 2.1/containers.data/CCTrie/Make/argument-1-W/index.html create mode 100644 2.1/containers.data/CCTrie/Make/index.html create mode 100644 2.1/containers.data/CCTrie/MakeArray/argument-1-X/index.html create mode 100644 2.1/containers.data/CCTrie/MakeArray/index.html create mode 100644 2.1/containers.data/CCTrie/MakeList/argument-1-X/index.html create mode 100644 2.1/containers.data/CCTrie/MakeList/index.html create mode 100644 2.1/containers.data/CCTrie/String/index.html create mode 100644 2.1/containers.data/CCTrie/index.html create mode 100644 2.1/containers.data/CCTrie/module-type-ORDERED/index.html create mode 100644 2.1/containers.data/CCTrie/module-type-S/index.html create mode 100644 2.1/containers.data/CCTrie/module-type-WORD/index.html create mode 100644 2.1/containers.data/CCWBTree.odoc create mode 100644 2.1/containers.data/CCWBTree/.jbuilder-keep create mode 100644 2.1/containers.data/CCWBTree/Make/argument-1-X/index.html create mode 100644 2.1/containers.data/CCWBTree/Make/index.html create mode 100644 2.1/containers.data/CCWBTree/MakeFull/argument-1-X/index.html create mode 100644 2.1/containers.data/CCWBTree/MakeFull/index.html create mode 100644 2.1/containers.data/CCWBTree/index.html create mode 100644 2.1/containers.data/CCWBTree/module-type-KEY/index.html create mode 100644 2.1/containers.data/CCWBTree/module-type-ORD/index.html create mode 100644 2.1/containers.data/CCWBTree/module-type-S/index.html create mode 100644 2.1/containers.data/CCZipper.odoc create mode 100644 2.1/containers.data/CCZipper/.jbuilder-keep create mode 100644 2.1/containers.data/CCZipper/index.html create mode 100644 2.1/containers.data/index-generated.mld create mode 100644 2.1/containers.data/index.html create mode 100644 2.1/containers.data/page-index.odoc create mode 100644 2.1/containers.iter/CCKList.odoc create mode 100644 2.1/containers.iter/CCKList/.jbuilder-keep create mode 100644 2.1/containers.iter/CCKList/Infix/index.html create mode 100644 2.1/containers.iter/CCKList/Traverse/argument-1-M/index.html create mode 100644 2.1/containers.iter/CCKList/Traverse/index.html create mode 100644 2.1/containers.iter/CCKList/index.html create mode 100644 2.1/containers.iter/CCKList/module-type-MONAD/index.html create mode 100644 2.1/containers.iter/CCKTree.odoc create mode 100644 2.1/containers.iter/CCKTree/.jbuilder-keep create mode 100644 2.1/containers.iter/CCKTree/Dot/index.html create mode 100644 2.1/containers.iter/CCKTree/class-type-pset/index.html create mode 100644 2.1/containers.iter/CCKTree/index.html create mode 100644 2.1/containers.iter/CCLazy_list.odoc create mode 100644 2.1/containers.iter/CCLazy_list/.jbuilder-keep create mode 100644 2.1/containers.iter/CCLazy_list/Infix/index.html create mode 100644 2.1/containers.iter/CCLazy_list/index.html create mode 100644 2.1/containers.iter/index-generated.mld create mode 100644 2.1/containers.iter/index.html create mode 100644 2.1/containers.iter/page-index.odoc create mode 100644 2.1/containers.monomorphic/CCMonomorphic.odoc create mode 100644 2.1/containers.monomorphic/CCMonomorphic/.jbuilder-keep create mode 100644 2.1/containers.monomorphic/CCMonomorphic/index.html create mode 100644 2.1/containers.monomorphic/index-generated.mld create mode 100644 2.1/containers.monomorphic/index.html create mode 100644 2.1/containers.monomorphic/page-index.odoc create mode 100644 2.1/containers.sexp/CCSexp.odoc create mode 100644 2.1/containers.sexp/CCSexp/.jbuilder-keep create mode 100644 2.1/containers.sexp/CCSexp/Decoder/index.html create mode 100644 2.1/containers.sexp/CCSexp/index.html create mode 100644 2.1/containers.sexp/CCSexp_lex.odoc create mode 100644 2.1/containers.sexp/CCSexp_lex/.jbuilder-keep create mode 100644 2.1/containers.sexp/CCSexp_lex/index.html create mode 100644 2.1/containers.sexp/index-generated.mld create mode 100644 2.1/containers.sexp/index.html create mode 100644 2.1/containers.sexp/page-index.odoc create mode 100644 2.1/containers.thread/CCBlockingQueue.odoc create mode 100644 2.1/containers.thread/CCBlockingQueue/.jbuilder-keep create mode 100644 2.1/containers.thread/CCBlockingQueue/index.html create mode 100644 2.1/containers.thread/CCLock.odoc create mode 100644 2.1/containers.thread/CCLock/.jbuilder-keep create mode 100644 2.1/containers.thread/CCLock/LockRef/index.html create mode 100644 2.1/containers.thread/CCLock/index.html create mode 100644 2.1/containers.thread/CCPool.odoc create mode 100644 2.1/containers.thread/CCPool/.jbuilder-keep create mode 100644 2.1/containers.thread/CCPool/Make/Fut/Infix/index.html create mode 100644 2.1/containers.thread/CCPool/Make/Fut/index.html create mode 100644 2.1/containers.thread/CCPool/Make/argument-1-P/index.html create mode 100644 2.1/containers.thread/CCPool/Make/index.html create mode 100644 2.1/containers.thread/CCPool/index.html create mode 100644 2.1/containers.thread/CCPool/module-type-PARAM/index.html create mode 100644 2.1/containers.thread/CCSemaphore.odoc create mode 100644 2.1/containers.thread/CCSemaphore/.jbuilder-keep create mode 100644 2.1/containers.thread/CCSemaphore/index.html create mode 100644 2.1/containers.thread/CCThread.odoc create mode 100644 2.1/containers.thread/CCThread/.jbuilder-keep create mode 100644 2.1/containers.thread/CCThread/Arr/index.html create mode 100644 2.1/containers.thread/CCThread/Barrier/index.html create mode 100644 2.1/containers.thread/CCThread/index.html create mode 100644 2.1/containers.thread/CCTimer.odoc create mode 100644 2.1/containers.thread/CCTimer/.jbuilder-keep create mode 100644 2.1/containers.thread/CCTimer/index.html create mode 100644 2.1/containers.thread/index-generated.mld create mode 100644 2.1/containers.thread/index.html create mode 100644 2.1/containers.thread/page-index.odoc create mode 100644 2.1/containers.top/Containers_top/.jbuilder-keep create mode 100644 2.1/containers.top/Containers_top/index.html create mode 100644 2.1/containers.top/containers_top.odoc create mode 100644 2.1/containers.top/index-generated.mld create mode 100644 2.1/containers.top/index.html create mode 100644 2.1/containers.top/page-index.odoc create mode 100644 2.1/containers.unix/CCUnix.odoc create mode 100644 2.1/containers.unix/CCUnix/.jbuilder-keep create mode 100644 2.1/containers.unix/CCUnix/Infix/index.html create mode 100644 2.1/containers.unix/CCUnix/index.html create mode 100644 2.1/containers.unix/index-generated.mld create mode 100644 2.1/containers.unix/index.html create mode 100644 2.1/containers.unix/page-index.odoc create mode 100644 2.1/containers/CCArray.odoc create mode 100644 2.1/containers/CCArray/.jbuilder-keep create mode 100644 2.1/containers/CCArray/index.html create mode 100644 2.1/containers/CCArray/module-type-MONO_ARRAY/index.html create mode 100644 2.1/containers/CCArrayLabels.odoc create mode 100644 2.1/containers/CCArrayLabels/.jbuilder-keep create mode 100644 2.1/containers/CCArrayLabels/index.html create mode 100644 2.1/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html create mode 100644 2.1/containers/CCArray_slice.odoc create mode 100644 2.1/containers/CCArray_slice/.jbuilder-keep create mode 100644 2.1/containers/CCArray_slice/index.html create mode 100644 2.1/containers/CCBool.odoc create mode 100644 2.1/containers/CCBool/.jbuilder-keep create mode 100644 2.1/containers/CCBool/index.html create mode 100644 2.1/containers/CCChar.odoc create mode 100644 2.1/containers/CCChar/.jbuilder-keep create mode 100644 2.1/containers/CCChar/index.html create mode 100644 2.1/containers/CCEqual.odoc create mode 100644 2.1/containers/CCEqual/.jbuilder-keep create mode 100644 2.1/containers/CCEqual/Infix/index.html create mode 100644 2.1/containers/CCEqual/index.html create mode 100644 2.1/containers/CCFloat.odoc create mode 100644 2.1/containers/CCFloat/.jbuilder-keep create mode 100644 2.1/containers/CCFloat/Infix/index.html create mode 100644 2.1/containers/CCFloat/index.html create mode 100644 2.1/containers/CCFormat.odoc create mode 100644 2.1/containers/CCFormat/.jbuilder-keep create mode 100644 2.1/containers/CCFormat/Dump/index.html create mode 100644 2.1/containers/CCFormat/index.html create mode 100644 2.1/containers/CCFun.odoc create mode 100644 2.1/containers/CCFun/.jbuilder-keep create mode 100644 2.1/containers/CCFun/Monad/argument-1-X/index.html create mode 100644 2.1/containers/CCFun/Monad/index.html create mode 100644 2.1/containers/CCFun/index.html create mode 100644 2.1/containers/CCHash.odoc create mode 100644 2.1/containers/CCHash/.jbuilder-keep create mode 100644 2.1/containers/CCHash/index.html create mode 100644 2.1/containers/CCHashtbl.odoc create mode 100644 2.1/containers/CCHashtbl/.jbuilder-keep create mode 100644 2.1/containers/CCHashtbl/Poly/index.html create mode 100644 2.1/containers/CCHashtbl/index.html create mode 100644 2.1/containers/CCHashtbl/module-type-S/index.html create mode 100644 2.1/containers/CCHeap.odoc create mode 100644 2.1/containers/CCHeap/.jbuilder-keep create mode 100644 2.1/containers/CCHeap/Make/argument-1-E/index.html create mode 100644 2.1/containers/CCHeap/Make/index.html create mode 100644 2.1/containers/CCHeap/index.html create mode 100644 2.1/containers/CCHeap/module-type-PARTIAL_ORD/index.html create mode 100644 2.1/containers/CCHeap/module-type-S/index.html create mode 100644 2.1/containers/CCIO.odoc create mode 100644 2.1/containers/CCIO/.jbuilder-keep create mode 100644 2.1/containers/CCIO/File/index.html create mode 100644 2.1/containers/CCIO/index.html create mode 100644 2.1/containers/CCInt.odoc create mode 100644 2.1/containers/CCInt/.jbuilder-keep create mode 100644 2.1/containers/CCInt/Infix/index.html create mode 100644 2.1/containers/CCInt/index.html create mode 100644 2.1/containers/CCInt32.odoc create mode 100644 2.1/containers/CCInt32/.jbuilder-keep create mode 100644 2.1/containers/CCInt32/Infix/index.html create mode 100644 2.1/containers/CCInt32/index.html create mode 100644 2.1/containers/CCInt64.odoc create mode 100644 2.1/containers/CCInt64/.jbuilder-keep create mode 100644 2.1/containers/CCInt64/Infix/index.html create mode 100644 2.1/containers/CCInt64/index.html create mode 100644 2.1/containers/CCList.odoc create mode 100644 2.1/containers/CCList/.jbuilder-keep create mode 100644 2.1/containers/CCList/Assoc/index.html create mode 100644 2.1/containers/CCList/Infix/index.html create mode 100644 2.1/containers/CCList/Ref/index.html create mode 100644 2.1/containers/CCList/Traverse/argument-1-M/index.html create mode 100644 2.1/containers/CCList/Traverse/index.html create mode 100644 2.1/containers/CCList/index.html create mode 100644 2.1/containers/CCList/module-type-MONAD/index.html create mode 100644 2.1/containers/CCListLabels.odoc create mode 100644 2.1/containers/CCListLabels/.jbuilder-keep create mode 100644 2.1/containers/CCListLabels/Assoc/index.html create mode 100644 2.1/containers/CCListLabels/Infix/index.html create mode 100644 2.1/containers/CCListLabels/Ref/index.html create mode 100644 2.1/containers/CCListLabels/Traverse/argument-1-M/index.html create mode 100644 2.1/containers/CCListLabels/Traverse/index.html create mode 100644 2.1/containers/CCListLabels/index.html create mode 100644 2.1/containers/CCListLabels/module-type-MONAD/index.html create mode 100644 2.1/containers/CCMap.odoc create mode 100644 2.1/containers/CCMap/.jbuilder-keep create mode 100644 2.1/containers/CCMap/index.html create mode 100644 2.1/containers/CCMap/module-type-S/index.html create mode 100644 2.1/containers/CCNativeint.odoc create mode 100644 2.1/containers/CCNativeint/.jbuilder-keep create mode 100644 2.1/containers/CCNativeint/Infix/index.html create mode 100644 2.1/containers/CCNativeint/index.html create mode 100644 2.1/containers/CCOpt.odoc create mode 100644 2.1/containers/CCOpt/.jbuilder-keep create mode 100644 2.1/containers/CCOpt/Infix/index.html create mode 100644 2.1/containers/CCOpt/index.html create mode 100644 2.1/containers/CCOrd.odoc create mode 100644 2.1/containers/CCOrd/.jbuilder-keep create mode 100644 2.1/containers/CCOrd/Infix/index.html create mode 100644 2.1/containers/CCOrd/index.html create mode 100644 2.1/containers/CCPair.odoc create mode 100644 2.1/containers/CCPair/.jbuilder-keep create mode 100644 2.1/containers/CCPair/index.html create mode 100644 2.1/containers/CCParse.odoc create mode 100644 2.1/containers/CCParse/.jbuilder-keep create mode 100644 2.1/containers/CCParse/Infix/index.html create mode 100644 2.1/containers/CCParse/U/index.html create mode 100644 2.1/containers/CCParse/index.html create mode 100644 2.1/containers/CCRandom.odoc create mode 100644 2.1/containers/CCRandom/.jbuilder-keep create mode 100644 2.1/containers/CCRandom/index.html create mode 100644 2.1/containers/CCRef.odoc create mode 100644 2.1/containers/CCRef/.jbuilder-keep create mode 100644 2.1/containers/CCRef/index.html create mode 100644 2.1/containers/CCResult.odoc create mode 100644 2.1/containers/CCResult/.jbuilder-keep create mode 100644 2.1/containers/CCResult/Infix/index.html create mode 100644 2.1/containers/CCResult/Traverse/argument-1-M/index.html create mode 100644 2.1/containers/CCResult/Traverse/index.html create mode 100644 2.1/containers/CCResult/index.html create mode 100644 2.1/containers/CCResult/module-type-MONAD/index.html create mode 100644 2.1/containers/CCSet.odoc create mode 100644 2.1/containers/CCSet/.jbuilder-keep create mode 100644 2.1/containers/CCSet/index.html create mode 100644 2.1/containers/CCSet/module-type-S/index.html create mode 100644 2.1/containers/CCString.odoc create mode 100644 2.1/containers/CCString/.jbuilder-keep create mode 100644 2.1/containers/CCString/Find/index.html create mode 100644 2.1/containers/CCString/Split/index.html create mode 100644 2.1/containers/CCString/Sub/index.html create mode 100644 2.1/containers/CCString/index.html create mode 100644 2.1/containers/CCString/module-type-S/index.html create mode 100644 2.1/containers/CCUtf8_string.odoc create mode 100644 2.1/containers/CCUtf8_string/.jbuilder-keep create mode 100644 2.1/containers/CCUtf8_string/index.html create mode 100644 2.1/containers/CCVector.odoc create mode 100644 2.1/containers/CCVector/.jbuilder-keep create mode 100644 2.1/containers/CCVector/index.html create mode 100644 2.1/containers/Containers/.jbuilder-keep create mode 100644 2.1/containers/Containers/Hashtbl/Make/index.html create mode 100644 2.1/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html create mode 100644 2.1/containers/Containers/Hashtbl/MakeSeeded/index.html create mode 100644 2.1/containers/Containers/Hashtbl/index.html create mode 100644 2.1/containers/Containers/Hashtbl/module-type-HashedType/index.html create mode 100644 2.1/containers/Containers/Hashtbl/module-type-S'/index.html create mode 100644 2.1/containers/Containers/Hashtbl/module-type-S/index.html create mode 100644 2.1/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html create mode 100644 2.1/containers/Containers/Hashtbl/module-type-SeededS/index.html create mode 100644 2.1/containers/Containers/index.html create mode 100644 2.1/containers/containers.odoc create mode 100644 2.1/containers/index-generated.mld create mode 100644 2.1/containers/index.html create mode 100644 2.1/containers/page-index.odoc create mode 100644 2.1/index.html create mode 100644 2.1/odoc.css create mode 100644 dev/containers.data/CCBV.odoc create mode 100644 dev/containers.data/CCBV/.jbuilder-keep create mode 100644 dev/containers.data/CCBV/index.html create mode 100644 dev/containers.data/CCBijection.odoc create mode 100644 dev/containers.data/CCBijection/.jbuilder-keep create mode 100644 dev/containers.data/CCBijection/Make/argument-1-L/index.html create mode 100644 dev/containers.data/CCBijection/Make/argument-2-R/index.html create mode 100644 dev/containers.data/CCBijection/Make/index.html create mode 100644 dev/containers.data/CCBijection/index.html create mode 100644 dev/containers.data/CCBijection/module-type-OrderedType/index.html create mode 100644 dev/containers.data/CCBijection/module-type-S/index.html create mode 100644 dev/containers.data/CCBitField.odoc create mode 100644 dev/containers.data/CCBitField/.jbuilder-keep create mode 100644 dev/containers.data/CCBitField/Make/argument-1-X/index.html create mode 100644 dev/containers.data/CCBitField/Make/index.html create mode 100644 dev/containers.data/CCBitField/index.html create mode 100644 dev/containers.data/CCBitField/module-type-S/index.html create mode 100644 dev/containers.data/CCCache.odoc create mode 100644 dev/containers.data/CCCache/.jbuilder-keep create mode 100644 dev/containers.data/CCCache/index.html create mode 100644 dev/containers.data/CCDeque.odoc create mode 100644 dev/containers.data/CCDeque/.jbuilder-keep create mode 100644 dev/containers.data/CCDeque/index.html create mode 100644 dev/containers.data/CCFQueue.odoc create mode 100644 dev/containers.data/CCFQueue/.jbuilder-keep create mode 100644 dev/containers.data/CCFQueue/index.html create mode 100644 dev/containers.data/CCFun_vec.odoc create mode 100644 dev/containers.data/CCFun_vec/.jbuilder-keep create mode 100644 dev/containers.data/CCFun_vec/index.html create mode 100644 dev/containers.data/CCGraph.odoc create mode 100644 dev/containers.data/CCGraph/.jbuilder-keep create mode 100644 dev/containers.data/CCGraph/Dot/index.html create mode 100644 dev/containers.data/CCGraph/Lazy_tree/index.html create mode 100644 dev/containers.data/CCGraph/Map/index.html create mode 100644 dev/containers.data/CCGraph/Seq/index.html create mode 100644 dev/containers.data/CCGraph/Traverse/Event/index.html create mode 100644 dev/containers.data/CCGraph/Traverse/index.html create mode 100644 dev/containers.data/CCGraph/index.html create mode 100644 dev/containers.data/CCGraph/module-type-MAP/index.html create mode 100644 dev/containers.data/CCHashSet.odoc create mode 100644 dev/containers.data/CCHashSet/.jbuilder-keep create mode 100644 dev/containers.data/CCHashSet/Make/argument-1-E/index.html create mode 100644 dev/containers.data/CCHashSet/Make/index.html create mode 100644 dev/containers.data/CCHashSet/index.html create mode 100644 dev/containers.data/CCHashSet/module-type-ELEMENT/index.html create mode 100644 dev/containers.data/CCHashSet/module-type-S/index.html create mode 100644 dev/containers.data/CCHashTrie.odoc create mode 100644 dev/containers.data/CCHashTrie/.jbuilder-keep create mode 100644 dev/containers.data/CCHashTrie/Make/argument-1-K/index.html create mode 100644 dev/containers.data/CCHashTrie/Make/index.html create mode 100644 dev/containers.data/CCHashTrie/Transient/index.html create mode 100644 dev/containers.data/CCHashTrie/index.html create mode 100644 dev/containers.data/CCHashTrie/module-type-KEY/index.html create mode 100644 dev/containers.data/CCHashTrie/module-type-S/index.html create mode 100644 dev/containers.data/CCHet.odoc create mode 100644 dev/containers.data/CCHet/.jbuilder-keep create mode 100644 dev/containers.data/CCHet/Key/index.html create mode 100644 dev/containers.data/CCHet/Map/index.html create mode 100644 dev/containers.data/CCHet/Tbl/index.html create mode 100644 dev/containers.data/CCHet/index.html create mode 100644 dev/containers.data/CCImmutArray.odoc create mode 100644 dev/containers.data/CCImmutArray/.jbuilder-keep create mode 100644 dev/containers.data/CCImmutArray/index.html create mode 100644 dev/containers.data/CCIntMap.odoc create mode 100644 dev/containers.data/CCIntMap/.jbuilder-keep create mode 100644 dev/containers.data/CCIntMap/index.html create mode 100644 dev/containers.data/CCMixmap.odoc create mode 100644 dev/containers.data/CCMixmap/.jbuilder-keep create mode 100644 dev/containers.data/CCMixmap/Make/argument-1-X/index.html create mode 100644 dev/containers.data/CCMixmap/Make/index.html create mode 100644 dev/containers.data/CCMixmap/index.html create mode 100644 dev/containers.data/CCMixmap/module-type-ORD/index.html create mode 100644 dev/containers.data/CCMixmap/module-type-S/index.html create mode 100644 dev/containers.data/CCMixset.odoc create mode 100644 dev/containers.data/CCMixset/.jbuilder-keep create mode 100644 dev/containers.data/CCMixset/index.html create mode 100644 dev/containers.data/CCMixtbl.odoc create mode 100644 dev/containers.data/CCMixtbl/.jbuilder-keep create mode 100644 dev/containers.data/CCMixtbl/index.html create mode 100644 dev/containers.data/CCMultiMap.odoc create mode 100644 dev/containers.data/CCMultiMap/.jbuilder-keep create mode 100644 dev/containers.data/CCMultiMap/Make/argument-1-K/index.html create mode 100644 dev/containers.data/CCMultiMap/Make/argument-2-V/index.html create mode 100644 dev/containers.data/CCMultiMap/Make/index.html create mode 100644 dev/containers.data/CCMultiMap/MakeBidir/argument-1-L/index.html create mode 100644 dev/containers.data/CCMultiMap/MakeBidir/argument-2-R/index.html create mode 100644 dev/containers.data/CCMultiMap/MakeBidir/index.html create mode 100644 dev/containers.data/CCMultiMap/index.html create mode 100644 dev/containers.data/CCMultiMap/module-type-BIDIR/index.html create mode 100644 dev/containers.data/CCMultiMap/module-type-OrderedType/index.html create mode 100644 dev/containers.data/CCMultiMap/module-type-S/index.html create mode 100644 dev/containers.data/CCMultiSet.odoc create mode 100644 dev/containers.data/CCMultiSet/.jbuilder-keep create mode 100644 dev/containers.data/CCMultiSet/Make/index.html create mode 100644 dev/containers.data/CCMultiSet/index.html create mode 100644 dev/containers.data/CCMultiSet/module-type-S/index.html create mode 100644 dev/containers.data/CCPersistentArray.odoc create mode 100644 dev/containers.data/CCPersistentArray/.jbuilder-keep create mode 100644 dev/containers.data/CCPersistentArray/index.html create mode 100644 dev/containers.data/CCPersistentHashtbl.odoc create mode 100644 dev/containers.data/CCPersistentHashtbl/.jbuilder-keep create mode 100644 dev/containers.data/CCPersistentHashtbl/Make/argument-1-H/index.html create mode 100644 dev/containers.data/CCPersistentHashtbl/Make/index.html create mode 100644 dev/containers.data/CCPersistentHashtbl/index.html create mode 100644 dev/containers.data/CCPersistentHashtbl/module-type-HashedType/index.html create mode 100644 dev/containers.data/CCPersistentHashtbl/module-type-S/index.html create mode 100644 dev/containers.data/CCRAL.odoc create mode 100644 dev/containers.data/CCRAL/.jbuilder-keep create mode 100644 dev/containers.data/CCRAL/Infix/index.html create mode 100644 dev/containers.data/CCRAL/index.html create mode 100644 dev/containers.data/CCRingBuffer.odoc create mode 100644 dev/containers.data/CCRingBuffer/.jbuilder-keep create mode 100644 dev/containers.data/CCRingBuffer/Array/Byte/index.html create mode 100644 dev/containers.data/CCRingBuffer/Array/Make/argument-1-Elt/index.html create mode 100644 dev/containers.data/CCRingBuffer/Array/Make/index.html create mode 100644 dev/containers.data/CCRingBuffer/Array/index.html create mode 100644 dev/containers.data/CCRingBuffer/Array/module-type-S/index.html create mode 100644 dev/containers.data/CCRingBuffer/Byte/index.html create mode 100644 dev/containers.data/CCRingBuffer/Make/Array/index.html create mode 100644 dev/containers.data/CCRingBuffer/Make/argument-1-X/index.html create mode 100644 dev/containers.data/CCRingBuffer/Make/index.html create mode 100644 dev/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html create mode 100644 dev/containers.data/CCRingBuffer/MakeFromArray/index.html create mode 100644 dev/containers.data/CCRingBuffer/index.html create mode 100644 dev/containers.data/CCRingBuffer/module-type-S/Array/index.html create mode 100644 dev/containers.data/CCRingBuffer/module-type-S/index.html create mode 100644 dev/containers.data/CCSimple_queue.odoc create mode 100644 dev/containers.data/CCSimple_queue/.jbuilder-keep create mode 100644 dev/containers.data/CCSimple_queue/Infix/index.html create mode 100644 dev/containers.data/CCSimple_queue/index.html create mode 100644 dev/containers.data/CCTrie.odoc create mode 100644 dev/containers.data/CCTrie/.jbuilder-keep create mode 100644 dev/containers.data/CCTrie/Make/argument-1-W/index.html create mode 100644 dev/containers.data/CCTrie/Make/index.html create mode 100644 dev/containers.data/CCTrie/MakeArray/argument-1-X/index.html create mode 100644 dev/containers.data/CCTrie/MakeArray/index.html create mode 100644 dev/containers.data/CCTrie/MakeList/argument-1-X/index.html create mode 100644 dev/containers.data/CCTrie/MakeList/index.html create mode 100644 dev/containers.data/CCTrie/String/index.html create mode 100644 dev/containers.data/CCTrie/index.html create mode 100644 dev/containers.data/CCTrie/module-type-ORDERED/index.html create mode 100644 dev/containers.data/CCTrie/module-type-S/index.html create mode 100644 dev/containers.data/CCTrie/module-type-WORD/index.html create mode 100644 dev/containers.data/CCWBTree.odoc create mode 100644 dev/containers.data/CCWBTree/.jbuilder-keep create mode 100644 dev/containers.data/CCWBTree/Make/argument-1-X/index.html create mode 100644 dev/containers.data/CCWBTree/Make/index.html create mode 100644 dev/containers.data/CCWBTree/MakeFull/argument-1-X/index.html create mode 100644 dev/containers.data/CCWBTree/MakeFull/index.html create mode 100644 dev/containers.data/CCWBTree/index.html create mode 100644 dev/containers.data/CCWBTree/module-type-KEY/index.html create mode 100644 dev/containers.data/CCWBTree/module-type-ORD/index.html create mode 100644 dev/containers.data/CCWBTree/module-type-S/index.html create mode 100644 dev/containers.data/CCZipper.odoc create mode 100644 dev/containers.data/CCZipper/.jbuilder-keep create mode 100644 dev/containers.data/CCZipper/index.html create mode 100644 dev/containers.data/index-generated.mld create mode 100644 dev/containers.data/index.html create mode 100644 dev/containers.data/page-index.odoc create mode 100644 dev/containers.iter/CCKList.odoc create mode 100644 dev/containers.iter/CCKList/.jbuilder-keep create mode 100644 dev/containers.iter/CCKList/Infix/index.html create mode 100644 dev/containers.iter/CCKList/Traverse/argument-1-M/index.html create mode 100644 dev/containers.iter/CCKList/Traverse/index.html create mode 100644 dev/containers.iter/CCKList/index.html create mode 100644 dev/containers.iter/CCKList/module-type-MONAD/index.html create mode 100644 dev/containers.iter/CCKTree.odoc create mode 100644 dev/containers.iter/CCKTree/.jbuilder-keep create mode 100644 dev/containers.iter/CCKTree/Dot/index.html create mode 100644 dev/containers.iter/CCKTree/class-type-pset/index.html create mode 100644 dev/containers.iter/CCKTree/index.html create mode 100644 dev/containers.iter/CCLazy_list.odoc create mode 100644 dev/containers.iter/CCLazy_list/.jbuilder-keep create mode 100644 dev/containers.iter/CCLazy_list/Infix/index.html create mode 100644 dev/containers.iter/CCLazy_list/index.html create mode 100644 dev/containers.iter/index-generated.mld create mode 100644 dev/containers.iter/index.html create mode 100644 dev/containers.iter/page-index.odoc create mode 100644 dev/containers.monomorphic/CCMonomorphic.odoc create mode 100644 dev/containers.monomorphic/CCMonomorphic/.jbuilder-keep create mode 100644 dev/containers.monomorphic/CCMonomorphic/index.html create mode 100644 dev/containers.monomorphic/index-generated.mld create mode 100644 dev/containers.monomorphic/index.html create mode 100644 dev/containers.monomorphic/page-index.odoc create mode 100644 dev/containers.sexp/CCSexp.odoc create mode 100644 dev/containers.sexp/CCSexp/.jbuilder-keep create mode 100644 dev/containers.sexp/CCSexp/Decoder/index.html create mode 100644 dev/containers.sexp/CCSexp/index.html create mode 100644 dev/containers.sexp/CCSexp_lex.odoc create mode 100644 dev/containers.sexp/CCSexp_lex/.jbuilder-keep create mode 100644 dev/containers.sexp/CCSexp_lex/index.html create mode 100644 dev/containers.sexp/index-generated.mld create mode 100644 dev/containers.sexp/index.html create mode 100644 dev/containers.sexp/page-index.odoc create mode 100644 dev/containers.thread/CCBlockingQueue.odoc create mode 100644 dev/containers.thread/CCBlockingQueue/.jbuilder-keep create mode 100644 dev/containers.thread/CCBlockingQueue/index.html create mode 100644 dev/containers.thread/CCLock.odoc create mode 100644 dev/containers.thread/CCLock/.jbuilder-keep create mode 100644 dev/containers.thread/CCLock/LockRef/index.html create mode 100644 dev/containers.thread/CCLock/index.html create mode 100644 dev/containers.thread/CCPool.odoc create mode 100644 dev/containers.thread/CCPool/.jbuilder-keep create mode 100644 dev/containers.thread/CCPool/Make/Fut/Infix/index.html create mode 100644 dev/containers.thread/CCPool/Make/Fut/index.html create mode 100644 dev/containers.thread/CCPool/Make/argument-1-P/index.html create mode 100644 dev/containers.thread/CCPool/Make/index.html create mode 100644 dev/containers.thread/CCPool/index.html create mode 100644 dev/containers.thread/CCPool/module-type-PARAM/index.html create mode 100644 dev/containers.thread/CCSemaphore.odoc create mode 100644 dev/containers.thread/CCSemaphore/.jbuilder-keep create mode 100644 dev/containers.thread/CCSemaphore/index.html create mode 100644 dev/containers.thread/CCThread.odoc create mode 100644 dev/containers.thread/CCThread/.jbuilder-keep create mode 100644 dev/containers.thread/CCThread/Arr/index.html create mode 100644 dev/containers.thread/CCThread/Barrier/index.html create mode 100644 dev/containers.thread/CCThread/index.html create mode 100644 dev/containers.thread/CCTimer.odoc create mode 100644 dev/containers.thread/CCTimer/.jbuilder-keep create mode 100644 dev/containers.thread/CCTimer/index.html create mode 100644 dev/containers.thread/index-generated.mld create mode 100644 dev/containers.thread/index.html create mode 100644 dev/containers.thread/page-index.odoc create mode 100644 dev/containers.top/Containers_top/.jbuilder-keep create mode 100644 dev/containers.top/Containers_top/index.html create mode 100644 dev/containers.top/containers_top.odoc create mode 100644 dev/containers.top/index-generated.mld create mode 100644 dev/containers.top/index.html create mode 100644 dev/containers.top/page-index.odoc create mode 100644 dev/containers.unix/CCUnix.odoc create mode 100644 dev/containers.unix/CCUnix/.jbuilder-keep create mode 100644 dev/containers.unix/CCUnix/Infix/index.html create mode 100644 dev/containers.unix/CCUnix/index.html create mode 100644 dev/containers.unix/index-generated.mld create mode 100644 dev/containers.unix/index.html create mode 100644 dev/containers.unix/page-index.odoc create mode 100644 dev/containers/CCArray.odoc create mode 100644 dev/containers/CCArray/.jbuilder-keep create mode 100644 dev/containers/CCArray/index.html create mode 100644 dev/containers/CCArray/module-type-MONO_ARRAY/index.html create mode 100644 dev/containers/CCArrayLabels.odoc create mode 100644 dev/containers/CCArrayLabels/.jbuilder-keep create mode 100644 dev/containers/CCArrayLabels/index.html create mode 100644 dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html create mode 100644 dev/containers/CCArray_slice.odoc create mode 100644 dev/containers/CCArray_slice/.jbuilder-keep create mode 100644 dev/containers/CCArray_slice/index.html create mode 100644 dev/containers/CCBool.odoc create mode 100644 dev/containers/CCBool/.jbuilder-keep create mode 100644 dev/containers/CCBool/index.html create mode 100644 dev/containers/CCChar.odoc create mode 100644 dev/containers/CCChar/.jbuilder-keep create mode 100644 dev/containers/CCChar/index.html create mode 100644 dev/containers/CCEqual.odoc create mode 100644 dev/containers/CCEqual/.jbuilder-keep create mode 100644 dev/containers/CCEqual/Infix/index.html create mode 100644 dev/containers/CCEqual/index.html create mode 100644 dev/containers/CCFloat.odoc create mode 100644 dev/containers/CCFloat/.jbuilder-keep create mode 100644 dev/containers/CCFloat/Infix/index.html create mode 100644 dev/containers/CCFloat/index.html create mode 100644 dev/containers/CCFormat.odoc create mode 100644 dev/containers/CCFormat/.jbuilder-keep create mode 100644 dev/containers/CCFormat/Dump/index.html create mode 100644 dev/containers/CCFormat/index.html create mode 100644 dev/containers/CCFun.odoc create mode 100644 dev/containers/CCFun/.jbuilder-keep create mode 100644 dev/containers/CCFun/Monad/argument-1-X/index.html create mode 100644 dev/containers/CCFun/Monad/index.html create mode 100644 dev/containers/CCFun/index.html create mode 100644 dev/containers/CCHash.odoc create mode 100644 dev/containers/CCHash/.jbuilder-keep create mode 100644 dev/containers/CCHash/index.html create mode 100644 dev/containers/CCHashtbl.odoc create mode 100644 dev/containers/CCHashtbl/.jbuilder-keep create mode 100644 dev/containers/CCHashtbl/Poly/index.html create mode 100644 dev/containers/CCHashtbl/index.html create mode 100644 dev/containers/CCHashtbl/module-type-S/index.html create mode 100644 dev/containers/CCHeap.odoc create mode 100644 dev/containers/CCHeap/.jbuilder-keep create mode 100644 dev/containers/CCHeap/Make/argument-1-E/index.html create mode 100644 dev/containers/CCHeap/Make/index.html create mode 100644 dev/containers/CCHeap/index.html create mode 100644 dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html create mode 100644 dev/containers/CCHeap/module-type-S/index.html create mode 100644 dev/containers/CCIO.odoc create mode 100644 dev/containers/CCIO/.jbuilder-keep create mode 100644 dev/containers/CCIO/File/index.html create mode 100644 dev/containers/CCIO/index.html create mode 100644 dev/containers/CCInt.odoc create mode 100644 dev/containers/CCInt/.jbuilder-keep create mode 100644 dev/containers/CCInt/Infix/index.html create mode 100644 dev/containers/CCInt/index.html create mode 100644 dev/containers/CCInt32.odoc create mode 100644 dev/containers/CCInt32/.jbuilder-keep create mode 100644 dev/containers/CCInt32/Infix/index.html create mode 100644 dev/containers/CCInt32/index.html create mode 100644 dev/containers/CCInt64.odoc create mode 100644 dev/containers/CCInt64/.jbuilder-keep create mode 100644 dev/containers/CCInt64/Infix/index.html create mode 100644 dev/containers/CCInt64/index.html create mode 100644 dev/containers/CCList.odoc create mode 100644 dev/containers/CCList/.jbuilder-keep create mode 100644 dev/containers/CCList/Assoc/index.html create mode 100644 dev/containers/CCList/Infix/index.html create mode 100644 dev/containers/CCList/Ref/index.html create mode 100644 dev/containers/CCList/Traverse/argument-1-M/index.html create mode 100644 dev/containers/CCList/Traverse/index.html create mode 100644 dev/containers/CCList/index.html create mode 100644 dev/containers/CCList/module-type-MONAD/index.html create mode 100644 dev/containers/CCListLabels.odoc create mode 100644 dev/containers/CCListLabels/.jbuilder-keep create mode 100644 dev/containers/CCListLabels/Assoc/index.html create mode 100644 dev/containers/CCListLabels/Infix/index.html create mode 100644 dev/containers/CCListLabels/Ref/index.html create mode 100644 dev/containers/CCListLabels/Traverse/argument-1-M/index.html create mode 100644 dev/containers/CCListLabels/Traverse/index.html create mode 100644 dev/containers/CCListLabels/index.html create mode 100644 dev/containers/CCListLabels/module-type-MONAD/index.html create mode 100644 dev/containers/CCMap.odoc create mode 100644 dev/containers/CCMap/.jbuilder-keep create mode 100644 dev/containers/CCMap/index.html create mode 100644 dev/containers/CCMap/module-type-S/index.html create mode 100644 dev/containers/CCNativeint.odoc create mode 100644 dev/containers/CCNativeint/.jbuilder-keep create mode 100644 dev/containers/CCNativeint/Infix/index.html create mode 100644 dev/containers/CCNativeint/index.html create mode 100644 dev/containers/CCOpt.odoc create mode 100644 dev/containers/CCOpt/.jbuilder-keep create mode 100644 dev/containers/CCOpt/Infix/index.html create mode 100644 dev/containers/CCOpt/index.html create mode 100644 dev/containers/CCOrd.odoc create mode 100644 dev/containers/CCOrd/.jbuilder-keep create mode 100644 dev/containers/CCOrd/Infix/index.html create mode 100644 dev/containers/CCOrd/index.html create mode 100644 dev/containers/CCPair.odoc create mode 100644 dev/containers/CCPair/.jbuilder-keep create mode 100644 dev/containers/CCPair/index.html create mode 100644 dev/containers/CCParse.odoc create mode 100644 dev/containers/CCParse/.jbuilder-keep create mode 100644 dev/containers/CCParse/Infix/index.html create mode 100644 dev/containers/CCParse/U/index.html create mode 100644 dev/containers/CCParse/index.html create mode 100644 dev/containers/CCRandom.odoc create mode 100644 dev/containers/CCRandom/.jbuilder-keep create mode 100644 dev/containers/CCRandom/index.html create mode 100644 dev/containers/CCRef.odoc create mode 100644 dev/containers/CCRef/.jbuilder-keep create mode 100644 dev/containers/CCRef/index.html create mode 100644 dev/containers/CCResult.odoc create mode 100644 dev/containers/CCResult/.jbuilder-keep create mode 100644 dev/containers/CCResult/Infix/index.html create mode 100644 dev/containers/CCResult/Traverse/argument-1-M/index.html create mode 100644 dev/containers/CCResult/Traverse/index.html create mode 100644 dev/containers/CCResult/index.html create mode 100644 dev/containers/CCResult/module-type-MONAD/index.html create mode 100644 dev/containers/CCSet.odoc create mode 100644 dev/containers/CCSet/.jbuilder-keep create mode 100644 dev/containers/CCSet/index.html create mode 100644 dev/containers/CCSet/module-type-S/index.html create mode 100644 dev/containers/CCString.odoc create mode 100644 dev/containers/CCString/.jbuilder-keep create mode 100644 dev/containers/CCString/Find/index.html create mode 100644 dev/containers/CCString/Split/index.html create mode 100644 dev/containers/CCString/Sub/index.html create mode 100644 dev/containers/CCString/index.html create mode 100644 dev/containers/CCString/module-type-S/index.html create mode 100644 dev/containers/CCUtf8_string.odoc create mode 100644 dev/containers/CCUtf8_string/.jbuilder-keep create mode 100644 dev/containers/CCUtf8_string/index.html create mode 100644 dev/containers/CCVector.odoc create mode 100644 dev/containers/CCVector/.jbuilder-keep create mode 100644 dev/containers/CCVector/index.html create mode 100644 dev/containers/Containers/.jbuilder-keep create mode 100644 dev/containers/Containers/Hashtbl/Make/index.html create mode 100644 dev/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html create mode 100644 dev/containers/Containers/Hashtbl/MakeSeeded/index.html create mode 100644 dev/containers/Containers/Hashtbl/index.html create mode 100644 dev/containers/Containers/Hashtbl/module-type-HashedType/index.html create mode 100644 dev/containers/Containers/Hashtbl/module-type-S'/index.html create mode 100644 dev/containers/Containers/Hashtbl/module-type-S/index.html create mode 100644 dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html create mode 100644 dev/containers/Containers/Hashtbl/module-type-SeededS/index.html create mode 100644 dev/containers/Containers/index.html create mode 100644 dev/containers/containers.odoc create mode 100644 dev/containers/index-generated.mld create mode 100644 dev/containers/index.html create mode 100644 dev/containers/page-index.odoc create mode 100644 dev/odoc.css diff --git a/2.1/containers.data/CCBV.odoc b/2.1/containers.data/CCBV.odoc new file mode 100644 index 0000000000000000000000000000000000000000..a0d881b84feaaf979d897a231ffa8b0832985e77 GIT binary patch literal 4719 zcmbtYYit}>74|+x!dnV`5H$jY+{Ekkd%bHXp-$p-Z6|h3sg>BNB_xnFyL)$c@a){p z%&Z@6sRR`9r-gB?xPn$_8WLJTRZLMR@B=DPDgA*^p;W5WNFbn61!^lqCDbCqckZ2; zU7Lt!B{z3>?mg!_=X~e8XI7L&X(*o^$>#1q|MeesbaeFLPs86H{N1oUToRV68y2^n zY*}~p$I??%lZ%DicPGC6-si7>R zn@Gkz-+yMZ;CqK>>kV$}uCc<|q~Wgck}GVd;1~Rhc$%A>KQ(d3?A#2Sx_x49=F|ed z>-;2h46DQ$A~~9JjJr8A9A=4C=HMtVGu;$cm8}|Xjkz_>ilNmkTM%{5Dov~88p3i| zO<&#(#8NEKmc+1VNrBXi?QbS2&4Ot;p_O14l) z?)Ux7WV2G?wwHVKkt1Wj9ABM&?%dDcnx6h+pYPu~rPocvf^!(27Is~CCw0dtIbLr4 zsR!Qo%)+;pPwxNC*~RA{z7BTO1~2!)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|#uk6;NIL`*>Evc5 zA{OkZ0ex^+g{)OX=J=OF2b;>lR^Z@WG(^x>Lvq#Tpnr#h-Kn{@pT|Q#-&B5{QhpLQ z_mz!GC8|q4`V^D}-0g?h;cL~A0WT1wd_|N!P9CKYgNE{QumtXbYxGh(Q(g=K{aOLK z5&#-c69h_ZKP{M>XD+fj-WD?{hV&;@OL;oz=6z3HO_BG5bZ~bo$Nw5S{+n`qHE>+c zphv(kSyQ!y1lq_u?rT(yo+%~6l7?x#IFgWcVUxTal$1%mN|l6-QK=y;ys@H#^yu;m z(2~*aESrs#@K`v8IW^qD7^SY| +CCBV (containers.data.CCBV)

Module CCBV

Imperative Bitvectors

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.

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

Create a bitvector of given size, with given default value.

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 or shrink +the underlying bitvector.

  • Raises Invalid_arg: on negative sizes.
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 flip : t ‑> int ‑> unit

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

val clear : t ‑> unit

Set every bit to 0.

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 will have length t 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.

val negate_self : t ‑> unit

negate_self t flips all of the bits in t.

  • Since: 1.2
val negate : t ‑> t

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

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.

val union : t ‑> t ‑> t

union bv1 bv2 returns the union of the two sets.

val inter : t ‑> t ‑> t

inter bv1 bv2 returns the intersection of the two sets.

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.

type 'a sequence = ('a ‑> unit) ‑> unit
val to_seq : t ‑> int sequence
val of_seq : int sequence ‑> t
val pp : Format.formatter ‑> t ‑> unit

Print the bitvector as a string of bits.

  • Since: 0.13
\ No newline at end of file diff --git a/2.1/containers.data/CCBijection.odoc b/2.1/containers.data/CCBijection.odoc new file mode 100644 index 0000000000000000000000000000000000000000..40e83dce27500f83101b6234c68951bc629fce42 GIT binary patch literal 4105 zcmbtW3yf4(8J;=!{0+Mx52b}7(7W$hcG+1dkBy=64p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B)k0m$0vMAu>@0_=_ZPsZ;>|WpFM?4gjlTlqFixmKyaq-KiXIT6mwEs9{Jh0OMZ8XanOO z#aIHw1F}&wGGKfuj{C!T6qH_+b1{F$RFN1G!T(HiL1}!v4z0eFHPw2F6ds-hs~#fN=s> zlPuuZfP8#t3~P=py%e8;V7hHuXeSuI;X-Y((0(v3XrY5(yc!E(qqG58j7%VEW5rlc zf$^q>e;1555U#bq50t1(egyOy<>wjHKmj4MFpl~&pcAyrX`q!T!&?=SXMxUC%=1VC zvQW!k1X{#-No1XLbxcwn{y?L`s% F`xhVh{GtE= literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCBijection/.jbuilder-keep b/2.1/containers.data/CCBijection/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCBijection/Make/argument-1-L/index.html b/2.1/containers.data/CCBijection/Make/argument-1-L/index.html new file mode 100644 index 00000000..f26091b4 --- /dev/null +++ b/2.1/containers.data/CCBijection/Make/argument-1-L/index.html @@ -0,0 +1,2 @@ + +1-L (containers.data.CCBijection.Make.1-L)

Parameter CCBijection.Make.1-L

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCBijection/Make/argument-2-R/index.html b/2.1/containers.data/CCBijection/Make/argument-2-R/index.html new file mode 100644 index 00000000..0061f2df --- /dev/null +++ b/2.1/containers.data/CCBijection/Make/argument-2-R/index.html @@ -0,0 +1,2 @@ + +2-R (containers.data.CCBijection.Make.2-R)

Parameter CCBijection.Make.2-R

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCBijection/Make/index.html b/2.1/containers.data/CCBijection/Make/index.html new file mode 100644 index 00000000..90ec9ac5 --- /dev/null +++ b/2.1/containers.data/CCBijection/Make/index.html @@ -0,0 +1,7 @@ + +Make (containers.data.CCBijection.Make)

Module CCBijection.Make

Parameters

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

Checks both sides for key membership.

val mem_left : left ‑> t ‑> bool

Checks for membership of correspondence using left key

val mem_right : right ‑> t ‑> bool

Checks 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

Removes the left, right binding if it exists. Returns the +same bijection otherwise.

val remove_left : left ‑> t ‑> t

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

val remove_right : right ‑> t ‑> t

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

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

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

val list_right : t ‑> (right * left) list
val add_seq : (left * right) sequence ‑> t ‑> t
val of_seq : (left * right) sequence ‑> t
val to_seq : t ‑> (left * right) sequence
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 diff --git a/2.1/containers.data/CCBijection/index.html b/2.1/containers.data/CCBijection/index.html new file mode 100644 index 00000000..b54cf64e --- /dev/null +++ b/2.1/containers.data/CCBijection/index.html @@ -0,0 +1,4 @@ + +CCBijection (containers.data.CCBijection)

Module CCBijection

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 sequence = ('a ‑> unit) ‑> unit
module type OrderedType : sig ... end
module type S : sig ... end
module Make : functor (L : OrderedType) -> functor (R : OrderedType) -> S with type left = L.t and type right = R.t
\ No newline at end of file diff --git a/2.1/containers.data/CCBijection/module-type-OrderedType/index.html b/2.1/containers.data/CCBijection/module-type-OrderedType/index.html new file mode 100644 index 00000000..f9d3a4cb --- /dev/null +++ b/2.1/containers.data/CCBijection/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (containers.data.CCBijection.OrderedType)

Module type CCBijection.OrderedType

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCBijection/module-type-S/index.html b/2.1/containers.data/CCBijection/module-type-S/index.html new file mode 100644 index 00000000..69cb3b32 --- /dev/null +++ b/2.1/containers.data/CCBijection/module-type-S/index.html @@ -0,0 +1,7 @@ + +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

Checks both sides for key membership.

val mem_left : left ‑> t ‑> bool

Checks for membership of correspondence using left key

val mem_right : right ‑> t ‑> bool

Checks 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

Removes the left, right binding if it exists. Returns the +same bijection otherwise.

val remove_left : left ‑> t ‑> t

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

val remove_right : right ‑> t ‑> t

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

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

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

val list_right : t ‑> (right * left) list
val add_seq : (left * right) sequence ‑> t ‑> t
val of_seq : (left * right) sequence ‑> t
val to_seq : t ‑> (left * right) sequence
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 diff --git a/2.1/containers.data/CCBitField.odoc b/2.1/containers.data/CCBitField.odoc new file mode 100644 index 0000000000000000000000000000000000000000..27f8f361fadfa76d67834f7a95a45530c428b7f0 GIT binary patch literal 1955 zcmb7^O>7%Q6vv(D8HlN9`A|g!p%W#k>@>06G-{xq8>dYrL}*3A$1NJ~&c>_k?wH+i z99xKTCQ)Fk;vhb#Ah!)53lD;?hESpEC{m}74+KR#6-anlMZt& zBj0)UiLJk;zP-DcymfW^&enHY;{HM+(J_-qzy>}&4^93n7!j|5`RHaM=Cx`Nc2juXG41^?Yu`=^5 z$DbqIC!)j%4a|}wm?C{aYKh#RVZfd^ zetLp>uHy?9_|%=`fk#DwhK?CV`P!H7J+v|X)%>Y_TQe`+x%^-p51wPe0!9}YhOfZg zUoQW;XQ*d1z5GZ0=M^Jb9}5FBCwa@YwHD>Oa=8-sST1xt?&qpJm=DX;WNnn@W{VZa zwQ`6Ct+*n8KAHXP)wiwUfm@^91KV$1A2*`-qs<$T8J^*MiuyIhR*1MoUC+Egose0i zT4G2C=fuM}(L5n3j9{&KjN>jj0>oOhWep=T45d4|e=^{8<}1O$c0o#P6=|&^8e|6x zSPg}X>o?(K#-od~RmTz~B~qBKg@Sp*nq3Jw#vQNX5tT!11e~@+ha|L)NnOOZ2|tRj zM$x4{^lijTo2&4A?=(tp6mXzMaK1E*)6Sev#^6o3(8xFjH!uU +1-X (containers.data.CCBitField.Make.1-X)

Parameter CCBitField.Make.1-X

\ No newline at end of file diff --git a/2.1/containers.data/CCBitField/Make/index.html b/2.1/containers.data/CCBitField/Make/index.html new file mode 100644 index 00000000..265d8a11 --- /dev/null +++ b/2.1/containers.data/CCBitField/Make/index.html @@ -0,0 +1,4 @@ + +Make (containers.data.CCBitField.Make)

Module CCBitField.Make

Create a new bitfield type

Parameters

X : sig ... end

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 diff --git a/2.1/containers.data/CCBitField/index.html b/2.1/containers.data/CCBitField/index.html new file mode 100644 index 00000000..8897e60f --- /dev/null +++ b/2.1/containers.data/CCBitField/index.html @@ -0,0 +1,15 @@ + +CCBitField (containers.data.CCBitField)

Module CCBitField

Bit Field

This module defines efficient bitfields +up to 30 or 62 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 ()
+      let z = B.mk_field ()
+
+      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

Bitfield Signature

module Make : functor (X : sig ... end) -> S

Create a new bitfield type

\ No newline at end of file diff --git a/2.1/containers.data/CCBitField/module-type-S/index.html b/2.1/containers.data/CCBitField/module-type-S/index.html new file mode 100644 index 00000000..b9fe76af --- /dev/null +++ b/2.1/containers.data/CCBitField/module-type-S/index.html @@ -0,0 +1,4 @@ + +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 diff --git a/2.1/containers.data/CCCache.odoc b/2.1/containers.data/CCCache.odoc new file mode 100644 index 0000000000000000000000000000000000000000..91325b51011ccf4c3bcf016360f95e95187e6ed3 GIT binary patch literal 3840 zcmb_fU2Ggz72dUWrS1S#C4@kzRgb-PcGqlXZ8uFJZrVwlhExinvh(wTWZj*)>m58h zvzZ^S*Fr)dctbD_G)1LI)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=T8`dw?RI25x7SIB^NCtNOAunUG3+KSAau?Qj zk^vX03l$7TJ^(CS0c#PrEaQcJC3n=+jSN6vcDsQuY}=h^WlM?S(To_n-D6^=(3=R_ zLU-Fn^sS*Z1Y!Tr0JhtZ9!U#m$gD2*|pYG zZ?R6#KokEz8CJP9lTBR0f17zf(&asqUo&}juUdX}F>(*2lDsc&;b|&)5KU_O$)Jmz zhmwLPBzM#@=|W6{08+!f1@z}Nqjwt9orU67%e6vptL4ut-L95@y6B>o)U}Nl@q`kB znijdH$}7UWqNQ`}N(d-&m|fL-va~@%fux__vT!Ww8A+>_+bs6gawot14|U-<>h8ra z2p_WmMkahYq2wlQs`iA7b8W75j*Bzq0Z)|j>^x2YhP>MWH&FJ;-E#ROI6F8GtnH2<-QJLuC(MNgTYvbafu%_GVQ$6L@|anT;h+loB}8X zfdW$61?HK$suRSmN!??4@V)cb){vYngWmE(>ULd66U!4L>P3?Z@{ zJvaLzNg`wlN(u5KM$3~9hAU(cT9B}JOzfYRT&Mz#D8j=I41cN&SiCy-cgg>vW#+x2%C45L&k zH#dtf8r-5fW&wGDr%CpMW9CtDqD$NheS~BTMToYB`Z+*vK;vt$fUB*s=z3D?a3AMA zAZ7=i=d$=k)Ez?-bC(PzB0wGFg8}O+fAZysngB8%LsXrPS)S#dYja~7^*Jfg_4+b2 zxQfSGocXY7n97mn0CR&ED70Iu!*Ck6OyioGTXw==6ycns8X%(L(=#Y=!^;7$s6ylh zs0L?E!B(~W-&qRY*A%>Wf`XkorcRZK-@Ceb7{RQN^x`1o4Khu5;HG8szwA&`|wd-)8R~`th8qWoU7{q|8*k3JFUc5^)9sl zUA$4e>R>TRVFHC?pkB}w&L)*2Cf#yT3rquNIdftpKGFrfp8rEvo%wnTiX#M~I literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCCache/.jbuilder-keep b/2.1/containers.data/CCCache/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCCache/index.html b/2.1/containers.data/CCCache/index.html new file mode 100644 index 00000000..cf77f8fc --- /dev/null +++ b/2.1/containers.data/CCCache/index.html @@ -0,0 +1,38 @@ + +CCCache (containers.data.CCCache)

Module CCCache

Caches

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'bcallback ‑> ('a'bt ‑> ('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'bcallback ‑> ('a'bt ‑> (('a ‑> 'b) ‑> 'a ‑> 'b) ‑> 'a ‑> 'b

with_cache_rec c f is a function that first, applies f to +some f' = fix f, such that recursive calls to f' are cached in c. +It is similar to with_cache but with a function that takes as +first argument its own recursive version. +Example (memoized Fibonacci function): +

      let fib = with_cache_rec (lru 256)
+          (fun fib' n -> match n with
+             | 1 | 2 -> 1
+             | _ -> fib' (n-1) + fib' (n-2)
+          );;
+
+      fib 70;;
  • 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'bt ‑> ('a ‑> 'b ‑> unit) ‑> unit

Iterate on cached values. Should yield size cache pairs.

val add : ('a'bt ‑> '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'bt

Dummy cache, never stores any value.

val linear : eq:'a equal ‑> int ‑> ('a'bt

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'bt

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'bt

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'bt

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

\ No newline at end of file diff --git a/2.1/containers.data/CCDeque.odoc b/2.1/containers.data/CCDeque.odoc new file mode 100644 index 0000000000000000000000000000000000000000..7780e5d60aedecb77c9bc4f9cbbd59f9dda10147 GIT binary patch literal 3800 zcmcInYitx%6yEO6M7Iz^G$=8Gw`I56Ez9n<-S7&^K%oRBl&6aPXztG5?M^y7Go6`j zEe7NVKYdI=Ac&Gd0r3$e7(!4qB!(ChF^Wh+VhDeX7>)1;;~yXA+e%@`ZhM|AEJ^mA@=bAFf`$&s#rbOC%!nL?V-EBr<8;y^%;F;@%C45OrMl)Dp>c z@++$bGpVhNGE(9pUAPqN2PmI>?$ z)k>sDvk-ymCMX@@~`cmyWqm3WBunw z&fnUGc z6bNimS6b6gekwk<;`AkZ+s&^f=Xk*~i6}3?5#)#Hupt0Tz~iU^GhVh-Ffz~P-wHE`cAyF&)ap2 zq-ecr1h&1#h@z3A4&@u8c3 zBA@N<^bmMJe=!M?qbdZS zNb@T~NfAUzL=;q(0>Nv3GgakF`zcAr$zW@*$c7oSbQ1~@IUFzj? zKIH|$O_-SNUwb(%0=^g@dPrr@DzZLgQlp~CQ0(#B@&nSd(y!9Xt5IZe3238PtXjpl`6{+O&`O( zuxtu8fVTq831`A6DL)G7GHO<3kXr^un!g6Vl2NLH~z!X~q z4hqDukHnUtGzSYPWmln7-XYYCW~l9Hn+~(V0IGKbd?V^z;LUBu+tZgg>kkKIajR&P*sU1ySFHm2d&xPQbG2&IWxQ*pt|D$?I~l<=Z;YRUc?U zqO7YW1nTaGi)NItmK?0e5uG;v7k=>y{>CBUru(V`D5t>foY^qFM&ZB$E(!xm!pSB^ z*{mU^IbyUu99WJA5q+2sp$^?Z+vRYZD)<8-+d9DGQk771sD{TAP+*e3jVdfD7D|DdR)*9pM%<&0 z<3N2hwP6D-C^yc&+to+?MEH99-!HTw9MmiAx zQK+{|bazA0Uy-;M)QKnmfjL5lQ~wrlG5U6xO@P}8wR9FTWI?DZ7L zS5+*23SL~d5wCCYK?ZloOSSp*StpfIXc8tp>31{3>`66%i<>0h6r4|6W+R ztjG#lfnA|m(DSi#vjGOA!=a$%Z*3PbHX6hiGC_D@Iu<6LTOMLU8~W~u+6j|t)?{;X zV(g_5d6|b?x7(y);z`ao&DftQ{vD=+7(3JGnTOt-5M#fj;am&0rjAD^G4^rb lp27p|hJl28*B~g@d{CxaBz{;F5<)Vhb&t!DF7g`y_ZNYPzoh^G literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCDeque/.jbuilder-keep b/2.1/containers.data/CCDeque/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCDeque/index.html b/2.1/containers.data/CCDeque/index.html new file mode 100644 index 00000000..b789301b --- /dev/null +++ b/2.1/containers.data/CCDeque/index.html @@ -0,0 +1,14 @@ + +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, or

  • Raises Empty: if empty.
val peek_back : 'a t ‑> 'a

Last value, or

  • Raises Empty: if empty.
val take_back : 'a t ‑> 'a

Take last value, or

  • Raises Empty: if empty.
val take_front : 'a t ‑> 'a

Take first value, or

  • Raises Empty: if empty.
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 sequence = ('a ‑> unit) ‑> unit
val of_seq : 'a sequence ‑> 'a t

Create a deque from the sequence. +Optional argument deque disappears, use add_seq_back instead since +0.13

val to_seq : 'a t ‑> 'a sequence

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_seq_front : 'a t ‑> 'a sequence ‑> unit

add_seq_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_seq_back : 'a t ‑> 'a sequence ‑> unit

add_seq_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

print

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

Print the elements.

  • Since: 0.13
\ No newline at end of file diff --git a/2.1/containers.data/CCFQueue.odoc b/2.1/containers.data/CCFQueue.odoc new file mode 100644 index 0000000000000000000000000000000000000000..79d62cf2b52f78389b5bd620aec4e866513ab0c2 GIT binary patch literal 4475 zcmb_fYit}>72d}k5j#>KNG)wu;5wf5?k4-P-G)*pVdJC@k&-m769|;x+}*kB9XyZC z%j!LehU1qgx~7Z)uwHEM7OBp zRy5*~9~8E1nV9U-F0I$DdF@LxCqMe=#m{H=<(K{%j0%9&*TVXRRO-X$Q>j%Cu1KZS zRPbNHpo|{`XE)aae|Vy6H9g(7h=C6>pKiTgM=OG0XuR8MQOB=+_t^SRKeusi;x`9> z_vXaJ8^s{FVGA)0-SVgdt0rv6B;Gi2^``6B7Eay0>g?1{XSaUxl|7$(`o5KbBMki7 zH6NS0U!6EQ`DT9G#ZZSBxgzrD9_WqRkKKkWF-ghwA%Gk~L~A3~4jsM+xrd~_#|?-%Gw9v^@AL_v3_!`Da7@EoqG zZ5a|K9`@Q4w;ZTP9vLAUV{udsNWX9oLgFaHb6Pc1dz+$nLQEj@5?l;qOE?l=NgJ zb}~)pE#{~&MNEo`i-RBe09FBkY$)MI*TXHM8?g5l=KB}640!*bNORz?*FhIDaaebS zVZ`ec_Z=x8ofll##wh7Sr34iNh%DBU53q#~27VQ@XD-_<(}u`{#Q_WG$qcw`|IBzJ z`$4B*0t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 index 00000000..e69de29b diff --git a/2.1/containers.data/CCFQueue/index.html b/2.1/containers.data/CCFQueue/index.html new file mode 100644 index 00000000..98f230cc --- /dev/null +++ b/2.1/containers.data/CCFQueue/index.html @@ -0,0 +1,8 @@ + +CCFQueue (containers.data.CCFQueue)

Module CCFQueue

Functional queues

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a equal = 'a ‑> 'a ‑> bool
type 'a printer = 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_seq_front : 'a sequence ‑> 'a t ‑> 'a t
val add_seq_back : 'a t ‑> 'a sequence ‑> 'a t
val to_seq : 'a t ‑> 'a sequence
val of_seq : 'a sequence ‑> 'a t
val to_klist : 'a t ‑> 'a klist
val of_klist : 'a klist ‑> 'a t
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 diff --git a/2.1/containers.data/CCFun_vec.odoc b/2.1/containers.data/CCFun_vec.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8e95a50b820bd6c7d7e18e27309f8c9c03488736 GIT binary patch literal 2379 zcmb7FUu+ab7{A-@YO4uCA}B_~mR|3AK=0Z@Dv+3LX*nnlZAmFceK_}a=X#s&?JT=< z{R8TgA(CJ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ve7E2L;-!O$>ky3xsC}Hd)sz_2ueITm5 z7Ep@|c`*m)etkc7CgEQtzhT28u1HU(2+s3M14!0{BriuK4F^N=Q@B_w?Fmb-M5XhA z9^Zb_!4BOtYqi_M+Vi3yeEB^Be%SzIDGr3|8SLc4((fYNoFbi8q;iA}7b!%~CBa_+ z-7lbW&|1;u+YKTYld$HX@Wntwx~oPhcQzFMEZp#GUy)c?xmwJN7jSb!k*YPQBBdIz ze{nYf^xQw)NL!=Aru(>?pzva-v7<&=a}zaj?ci{&cTF4Cy0BlQrO-^%Mn(Flj=Y=k KbxT-$0Lb4^ +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)

  • Since: 2.1
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a printer = 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.

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_seq : 'a t ‑> 'a sequence ‑> 'a t
val of_seq : 'a sequence ‑> 'a t
val to_seq : 'a t ‑> 'a sequence
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 diff --git a/2.1/containers.data/CCGraph.odoc b/2.1/containers.data/CCGraph.odoc new file mode 100644 index 0000000000000000000000000000000000000000..29c183923e631d1ac2edc76ec6af2518e62ca460 GIT binary patch literal 13507 zcmb7L3v?XSdDg7v+S-+0NfR&-!bnx2_*$5At611Jens-^B`$Td*A?prYT92)9?T9 z%)6|NigS9a%Xm+dq^ZP7l8S;N6e3w6yf$Bk*}WKC4a)WUZ2;ngVL(lbFrNUfF%M;m}?Nq8+r&=-WbZmUu(5kjk(aII8X66iA zo5qDTTUxwU(``-H-1*^TqSmJ+jFjd{A?>*JWM6C+a0Z@tCTebdlV;kQ1Jur3*&xbl zM#V9+z^<2ayvP6polQ%OT;8x_$tkO%nI+rNOIf22OVbHM+oWMrtyfFbQVa&>? zgS{ze1`t|NFU@IL-8Sr0n&guht7fNPo#a?ci*i9j6hyENQDv=44q|16o27irnXVXy zHdQT2DR0o6SqsYwx?^ZevF2FBh6$ln%sl8I4k1U!Ea{|}z8KxGKx0ua+YLc9z^YE( z!d4O;X@p3bgp%~Eqm?W|LL!v9E9x_lqUmU5%eKu)*ai?)swEa>L;o?rkUU7W{dU>N znp0+0YQve<9c@}Kmkk&VfT#7E0oE6p28%Fy_fA40A2pDZiC|w)0yx{)T{WPqW-Wun zQn~7+V>_mpGBz=?L2O5Yw!tuHC$lj2Xh|cTPxoo0dL1N{t%8*|vwA_Zt%?(ys#rxL z(5x9H4&%V*gwo{z36A-Z-4x7JMhQ_^}+Mc z9s5{(`@ySTOk8@^*mu7Dpz9_s)9q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ulxrn^qU%X2wI3@TnFbm~2X`+C6 zr-;mxnm^=0Tqh!jVN#N^NfG%7J>oiLN+^FLlv^17g8{t7uiFUaW)Hq9BA*7lPyb#K zLG5?5M7K{wP6*`#65UNg!GC!w1v+jPk%w>z+V%ywKP)0&CEDKW;XWuLUk7dp|1qK5 zAe8HwoV@`EUR?SSfy{Xz$3*1mfSuza@)LT*?0}M*P^t{?1n>`u$V&uod+?8n$p3`c zc}zt98xJKrUlozx3T3xM_k>VNLMi%ue@nEs;u7q50SYWWC0bugxJ?iDPeto$;11VS z@tvlfrCUVeif4k5jTv6b3*Q>e*)|3*1LeboA&>G=Wzd;@)0*z}x~t6wBptBz;}spTn#i=mo2oIr5w6;5^;9)a01)va_?#FkCKk0f0KI@pld} z6apk37K=aKl}Q}Icf~Kg@gEa)nuzoWlp{wb@H3uXR$fhM2%`tYjQOPes-cpJzIPE> zG@0Pa*MEx?r3k$nM0EKj6ABdkZHEyYB~eimkjLe208CRn+pZQ-CxaOb$8ZpDREl_C z0)OOzb2Ugg=slJ{%{(wW2U+IKg5PwktfiZ09mGlpvR$+*G?4R)EE-kdPe6PK?8JDF SlO2m?_wlGftayQJ`TqdU)>^Ot literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCGraph/.jbuilder-keep b/2.1/containers.data/CCGraph/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCGraph/Dot/index.html b/2.1/containers.data/CCGraph/Dot/index.html new file mode 100644 index 00000000..1f92574f --- /dev/null +++ b/2.1/containers.data/CCGraph/Dot/index.html @@ -0,0 +1,2 @@ + +Dot (containers.data.CCGraph.Dot)

Module CCGraph.Dot

type attribute = [
| `Color of string
| `Shape of string
| `Weight of int
| `Style of string
| `Label of string
| `Other of string * string
]

Dot attribute

type vertex_state

Hidden state associated to a vertex

val pp : tbl:('vvertex_statetable ‑> eq:('v ‑> 'v ‑> bool) ‑> ?⁠attrs_v:('v ‑> attribute list) ‑> ?⁠attrs_e:('e ‑> attribute list) ‑> ?⁠name:string ‑> graph:('v'et ‑> 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_seq : tbl:('vvertex_statetable ‑> eq:('v ‑> 'v ‑> bool) ‑> ?⁠attrs_v:('v ‑> attribute list) ‑> ?⁠attrs_e:('e ‑> attribute list) ‑> ?⁠name:string ‑> graph:('v'et ‑> Format.formatter ‑> 'v sequence ‑> unit
val with_out : string ‑> (Format.formatter ‑> 'a) ‑> 'a

Shortcut to open a file and write to it.

\ No newline at end of file diff --git a/2.1/containers.data/CCGraph/Lazy_tree/index.html b/2.1/containers.data/CCGraph/Lazy_tree/index.html new file mode 100644 index 00000000..d81d6e6d --- /dev/null +++ b/2.1/containers.data/CCGraph/Lazy_tree/index.html @@ -0,0 +1,2 @@ + +Lazy_tree (containers.data.CCGraph.Lazy_tree)

Module CCGraph.Lazy_tree

type ('v, 'e) t = {
vertex : 'v;
children : ('e * ('v'et) list Lazy.t;
}
val map_v : ('a ‑> 'b) ‑> ('a'et ‑> ('b'et
val fold_v : ('acc ‑> 'v ‑> 'acc) ‑> 'acc ‑> ('v_t ‑> 'acc
\ No newline at end of file diff --git a/2.1/containers.data/CCGraph/Map/index.html b/2.1/containers.data/CCGraph/Map/index.html new file mode 100644 index 00000000..5c6ebc6c --- /dev/null +++ b/2.1/containers.data/CCGraph/Map/index.html @@ -0,0 +1,4 @@ + +Map (containers.data.CCGraph.Map)

Module CCGraph.Map

Parameters

O : Map.OrderedType

Signature

type vertex = O.t
type 'a t
val as_graph : 'a t ‑> (vertex'agraph

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 sequence
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_seq : (vertex * 'a * vertex) sequence ‑> 'a t
val add_seq : (vertex * 'a * vertex) sequence ‑> 'a t ‑> 'a t
val to_seq : 'a t ‑> (vertex * 'a * vertex) sequence
\ No newline at end of file diff --git a/2.1/containers.data/CCGraph/Seq/index.html b/2.1/containers.data/CCGraph/Seq/index.html new file mode 100644 index 00000000..7ce3f580 --- /dev/null +++ b/2.1/containers.data/CCGraph/Seq/index.html @@ -0,0 +1,2 @@ + +Seq (containers.data.CCGraph.Seq)

Module CCGraph.Seq

type 'a t = 'a sequence
val return : 'a ‑> 'a sequence
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 diff --git a/2.1/containers.data/CCGraph/Traverse/Event/index.html b/2.1/containers.data/CCGraph/Traverse/Event/index.html new file mode 100644 index 00000000..9e4d561e --- /dev/null +++ b/2.1/containers.data/CCGraph/Traverse/Event/index.html @@ -0,0 +1,2 @@ + +Event (containers.data.CCGraph.Traverse.Event)

Module CCGraph.Traverse.Event

More detailed interface

type edge_kind = [
| `Forward
| `Back
| `Cross
]
type ('v, 'e) t = [
| `Enter of 'v * int * ('v'epath
| `Exit of 'v
| `Edge of 'v * 'e * 'v * edge_kind
]

A traversal is a sequence of such events

val get_vertex : ('v'et ‑> ('v * [ `Enter | `Exit ]) option
val get_enter : ('v'et ‑> 'v option
val get_exit : ('v'et ‑> 'v option
val get_edge : ('v'et ‑> ('v * 'e * 'v) option
val get_edge_kind : ('v'et ‑> ('v * 'e * 'v * edge_kind) option
val dfs : tbl:'v set ‑> eq:('v ‑> 'v ‑> bool) ‑> graph:('v'egraph ‑> 'v sequence ‑> ('v'et sequence_once

Full version of DFS.

  • Parameter eq: equality predicate on vertices.
val dfs_tag : eq:('v ‑> 'v ‑> bool) ‑> tags:'v tag_set ‑> graph:('v'egraph ‑> 'v sequence ‑> ('v'et sequence_once

Full version of DFS using integer tags.

  • Parameter eq: equality predicate on vertices.
\ No newline at end of file diff --git a/2.1/containers.data/CCGraph/Traverse/index.html b/2.1/containers.data/CCGraph/Traverse/index.html new file mode 100644 index 00000000..a4624037 --- /dev/null +++ b/2.1/containers.data/CCGraph/Traverse/index.html @@ -0,0 +1,7 @@ + +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'et ‑> 'v sequence ‑> 'v sequence_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'et ‑> 'v sequence ‑> 'v sequence_once

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

val dfs : tbl:'v set ‑> graph:('v'et ‑> 'v sequence ‑> 'v sequence_once
val dfs_tag : tags:'v tag_set ‑> graph:('v'et ‑> 'v sequence ‑> 'v sequence_once
val bfs : tbl:'v set ‑> graph:('v'et ‑> 'v sequence ‑> 'v sequence_once
val bfs_tag : tags:'v tag_set ‑> graph:('v'et ‑> 'v sequence ‑> 'v sequence_once
val dijkstra : tbl:'v set ‑> ?⁠dist:('e ‑> int) ‑> graph:('v'et ‑> 'v sequence ‑> ('v * int * ('v'epath) sequence_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'et ‑> 'v sequence ‑> ('v * int * ('v'epath) sequence_once
module Event : sig ... end

More detailed interface

\ No newline at end of file diff --git a/2.1/containers.data/CCGraph/index.html b/2.1/containers.data/CCGraph/index.html new file mode 100644 index 00000000..58554f70 --- /dev/null +++ b/2.1/containers.data/CCGraph/index.html @@ -0,0 +1,36 @@ + +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 a sequence of vertices as input. +If the user only has a single vertex (e.g., for a topological sort +from a given vertex), she can use Seq.return x to build a sequence +of one element.

status: unstable

  • Since: 0.12

Sequence Helpers

type 'a sequence = ('a ‑> unit) ‑> unit

A sequence of items of type 'a, possibly infinite

type 'a sequence_once = 'a sequence

Sequence that should be used only once

exception Sequence_once

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

module Seq : sig ... end

Interfaces for graphs

This interface is designed for oriented graphs with labels on edges

type ('v, 'e) t = 'v ‑> ('e * 'v) sequence

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

type ('v, 'e) graph = ('v'et
val make : ('v ‑> ('e * 'v) sequence) ‑> ('v'et

Make a graph by providing the children function.

type 'v tag_set = {
get_tag : 'v ‑> bool;
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 = {
mem : 'k ‑> bool;
find : 'k ‑> 'a;

(**

  • Raises Not_found: if element not added before

*)

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'atable

Default implementation for table: a Hashtbl.t.

val mk_map : cmp:('k ‑> 'k ‑> int) ‑> unit ‑> ('k'atable

Use a Map.S underneath.

Bags of vertices

type 'a bag = {
push : 'a ‑> unit;
is_empty : unit ‑> bool;
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 sequence ‑> 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'et ‑> 'v sequence ‑> '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'et ‑> 'v sequence ‑> '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'et ‑> 'v ‑> ('v'eLazy_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'et ‑> 'v ‑> ('v'eLazy_tree.t

Strongly Connected Components

type 'v scc_state

Hidden state for scc.

val scc : tbl:('v'v scc_statetable ‑> graph:('v'et ‑> 'v sequence ‑> 'v list sequence_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 Sequence_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 = {
graph : ('v'et;
add_edge : 'v ‑> 'e ‑> 'v ‑> unit;
remove : 'v ‑> unit;
}
val mk_mut_tbl : eq:('v ‑> 'v ‑> bool) ‑> ?⁠hash:('v ‑> int) ‑> int ‑> ('v'amut_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 : functor (O : 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) 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 diff --git a/2.1/containers.data/CCGraph/module-type-MAP/index.html b/2.1/containers.data/CCGraph/module-type-MAP/index.html new file mode 100644 index 00000000..34b99c3a --- /dev/null +++ b/2.1/containers.data/CCGraph/module-type-MAP/index.html @@ -0,0 +1,4 @@ + +MAP (containers.data.CCGraph.MAP)

Module type CCGraph.MAP

type vertex
type 'a t
val as_graph : 'a t ‑> (vertex'agraph

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 sequence
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_seq : (vertex * 'a * vertex) sequence ‑> 'a t
val add_seq : (vertex * 'a * vertex) sequence ‑> 'a t ‑> 'a t
val to_seq : 'a t ‑> (vertex * 'a * vertex) sequence
\ No newline at end of file diff --git a/2.1/containers.data/CCHashSet.odoc b/2.1/containers.data/CCHashSet.odoc new file mode 100644 index 0000000000000000000000000000000000000000..999216606d3de9ec1b65d408b30587cc7d03f49d GIT binary patch literal 4641 zcmb7GdvF!y70=y0M~PJlGa}%i-I$x3n-G#4KqmpKi;y6ecLb_c!{*+-WX-+1m%DrO z5T$7gVkvDmSYRlfc6kJWp+I2(YaPT|+Db?3qs6Mslv-(N)saDLZBg6vJ@yj8{$XbB z>4? z`-vZJyt(P+FLk#ZUGn^ymX^1xgP?JWkF&q_&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@>F#I}(2Br5l#avx{CSML7}@qv)_ZN!3PeGip; zQTb}fdJb_J`!=*B?as3m%IzMJ+ka76h{^)0sadFenIl^SQn?&)6?s5qs$94VaXmjf F{|5@1;{N~u literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCHashSet/.jbuilder-keep b/2.1/containers.data/CCHashSet/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCHashSet/Make/argument-1-E/index.html b/2.1/containers.data/CCHashSet/Make/argument-1-E/index.html new file mode 100644 index 00000000..204296e7 --- /dev/null +++ b/2.1/containers.data/CCHashSet/Make/argument-1-E/index.html @@ -0,0 +1,2 @@ + +1-E (containers.data.CCHashSet.Make.1-E)

Parameter CCHashSet.Make.1-E

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

Positive value

\ No newline at end of file diff --git a/2.1/containers.data/CCHashSet/Make/index.html b/2.1/containers.data/CCHashSet/Make/index.html new file mode 100644 index 00000000..9c64d2d2 --- /dev/null +++ b/2.1/containers.data/CCHashSet/Make/index.html @@ -0,0 +1,3 @@ + +Make (containers.data.CCHashSet.Make)

Module CCHashSet.Make

Parameters

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_seq : t ‑> elt sequence
val of_seq : elt sequence ‑> t
val add_seq : t ‑> elt sequence ‑> unit
val pp : ?⁠sep:string ‑> elt printer ‑> t printer

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

\ No newline at end of file diff --git a/2.1/containers.data/CCHashSet/index.html b/2.1/containers.data/CCHashSet/index.html new file mode 100644 index 00000000..abc75e6a --- /dev/null +++ b/2.1/containers.data/CCHashSet/index.html @@ -0,0 +1,2 @@ + +CCHashSet (containers.data.CCHashSet)

Module CCHashSet

Mutable Set

status: unstable

  • Since: 0.13
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type S : sig ... end
module type ELEMENT : sig ... end
module Make : functor (E : ELEMENT) -> S with type elt = E.t
\ No newline at end of file diff --git a/2.1/containers.data/CCHashSet/module-type-ELEMENT/index.html b/2.1/containers.data/CCHashSet/module-type-ELEMENT/index.html new file mode 100644 index 00000000..ddb7c32b --- /dev/null +++ b/2.1/containers.data/CCHashSet/module-type-ELEMENT/index.html @@ -0,0 +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 diff --git a/2.1/containers.data/CCHashSet/module-type-S/index.html b/2.1/containers.data/CCHashSet/module-type-S/index.html new file mode 100644 index 00000000..1d95066c --- /dev/null +++ b/2.1/containers.data/CCHashSet/module-type-S/index.html @@ -0,0 +1,3 @@ + +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_seq : t ‑> elt sequence
val of_seq : elt sequence ‑> t
val add_seq : t ‑> elt sequence ‑> unit
val pp : ?⁠sep:string ‑> elt printer ‑> t printer

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

\ No newline at end of file diff --git a/2.1/containers.data/CCHashTrie.odoc b/2.1/containers.data/CCHashTrie.odoc new file mode 100644 index 0000000000000000000000000000000000000000..da4618c66e1177ca6210f3b0d280dda9ed32a729 GIT binary patch literal 7391 zcmbVQ4U`nsmG18MZVfXkYWyK^ki21r`GKZq_!C6Xf`P$79h4ul8(5imsEB*=-xHD}FwTwSw9O~`Jtt5H@ot8P}aXYYNl zs=INMJ!j>dp{w4z-*b_<71IJ>qSQq{Q{#}fJ=O60IIJRe4 zwpn&lS;I5#pV`xMmEq>smn~E8{_iz=j_rSY*Rda;_I5sT`?SXt#nc_KSYvA}Hf4D% zHaRvS7Hf?K|4$;G@Ppv7WqRPxByED!xq5)_jr-|YSa#OjW@bftRCsw)$++ z)J=+!yjeEod%A4cnY?8Wiky-0oU*W7k+Tq-YFdxbLB}Z2kmn%Fuqh0&wPJauFmpL8 zW0|%mauqw{S&ofzu2-&Pyb3apSY93pU9YK9!oVQT&I%)wFC4jY=(9GgCGV*A!W^rYSj_P*H}1dDo%V!^UKvy6f6b;?D-B8lz`toWzxEPT6=e2f4Y6u_3K`I;b;)dyv{5SBXHP6W(;{{ z)AadOXW&rT3Vk;&@!^(!tAJ&BxV7KOnz*#2Hjs7~EZ3u_aekDyhSnf0=EUj!{0E)u zu?k%(Co1gaIJ%%ZBKop8Zsja&G6)zOlTMu5Orn0{rn*^ywhJ#}5=AGAsEk4WyD72k zPfRso3S(3;@P$!fMY?3~Fhnpmt7=Hf3;gz!ScB_><8y1{IgH76Q4Rk~B^ArdrQ12C}qi}@@CzG4PulTje-f|c|{9U^UdBc^F1&aDE^4GAtF zf<3Ki$0;a=4Q;uyvmLW52*x_pqp$+MQnBZCbpiM@mz_;`G170*~Z5k*G%xj=e5U71*EQ-P2shA~0yXb)MJ zqPSNr@5H>TI=x1+EKw|Xprd4X=xF3ayC@n%CJ{B0N0(uqR9tFXGShGw&a^WnXvY{f z3Ki3BQVW+=JAooth%eX`ZD$1Ifi1jPkv*_#l0zmz{2XP|BQt0d86cC|<&(%^5(vfX z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y@OB4QL+#TP2xR zRGIz^8XAbHCt~^{wP?0nF&V(F1a^hQEUjX;K*MChEQv476Drrsoe$* z0$(5PrLM_=Ed9jo(11#)XeJ@S`Qhj;90hisD#*k) zfSm(OZQ2;*zlMgDka+(fBz~t39FTa2P8^Up9pK=psu7Ps!zNUpc#F19{QWKc>{X!}G+1=cF$H!&D*wqa>#5{{v2F&Ak8s literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCHashTrie/.jbuilder-keep b/2.1/containers.data/CCHashTrie/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCHashTrie/Make/argument-1-K/index.html b/2.1/containers.data/CCHashTrie/Make/argument-1-K/index.html new file mode 100644 index 00000000..ab7c51b5 --- /dev/null +++ b/2.1/containers.data/CCHashTrie/Make/argument-1-K/index.html @@ -0,0 +1,2 @@ + +1-K (containers.data.CCHashTrie.Make.1-K)

Parameter CCHashTrie.Make.1-K

type t
val equal : t ‑> t ‑> bool
val hash : t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCHashTrie/Make/index.html b/2.1/containers.data/CCHashTrie/Make/index.html new file mode 100644 index 00000000..b13bc6e9 --- /dev/null +++ b/2.1/containers.data/CCHashTrie/Make/index.html @@ -0,0 +1,9 @@ + +Make (containers.data.CCHashTrie.Make)

Module CCHashTrie.Make

Functors

Parameters

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 ‑> key ‑> 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val add_seq_mut : id:Transient.t ‑> 'a t ‑> (key * 'a) sequence ‑> 'a t
  • Raises Frozen: if the ID is frozen.
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 diff --git a/2.1/containers.data/CCHashTrie/Transient/index.html b/2.1/containers.data/CCHashTrie/Transient/index.html new file mode 100644 index 00000000..0fc0e08b --- /dev/null +++ b/2.1/containers.data/CCHashTrie/Transient/index.html @@ -0,0 +1,7 @@ + +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 diff --git a/2.1/containers.data/CCHashTrie/index.html b/2.1/containers.data/CCHashTrie/index.html new file mode 100644 index 00000000..fc1d3a9e --- /dev/null +++ b/2.1/containers.data/CCHashTrie/index.html @@ -0,0 +1,6 @@ + +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

  • Since: 0.13
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a ktree = unit ‑> [ `Nil | `Node of 'a * 'a ktree list ]
module Transient : sig ... end

Transient Identifiers

module type S : sig ... end

Signature

module type KEY : sig ... end

Type for keys

module Make : functor (K : KEY) -> S with type key = K.t

Functors

\ No newline at end of file diff --git a/2.1/containers.data/CCHashTrie/module-type-KEY/index.html b/2.1/containers.data/CCHashTrie/module-type-KEY/index.html new file mode 100644 index 00000000..5d53860f --- /dev/null +++ b/2.1/containers.data/CCHashTrie/module-type-KEY/index.html @@ -0,0 +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 diff --git a/2.1/containers.data/CCHashTrie/module-type-S/index.html b/2.1/containers.data/CCHashTrie/module-type-S/index.html new file mode 100644 index 00000000..3326cb26 --- /dev/null +++ b/2.1/containers.data/CCHashTrie/module-type-S/index.html @@ -0,0 +1,9 @@ + +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 ‑> key ‑> 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val add_seq_mut : id:Transient.t ‑> 'a t ‑> (key * 'a) sequence ‑> 'a t
  • Raises Frozen: if the ID is frozen.
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 diff --git a/2.1/containers.data/CCHet.odoc b/2.1/containers.data/CCHet.odoc new file mode 100644 index 0000000000000000000000000000000000000000..051be9f43f5612b437c0caaf3ade29e5fcb599bd GIT binary patch literal 2212 zcmbtUU2IfE7~OlBi4=k$f(im&vfCf9>~4YhLqw-6D1;P=5X3~Sv%6FF!u?t9ouyqA zF$SOTVL+f5qq)@9_CadXn2?x=O(^lf7!nf_H6&u9XoO%N^uY&=GxJShfXpi&b1T@ z9c~XVdPLREwmQWccX)+4Zm^$~xEltFRCXiz;MJX4%*qap=TPSWt7l2_P9~pidz7I2 zljN}i^*uL`{R8Sf9Y#Lon`rEoVv(;8zkT!LM}=Qq68Ke1?N@c7Z*jkneh_mXxZl9OWtDBlvZgEbbEm`Dg2OA@h? z5<=26{ngZdpnE6`$HOoJL5rC{pG42Xu-Lg-g% z#2nros#A#NaZ&D6sE&i&;%?ECyY(uIvqX-hL@v~|;C_j|SE4h;Fq8)`KLTd_FjJ*& zBv3r27ez8Qh#E3G_1dc<=@&zy4}FSut>mCh87H*dF|=GINRB<8-d$8mFKm*}Pi*t6 zEP||Zs&u(Qnf1sJ73(U0Qrbb)%6PO$c{He-gF6pSxidT}PGn;DFjK1J5Y~@vyRo@}?i>=k>@pX7?1Kp!d zJnWROf&^><_;IyAfUTq0dNxt~ag);Vrm)LEp9koCz5flE+7AVbHz zzi2qNT)_XqfeRRwt9YW}ENVAhJHKN|=f0d>K(}jgQF{VP9hnAsvFrK5Mh^?!t_Yk&T&>;jN_b4IQ>H*|Boknc^YLMQ{90FmLR^AHu z?UQ-Lb_%w2AhGov?C)(U(WvaoKVpIHd4MQD$4)>n$Sk&(nwB3-wNwu6)nI$pbZn3O z-`Gk6KL1ybZZetMvnIE8hsiCrE`xw)Onh`OvAqMtpPve@U4-Gz!f?wI?do-NG8d;( zYsVUgt%m_|8Wh={4^uD_PfBiGRas5j0b@6Juv>7 o4y`?Gw5$Q(DgfTpKy1yKPObd~l>U?GvDyK@QAdwp`(;A@0l9o=I{*Lx literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCHet/.jbuilder-keep b/2.1/containers.data/CCHet/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCHet/Key/index.html b/2.1/containers.data/CCHet/Key/index.html new file mode 100644 index 00000000..bccb4e3b --- /dev/null +++ b/2.1/containers.data/CCHet/Key/index.html @@ -0,0 +1,2 @@ + +Key (containers.data.CCHet.Key)

Module CCHet.Key

type 'a t
val create : unit ‑> 'a t
val equal : 'a t ‑> 'a t ‑> bool

Compare two keys that have compatible types.

\ No newline at end of file diff --git a/2.1/containers.data/CCHet/Map/index.html b/2.1/containers.data/CCHet/Map/index.html new file mode 100644 index 00000000..c9bf358f --- /dev/null +++ b/2.1/containers.data/CCHet/Map/index.html @@ -0,0 +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 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_seq : t ‑> pair sequence
val of_seq : pair sequence ‑> t
val add_seq : t ‑> pair sequence ‑> 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 diff --git a/2.1/containers.data/CCHet/Tbl/index.html b/2.1/containers.data/CCHet/Tbl/index.html new file mode 100644 index 00000000..e76d3701 --- /dev/null +++ b/2.1/containers.data/CCHet/Tbl/index.html @@ -0,0 +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 length : t ‑> int
val find : t ‑> 'a Key.t ‑> 'a option
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_seq : t ‑> pair sequence
val of_seq : pair sequence ‑> t
val add_seq : t ‑> pair sequence ‑> 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 diff --git a/2.1/containers.data/CCHet/index.html b/2.1/containers.data/CCHet/index.html new file mode 100644 index 00000000..776832d2 --- /dev/null +++ b/2.1/containers.data/CCHet/index.html @@ -0,0 +1,3 @@ + +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.

  • Since: 0.17
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
module Key : sig ... end
type pair =
| Pair : 'a Key.t * 'a ‑> pair
module Tbl : sig ... end

Imperative table indexed by Key

module Map : sig ... end

Immutable map

\ No newline at end of file diff --git a/2.1/containers.data/CCImmutArray.odoc b/2.1/containers.data/CCImmutArray.odoc new file mode 100644 index 0000000000000000000000000000000000000000..1eb15f1d32083581b2da4b7101337f9ffc41df33 GIT binary patch literal 2915 zcmb7GZEO@p817wnBQ2&vVuE0RY46%=q3m7xuwX$KYD#JdAGRolm}c&FwzsmkyX?%i z95w_JjFK4LqLlFQV+ATPDqtfahG4*tkeI0PBZ`R%F`AfQEc}r8%lOXh-rd4Kn_PEx z_j%rV=6&9IXKl?cEa_5~D!KiK-ukGnuC5DyGW_PiZ}z!t!L}GSEaFl{!wkRK+1uM+ zDtT*BJSJF)WiUpr?^4PCi9^z&~Ez8njK%mi*dsjF+a0Y7C%U0u2^_}`(Vq#pzq z)~bP@6EotxNsyS9ssTK0IKJ6)iCIRvXBC)XTi8S%CCJth=HjS=wmP7hAcLZUO_^El zM0t-Pmtc(ohM*DR0v%JPG!9^mzc(01TQ)F80Ae|*wI+R!$v_-gV)nJrK?+&9teWAb)K#h*Uue4_QgJjuQXj4IJ@JCg*OJDzIu2j#0dd@Zr+@M zBk8_FTW)36ZyEUR+w(!NXfts~fH*>cc})8Ar^CO`>YTs4{owTOA5R29>()XMgMeqv ze)`b)PvjTYfA~Gy^Y_=Pe{L0Z3t8@MHg2r~sv5G{qFo|cYLsj%J8HW-sDle6RukEw zyl0qNRwFw0OqToj*Ucvntm?ipwr9h<%kN!M*Q$PS@baY8-ORvDzacOD;}(rz(<79R zL`pMQL4!qtJWC_4S?1Xk&%rAbEH-E(wnAG&55cEV!!(gaz(bTLsAOw~ZV*iorLnx9 zAqviz8h=;wi`&16XFOtq&$v(^4!F(~RlN)vo3SeXfxUUKl1}w&hC;rc{W|fv6T_v_rE!C^Lar zA`n&B(i-eQn%5xYaJ*dS4J@Buq2Pukz_^{nt($#^+o)Z%V zr*r)lm}_W5*d6vt#A1P;GPtl-3#~@ExEvGYgu-@KWW8LIbv-pqMA~H_1aEZFvCS)OABiSii+{R;FPPe&c$L))-rXeDoIW} zn4(^uXDSOaJbl zSrQ=wKg}CYFrIV5DHd}wT7tR)zq8un5EkX0c?ug;xV`$`+@lt;;}lTa!efR;L{qdv zA)T0c5u^`J8A}iy#@W;Z= ztwf2yyg#P8logTvcVd~p89kfkdrD47vFvY8m9PWPX7jQEul?q{a9&Q#5hy{J55v6J zesY4rws8z#EQ$(EPRzZRy1YhxG)5h7!;V8N4an=GN!ANwbhEKW8x%uccyi*Mv;n;w zNI236nkLd7Y^!ita^m?4QMx};`DrWXaGATSGL29s?-uhb%onT7OvJq2s@tZNeGZvqfH_w{!Mc>kUyxB;r%_F%Xe{-b2GZ_4nb1}+E?)<=53pA zXED#Us?cbO$)#;%mq8f?)*m&N#LWV;1h-7`C5-K^wMhJsU&sno_zgK$~d7&{9Q)}gLO zv8&PM=meN(6;oG~$w?ZM_IVpD0&)v0-W#o9Zv_c?|3TUx1OL(n>j=Sb2rwLfP&&fS zL2N~8u&~NTrYD8A^2h>;bH|@IeTm6(bB)EVsU*-#&N}W6sW&; zm(3@~<@%-$C|mfpf_#Xb!H;1%v5&L4+x4qj9B3@b=_x;Iz@jWDgOI~2JWNw&JG@{T f_#K=s;$~J@zLRqOGt!Ex%=-c!yneQL05kjtQ(k8@ literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCImmutArray/.jbuilder-keep b/2.1/containers.data/CCImmutArray/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCImmutArray/index.html b/2.1/containers.data/CCImmutArray/index.html new file mode 100644 index 00000000..e402418a --- /dev/null +++ b/2.1/containers.data/CCImmutArray/index.html @@ -0,0 +1,8 @@ + +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 sequence = ('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_seq : 'a t ‑> 'a sequence
val of_seq : 'a sequence ‑> 'a t
val of_gen : 'a gen ‑> 'a t
val to_gen : 'a t ‑> 'a gen

IO

type 'a printer = Format.formatter ‑> 'a ‑> unit
val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/2.1/containers.data/CCIntMap.odoc b/2.1/containers.data/CCIntMap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..97832cfbef76856db68a406d595edc5c7b523163 GIT binary patch literal 3519 zcmb7HYiu0V72essSKtsVQou!*w}a%NDAJ>jczvnCDj- zG@!pKkBn?~g4<|Yuibgcf46>q&+t2MHcubV?0;oQ5?p*Y;P1+0dJn;M<%O9{ArpNq z8k7yA=){m7h2I4?#BVdhq?UOvYmlbv5%5kX*=}Et^ym;6Rs4Vk9e)FX-@3(gJ$j^2 zt6W#p(XuG&8}2ll%nNIe9b7;7_nW3ipWpT8v!kQ`=#QcsN2qO?PQW~eTBELK(_onT zrs0RR-ADHJo*4h#b`}oT*9gm_lTbVZn zz$pgEgXo`U_P=|{x~soke)!XSUwb@?iaU%J1pz;@Hv3l|KZWnR_4ls^dp`S{9xmMA zdq$NfwHoKN0*ZR7)s}0ss&Cq^Q=N9bNxw}EmfDEwM7?8LjcS86X~zm`m(Gm*vZ{?O zd8T479J$!Dhx9Od_~bkqyfz3UT|XH`;k8s3|Dw5tr_e1$X19agAzFGU4Cm4J(Km#F zSlia`o6b&)1+EjK6~}b2*q4Va>Bn>+fhTl%V!X4z;dUVB!nh)g(Ph$7KCDV$wFLG+ z-ez`)Hc6W**l^waJ_)Ld;yDX*!J%{a9LzD9as!ireoq%*4pEg-VkDlxwbAySd+i@CExZZ5?$|9yu95*0s zkNM0AD!Ov(sNbIncaROC@ufU%fW!k*;samNNO0nDpqR zMW+~nW#aQ(_$(l9leDSn`Af^d?()$zD^q&kcC)V zFH~dgYQV|>UWx6|8)=%G;@4Ok5x2Yyu=ew^LA{0vvqVIJ!ru zkwJ_VvIRye^+;gaP=>MG?Xm^1_C2NViGm693Dnt26xMctvCR6uLdP+AV?rlj&5dQD zr3!qi&~&W^EX{Pmo&d7>W1JUnE+W#k*6z}JfSJLh%LW*G$;_Rw8{wzvz2*Jo!$JuKHht!)bcJ*f0 zid)Hce^DGaz&6rlTe~RREortb3EMWwb|8crJ24DOH~z5YT5P~@EsGg^6cV@1Jj(BU z82J1cz}drPA4Ugr49ICV=pF|l7a>atYdx}xmUcm>@;ez1d?sx#GQUcgW(S0p*vD(d zNz3#D07PE_T(8eT9UaY&nHHStM++ld9PA_b=6eYW|AS=yz%fmT z#Q1+Jyx85`wh|W%nGSJI9-KJWo9La#xx3NR3YzOpxz4Rlx%T@&uO!(ZJfoE{rj*8P zOkwu+fn13hmuhpHx@rew_~ z(Ndm{MW8tMqOjt7I25y-PG<%6_wzlJmHd?`QimIyWii1AX&G{ohlgyzOR! literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCIntMap/.jbuilder-keep b/2.1/containers.data/CCIntMap/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCIntMap/index.html b/2.1/containers.data/CCIntMap/index.html new file mode 100644 index 00000000..762faec4 --- /dev/null +++ b/2.1/containers.data/CCIntMap/index.html @@ -0,0 +1,3 @@ + +CCIntMap (containers.data.CCIntMap)

Module CCIntMap

Map specialized for Int keys

status: stable

  • Since: 0.10
type 'a t
val empty : 'a t
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 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

Whole-collection operations

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
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_seq : 'a t ‑> (int * 'a) sequence ‑> 'a t
val of_seq : (int * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (int * 'a) sequence
val keys : _ t ‑> int sequence
val values : 'a t ‑> 'a sequence
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_klist : 'a t ‑> (int * 'a) klist ‑> 'a t
  • Since: 0.13
val of_klist : (int * 'a) klist ‑> 'a t
  • Since: 0.13
val to_klist : 'a t ‑> (int * 'a) klist
  • Since: 0.13
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 = Format.formatter ‑> 'a ‑> unit
val pp : 'a printer ‑> 'a t printer
  • Since: 0.13

Helpers

\ No newline at end of file diff --git a/2.1/containers.data/CCMixmap.odoc b/2.1/containers.data/CCMixmap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..fc62723450307bc3abf9721fa6ffd40b4450b60e GIT binary patch literal 4122 zcmb7GZH!b`8J=@Fr*;QJA*5=pg|i>9yRgiDVZj#YT_{jO7U?bp8>O4ObI_WG7be>`Vt2Y37;ms>QM%ProU%jLJ-p38OQ zlK;yMHR2?h8#0r4%dk}o_)#Y;^M^zzd~ZUy!ixgF->O6+FcUMm2($G;XoXR59~Z}J z!gs0yj4SftseCSHL|pw5B8=f~eNQdSiWj3$`rV=1+jneHq(+-hUGd z$#Q_V4Yb|FronHJe|hkJ{2$Czk=j^6ApDSb4HqV$(Z`@cmydc?!TU3LZgNC&>F4su z9?uoGcwj&sP#B2f77ob_>O;4P(iDCpoK%NffRjNDE(C?@i(57o%a%JKxL4vsdw2El zuq-$_hdTkUSV71weZc*^QLjS!5 zGdbPfSNMWSS0>5EZC15{ScUIel^vd6wZg49Pz>U}`cJ;QWN!5G;Rjc~yKn!iXBQ{Q zn!UoG#M4QE$IsAzTs!;z(w=+Pcb&Ta_*>`Ac=q#wU+k4_-rMLAIB)6gEhD$Rfm8L| z-lLv>IH*}g(KH%*$HpV4V)xpjWJQ&*@146}`KJBC+bzh^!@WX8#<`5C&g z8`Ua`q2sye@wny0kjt%NQ3QeK^AbLjstbsa>3?*kw&MXrh$Nzc17Jr%Gk z;v2j?nNbR6Sf$3SbiQW09Js3JOwF-C?=e+<475WXMPOtnWR|)qToCbn5!5`_mR!)$ zvfgC&fL`KGh}#MCKR`9x`EgP4+=)P2EodyoiQ{(k2y~%4lqgEA8M>2h*22*hO1{-z zO?HviO|n1GjvGPoYTb%x6)~AMMI`0elXgNfB{8%BO@K!h0O?wwAtwr*?v{{rj~3uW zM+yEF($*arl9oW0vJ^zOg9`m<*+FSnBTPFKkL+ta_nnC{q(f>j$}V;9@xrl^7r8bj z!o$!?;KE0>N=q35RFvhUEP6N~l$?Q2bt~tOi;2(yyu{K*dmt^7GZcsCtt^$-+m}Zxuj#GVNGh z5DhPnrwq<2ea~rEziqFIs`Asn3l-8Vr)(*?fx7R}4K7y;u|9A^{k)T;y++TbI6qaa zJH|Z^uSc?I{?_fF(Z`^2pqcN&5-&QKOqu+FP8yiY5v%}OOS&x7HzS`&z5h{qXJmF$robO)jP&>ln8A;twMVmiSRO*?jO^-?VUOXY41L{DrP2sFOAsTg zpdE>Fb7yvZY;9H)V_r##w<&XxJ%B&l6Gi!2RPw#5a)0BLXxxTc*tGK*2@=rOvNEzm za-cjptr^@44djibLqEAnwI1Sravq_XkZJxBZCSNnUZmLlcATVXI;W1QAa-jHv5svT zBPG>jrYqwvBih(h4Y;uWrwf3osC^})=Hq=FR6nPPsBzAW742Ufc@RYA(}~`K@y*C@ z6j@z_OFJP^&GIGPKPa*@^wV@nT2)L!Fam*STM~b8o*55x$oF>ay*G6}p1n$MA8P#) zM*2l&?567wzq}+qN!QXfv^xc$U9>ZGd?#J69na9uQoKQRniuq0n;Ewy)A0pU-Z)?f zah{8>(t#nmrZtoSVQV^xXK6p}O+hx${qzyKPlMb~N9jlkV$!h;WIMG@I-;{h_cEiC z8LR0kl{~tS86D7>8SUy$nxO}ovEIbG%`}<8wcl}Otb~d(RkXwmWM4M!A!gjgjL%$Q z#&TvXO<`-y*qPx*%-9YmitbobB9kVZ%n`H?ED zzcO-$k*63rt(pFvk(20y)cgZx%h7qLZ zPwEgxDLCt9f?i9Q@jj}7V9x1YU(U!8Mrw?Bs>@+=7b8cpWW;5pnzr)_MviMdM%oy8 fjFE#G5{mDm6lpE;)Ib_wi&|9c!sP}8sLTDoV;aSX literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCMixmap/.jbuilder-keep b/2.1/containers.data/CCMixmap/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCMixmap/Make/argument-1-X/index.html b/2.1/containers.data/CCMixmap/Make/argument-1-X/index.html new file mode 100644 index 00000000..7c387271 --- /dev/null +++ b/2.1/containers.data/CCMixmap/Make/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCMixmap.Make.1-X)

Parameter CCMixmap.Make.1-X

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCMixmap/Make/index.html b/2.1/containers.data/CCMixmap/Make/index.html new file mode 100644 index 00000000..f4dc7647 --- /dev/null +++ b/2.1/containers.data/CCMixmap/Make/index.html @@ -0,0 +1,4 @@ + +Make (containers.data.CCMixmap.Make)

Module CCMixmap.Make

Parameters

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 sequence = ('a ‑> unit) ‑> unit
val keys_seq : t ‑> key sequence

All the keys.

val bindings_of : inj:'a injection ‑> t ‑> (key * 'a) sequence

All the bindings that come from the corresponding injection.

type value =
| Value : ('a injection ‑> 'a option) ‑> value
val bindings : t ‑> (key * value) sequence

Iterate on all bindings.

\ No newline at end of file diff --git a/2.1/containers.data/CCMixmap/index.html b/2.1/containers.data/CCMixmap/index.html new file mode 100644 index 00000000..9b9da8ad --- /dev/null +++ b/2.1/containers.data/CCMixmap/index.html @@ -0,0 +1,25 @@ + +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()
+      let inj_list_int = CCMixmap.create_inj()
+
+      let m =
+        M.empty
+        |> M.add ~inj:inj_int 1 1
+        |> M.add ~inj:inj_str 2 "2"
+        |> M.add ~inj:inj_list_int 3 [3;3;3]
+
+          assert (M.get ~inj:inj_int 1 m = Some 1)
+          assert (M.get ~inj:inj_str 1 m = None)
+          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 : functor (X : ORD) -> S with type key = X.t
\ No newline at end of file diff --git a/2.1/containers.data/CCMixmap/module-type-ORD/index.html b/2.1/containers.data/CCMixmap/module-type-ORD/index.html new file mode 100644 index 00000000..1a27ae60 --- /dev/null +++ b/2.1/containers.data/CCMixmap/module-type-ORD/index.html @@ -0,0 +1,2 @@ + +ORD (containers.data.CCMixmap.ORD)

Module type CCMixmap.ORD

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCMixmap/module-type-S/index.html b/2.1/containers.data/CCMixmap/module-type-S/index.html new file mode 100644 index 00000000..e188bea9 --- /dev/null +++ b/2.1/containers.data/CCMixmap/module-type-S/index.html @@ -0,0 +1,4 @@ + +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 sequence = ('a ‑> unit) ‑> unit
val keys_seq : t ‑> key sequence

All the keys.

val bindings_of : inj:'a injection ‑> t ‑> (key * 'a) sequence

All the bindings that come from the corresponding injection.

type value =
| Value : ('a injection ‑> 'a option) ‑> value
val bindings : t ‑> (key * value) sequence

Iterate on all bindings.

\ No newline at end of file diff --git a/2.1/containers.data/CCMixset.odoc b/2.1/containers.data/CCMixset.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9d1367cd2ae8fdee26ed9845862ed3f3c2663e73 GIT binary patch literal 1691 zcmb7EO=u)V6ztSyaMDgrV@Sq0|iXa|5coE;LnaoabS+t>;nyOdd``-7y zDjCUevF6pi>RbCCed##PB918>kKuUq$PcB^EEYUfUc@xJQCeMnA>L732i0G{{(JkI z^-EK~9N&0lW9sZ*LxB69cAPV1$GP`U9Q=OAnRCqlf^qN3jk(nfOuoFvHOMwR%Qa8s zCKp_03f5US<0>$L*(+cw0ru-+=vEDuAQm{`16TpUw`o!;<62=Ns{Ws%8W^Q?8jH=l z!=V(gGJ*%-Nly>P|6Y3rX!~`fv4rGmciyN&{mvT=C^m|tt#JuVDV}O5ZB77N4zMN@ z4z=>~=)}JR>z2*RFtC1?z{X@Cau|n}%7J-juIkllf%~vAPpz_~i-Pl1uJ$S&F^DpwWkGp-2+wZx*{c!N}BbBokN_)S*`uzt% ze)ObDL!Uh6pIFR8@M+)gU|qh76Dj;{nQo~b3;BdE{f$-@cOyUIZI*R)wZ8h@g{yn~ z3-;54=MMTioo0}mz2if-G^5d2`Sg6#R)@aoTPKmjI;R|_2R$@ca2(KQ&o*YUh4ys0 z37LqmXB>*SR0J)7g&|i8*btB42ms7(ae>qvVK0iP7 zDWdO|$CgE&7a>eJ)0~iT{Uj|}T6dU+kO^pU$P|xmvnWs|n|FF)#K)$`+#XzEVaJ+z z2pqw7tUDM#Vt_fD5G#mcrDGB5LOYcSFfjnBJ3OV672tg?AjT3q$fLvhoMxaHT92ys z@LJ~8Yf|GfvX2%OYjZCMZU!Ib`MYx{ou=8LE8Jx(gw-H>!rmJa`1}>RLDV5UWh38k zUmhy;CMifVdH8ED74#{PG)`DgVI|Zilh2VJW_PAfQ!Ia|y~&q6cuqsYnNU{3LR+R( zP&ycg6e~ELE}mR2D4kAK#%IM|GlZU@vhti#B2V|SE$3!{-L=KKD@5N#15ua1nng(B zUKvAM<`+S>=zS$ZeAF;vb-R=a{^bfOj}1AU`T8g`rQ5VR&&!^UrLgNZ{T~aMc7yK- zlDM=+-D0TMCpjKj#*X#Za+e^9Pf|@j; y!TS?T_DKm!K6U2tQpnOM#y5h}H?Cz#3+;sW1iRM52UZb^RqN2wpT#EyZ^%EA!&zeh literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCMixset/.jbuilder-keep b/2.1/containers.data/CCMixset/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCMixset/index.html b/2.1/containers.data/CCMixset/index.html new file mode 100644 index 00000000..36c2301f --- /dev/null +++ b/2.1/containers.data/CCMixset/index.html @@ -0,0 +1,17 @@ + +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 =
+        empty
+        |> set ~key:k1 1
+        |> set ~key:k2 2
+        |> set ~key:k3 "3"
+      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 diff --git a/2.1/containers.data/CCMixtbl.odoc b/2.1/containers.data/CCMixtbl.odoc new file mode 100644 index 0000000000000000000000000000000000000000..760f6f8df60c70c66a773d21054a5f564ac16c2d GIT binary patch literal 3460 zcmb7GU1$_n6y6QH#cWY3MWGLEZ#F;fYOc5Pb9S-3;H2SE~kheQLSP6BU#C^o!EO!~yGs zuiM)2!As^H@7TQ?KW;uS`qRd8Nd;KnpUHIX&t%p;m&rVJe_bZimx-PzOs*@8qU&Q? z6m}Q)QPChXRJR#9Zut$ekNM2wb>=c22=WGN2`$2f+N8%F((wJJ*jcUCVQHXO4DM8& zIqK-#tvV7jDftcR&I{sm(y*LzrSRGb>NIV(6QZ0g0Pz2a{MgJVmOD3VxjxxL63P|B zW7KEx-#Jn$lU=(Ch4ylgWaUyaGTgE3%_FYmSEvxo^Jm$yfZAk=yNsloR_c)VT?oH3 zNsdvAv{-KEO2LQ@jPWuu(q6YpveGnn7#S%)S;9mM;d_=_U&(Q$94jEkTO~@pNQ(QI zZS!I(-z8VziJ`1I+2H{Jf_+Wp=OUU16%^OG?x zjLt4y&JFhXFfGFF$uZKvS>elB5f3f2>jJd{CJ3())2h{&$56pmlZi@UrorSTX;P0m zI9W(^rnrSdxE|uMrpE-VhGCJcgCKZ44`ZjIX-kl|hidX8v5b|$5X|r`?n+GWkGX^z z1`~pNqz2zM7DPa{=rCglbz2H`g&b8_n}J_|2Qsas69{BNF)=ZyOSo&dh|T~bv?N<# zCQ&Q=h9wFM%xe(=d~kUJQ;%Vuzxr+N;D8!qfbmR8T@n{K4-j=DAXA5yK-z+_Wx=o# z)=35u^}y;Lh`gwM6^0jj!76xhIcMeeNJS#d(%jk}mZ$~{*X)7A%nv-EtdszT)F-m~ zQXWd`;3FW8;y_v@SB1;~Em8|ysVo7CE}GH?4Gj1N_S`j?jKHV?7UMGaa5-7&zM*bi+~-}Qos5>?N*<(d)} z$|7OJ2nS<7M`tht>_x8abYn7_N;eDF6r2dZ_@g77w-o<7eKklRQ;kn1sgwfPj7UfM zO)@{;u)sS`AbjksxYIqW-caMBqD5EAQ{11e@xV2qTMmI#4Bj)q4j2h3fQVQvxnht& z3aO@0suxVogu4Z!qoN7l&J3L#=Q}ul*yacfWo;h}*vzf_4P-Yu6*xM;0L(hjgqq@X zQu2H*x1uQDNKx|Hjs1qrsD~T(PT&>T0cJf+#h5d;zMP_IkZWm>D{+wi0gpL+fk|=6 zVR)*}_oUC*UH%u^hwiDTcq~6{?WWPWL*@kswC* zt2v!k6q^PMBf|`;Hpct5;Cq*u>W?VV?7=da7y5M0?HHDr35+h+0kJHIFnX1Vm^C21@=x13_@Z! G`1}tU4DVC` literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCMixtbl/.jbuilder-keep b/2.1/containers.data/CCMixtbl/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCMixtbl/index.html b/2.1/containers.data/CCMixtbl/index.html new file mode 100644 index 00000000..dec2856d --- /dev/null +++ b/2.1/containers.data/CCMixtbl/index.html @@ -0,0 +1,32 @@ + +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 ;;
+
+      OUnit.assert_equal None (CCMixtbl.get ~inj:inj_int tbl "a");;
+
+      CCMixtbl.set inj_int tbl "a" 1;;
+
+      OUnit.assert_equal (Some 1) (CCMixtbl.get ~inj:inj_int tbl "a");;
+
+      let inj_string = CCMixtbl.create_inj () ;;
+
+      CCMixtbl.set inj_string tbl "b" "Hello";
+
+      OUnit.assert_equal (Some "Hello") (CCMixtbl.get inj_string tbl "b");;
+      OUnit.assert_equal None (CCMixtbl.get inj_string tbl "a");;
+      OUnit.assert_equal (Some 1) (CCMixtbl.get inj_int tbl "a");;
+      CCMixtbl.set inj_string tbl "a" "Bye";;
+
+      OUnit.assert_equal None (CCMixtbl.get inj_int tbl "a");;
+      OUnit.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 sequence = ('a ‑> unit) ‑> unit
val keys_seq : 'a t ‑> 'a sequence

All the keys.

val bindings_of : inj:'b injection ‑> 'a t ‑> ('a * 'b) sequence

All the bindings that come from the corresponding injection.

type value =
| Value : ('b injection ‑> 'b option) ‑> value
val bindings : 'a t ‑> ('a * value) sequence

Iterate on all bindings.

\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap.odoc b/2.1/containers.data/CCMultiMap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..acdc26bbdd753707020f6ebc2b2671bcf3fdc79e GIT binary patch literal 6681 zcmb7I4RjRM70$eQmqS4Q6pBI63E2(#-6i}AifjS|BLt9NMKMfvCuC%IC+<#y0ZVBQ zA}ZR{6uL5MbJX4heGSIN?WbfYOVHQwQ}qckJ_qGt+x05&4wzi<&f-T-u=G& z^X_~1-gOdAys|1XDl&5I<_C}D<>f{32k_@x_%mRCH14Eb(@tBNY$Rd2=8m!{Q|eoj zu3c}o#76F|d%XJPNTl-2>|={c+n%F>qTp~|UQatO@4{4G-r%)8^YTJ@{{KltiRb%= zs$;%a!nLJPTP#L<`u?R;%v91&yH+M`CTpEc%5-bYtR2sKBikR@(D%^1N0(2%;nxaIk=*iqm23QhFHI}ke%!^hp8*BNR}+inb>DBz0UadbDGSUAt4 z1zrcI$S+!MwR^PiD6Zlz&JWX zNrd<;_KmppY^M&FGP(vE4*)l=unwP0*D{>6GVUDATP1TlehR(V!--qK) zYuXil&uUFIS{Y`sbo(64hb3Ppx48&Uryx5OQf5x*W+m=SE>Qx%UkI#vM6&H;Y@qcL zAAL9_X!)TgC&|M(t`;Ad+h0$33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h3ejt$8g4JOECXpwAJcQ;<;^w^F zy;Gv^;&g#aWBJl4Aftd(Nz_L;8Yvy00y!jfe1?OR(D5aZD3FMd22IB~Op1fnlSwfj zK|4>4VW9N~QURn~AqKHQO#Lwg$m?iGi8!$r0|^5Osl_57?*)=2K;A;hLLrHSC_GF_ zR^_HP(8lqx4ag8*n1apZr|M)PLjjNr6>b{neF6 +1-K (containers.data.CCMultiMap.Make.1-K)

Parameter CCMultiMap.Make.1-K

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/Make/argument-2-V/index.html b/2.1/containers.data/CCMultiMap/Make/argument-2-V/index.html new file mode 100644 index 00000000..a4b4688d --- /dev/null +++ b/2.1/containers.data/CCMultiMap/Make/argument-2-V/index.html @@ -0,0 +1,2 @@ + +2-V (containers.data.CCMultiMap.Make.2-V)

Parameter CCMultiMap.Make.2-V

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/Make/index.html b/2.1/containers.data/CCMultiMap/Make/index.html new file mode 100644 index 00000000..41b99a73 --- /dev/null +++ b/2.1/containers.data/CCMultiMap/Make/index.html @@ -0,0 +1,3 @@ + +Make (containers.data.CCMultiMap.Make)

Module CCMultiMap.Make

Parameters

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 ‑> unit) ‑> unit

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_seq : t ‑> (key * value) sequence
val of_seq : ?⁠init:t ‑> (key * value) sequence ‑> t
val keys : t ‑> key sequence
val values : t ‑> value sequence

Some values may occur several times.

\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/MakeBidir/argument-1-L/index.html b/2.1/containers.data/CCMultiMap/MakeBidir/argument-1-L/index.html new file mode 100644 index 00000000..41379937 --- /dev/null +++ b/2.1/containers.data/CCMultiMap/MakeBidir/argument-1-L/index.html @@ -0,0 +1,2 @@ + +1-L (containers.data.CCMultiMap.MakeBidir.1-L)

Parameter CCMultiMap.MakeBidir.1-L

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/MakeBidir/argument-2-R/index.html b/2.1/containers.data/CCMultiMap/MakeBidir/argument-2-R/index.html new file mode 100644 index 00000000..cc041fdf --- /dev/null +++ b/2.1/containers.data/CCMultiMap/MakeBidir/argument-2-R/index.html @@ -0,0 +1,2 @@ + +2-R (containers.data.CCMultiMap.MakeBidir.2-R)

Parameter CCMultiMap.MakeBidir.2-R

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/MakeBidir/index.html b/2.1/containers.data/CCMultiMap/MakeBidir/index.html new file mode 100644 index 00000000..13c55798 --- /dev/null +++ b/2.1/containers.data/CCMultiMap/MakeBidir/index.html @@ -0,0 +1,2 @@ + +MakeBidir (containers.data.CCMultiMap.MakeBidir)

Module CCMultiMap.MakeBidir

Parameters

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 sequence

Find all bindings for this given left-key.

val find_right : t ‑> right ‑> left sequence

Find all bindings for this given right-key.

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) sequence

Iterate on pairs.

val add_pairs : t ‑> (left * right) sequence ‑> t

Add pairs.

val seq_left : t ‑> left sequence
val seq_right : t ‑> right sequence
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/index.html b/2.1/containers.data/CCMultiMap/index.html new file mode 100644 index 00000000..62059049 --- /dev/null +++ b/2.1/containers.data/CCMultiMap/index.html @@ -0,0 +1,4 @@ + +CCMultiMap (containers.data.CCMultiMap)

Module CCMultiMap

Multimap

type 'a sequence = ('a ‑> unit) ‑> unit
module type S : sig ... end
module type OrderedType : sig ... end
module Make : functor (K : OrderedType) -> functor (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 : functor (L : OrderedType) -> functor (R : OrderedType) -> BIDIR with type left = L.t and type right = R.t
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/module-type-BIDIR/index.html b/2.1/containers.data/CCMultiMap/module-type-BIDIR/index.html new file mode 100644 index 00000000..7edb3f7c --- /dev/null +++ b/2.1/containers.data/CCMultiMap/module-type-BIDIR/index.html @@ -0,0 +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 sequence

Find all bindings for this given left-key.

val find_right : t ‑> right ‑> left sequence

Find all bindings for this given right-key.

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) sequence

Iterate on pairs.

val add_pairs : t ‑> (left * right) sequence ‑> t

Add pairs.

val seq_left : t ‑> left sequence
val seq_right : t ‑> right sequence
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/module-type-OrderedType/index.html b/2.1/containers.data/CCMultiMap/module-type-OrderedType/index.html new file mode 100644 index 00000000..018a1206 --- /dev/null +++ b/2.1/containers.data/CCMultiMap/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (containers.data.CCMultiMap.OrderedType)

Module type CCMultiMap.OrderedType

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiMap/module-type-S/index.html b/2.1/containers.data/CCMultiMap/module-type-S/index.html new file mode 100644 index 00000000..6f93f886 --- /dev/null +++ b/2.1/containers.data/CCMultiMap/module-type-S/index.html @@ -0,0 +1,3 @@ + +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 ‑> unit) ‑> unit

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_seq : t ‑> (key * value) sequence
val of_seq : ?⁠init:t ‑> (key * value) sequence ‑> t
val keys : t ‑> key sequence
val values : t ‑> value sequence

Some values may occur several times.

\ No newline at end of file diff --git a/2.1/containers.data/CCMultiSet.odoc b/2.1/containers.data/CCMultiSet.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9fb1e8ee18861ee6009ad06c48ab7ac4e532b675 GIT binary patch literal 4513 zcmbtXZE#dq8P1+_-hl)aunL0|y-PO92Ey(pfPe&gle8#uEjlyvjmWfh><hXWYD-o7bFbNoDpNIR1Q9RaF{)0Dq?8&(xuG&UJjla?FyK${W7X zKc}N(b-CzU>r7wIQ0;uvxj^|zSA8cF}Ttv*Z}X6>iBk{C2~$a$b<>J^9!t&a8W8>z$vw zy#Bry4^0ZgId_|-ZP>fb#O}lFtxJdAn9?+BL2}=<9T$&=VJ!|K$RzvcU7PWjcZFsW5tJiJh%rQwycV^30F`v$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=fVda`vf z&;n3XOy3||26U&6Rh~4~h8BQ!s;(74za{5ukgWpRhporKFH7`yfc{#d9|wwV9#H80Krck-9{?S}GSFrb;0d6YB&8o{8fZ#UjstxoqWlEt z+k!GdP=V@g}f25^)XKLWy`6$Wb8u3ULG2qA2Wp zz*+?wVliN9>%;&E9tV3R9%41XRw@F-CIefe7`FlYiU4fjv@T+y!h8Ca+6u{n$z% zCXjrDTm$TT734Z#`w%JCJH+k>k_BQ!$c?}bSC9s<5RvlyjiF#CkcT4V7GO_f=LQ+j z0fI_ur9;dEToC;4n6@3jhOxdL$UTy?3&`8ICCoGHvyVCxiPYX+o~Q&UF7_401G%HUSYfk k(7_p+Vh{pk7LeP8tLYJpOaj2iHIQk_6`2CCmLI+U1=uQqC;$Ke literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCMultiSet/.jbuilder-keep b/2.1/containers.data/CCMultiSet/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCMultiSet/Make/index.html b/2.1/containers.data/CCMultiSet/Make/index.html new file mode 100644 index 00000000..ab31ad40 --- /dev/null +++ b/2.1/containers.data/CCMultiSet/Make/index.html @@ -0,0 +1,8 @@ + +Make (containers.data.CCMultiSet.Make)

Module CCMultiSet.Make

Parameters

O : Set.OrderedType

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_seq : t ‑> elt sequence
val of_seq : elt sequence ‑> 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_seq_mult : t ‑> (elt * int) sequence
  • Since: 0.19
val of_seq_mult : (elt * int) sequence ‑> t
  • Since: 0.19
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiSet/index.html b/2.1/containers.data/CCMultiSet/index.html new file mode 100644 index 00000000..88cb381c --- /dev/null +++ b/2.1/containers.data/CCMultiSet/index.html @@ -0,0 +1,2 @@ + +CCMultiSet (containers.data.CCMultiSet)

Module CCMultiSet

Multiset

type 'a sequence = ('a ‑> unit) ‑> unit
module type S : sig ... end
module Make : functor (O : Set.OrderedType) -> S with type elt = O.t
\ No newline at end of file diff --git a/2.1/containers.data/CCMultiSet/module-type-S/index.html b/2.1/containers.data/CCMultiSet/module-type-S/index.html new file mode 100644 index 00000000..b15236b5 --- /dev/null +++ b/2.1/containers.data/CCMultiSet/module-type-S/index.html @@ -0,0 +1,8 @@ + +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_seq : t ‑> elt sequence
val of_seq : elt sequence ‑> 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_seq_mult : t ‑> (elt * int) sequence
  • Since: 0.19
val of_seq_mult : (elt * int) sequence ‑> t
  • Since: 0.19
\ No newline at end of file diff --git a/2.1/containers.data/CCPersistentArray.odoc b/2.1/containers.data/CCPersistentArray.odoc new file mode 100644 index 0000000000000000000000000000000000000000..0a2619f98d2b4fd25c3811590736846de274eedb GIT binary patch literal 4501 zcmdT{TWlOx8D6hvMZGN*L6urXr5xKEd!6jgu9ILAik;oK+QUU-v$p8VX|`CtC{d#}Cu%5|k_M>Utznz`Kj z_vCUnzj{+HSIWiznLaHa#qs54BaUV_Z8K@yZ^U>!_Su%_^jXjo%;m1|SbM_GJX6Q)z!XL|ETWzQ5@;gC!ej5Imd1^ z;;)wK`fRG_ z9Ok~+@uT|S`LnlPKK`xK_k8#dC+>gw(VL-12}Jdsw;zA3)H-+U+VqiQ$A9tj7vgv~ z61IYaD*`7U*Z%UmNB{JJ%7^xsA9?$M-<*%*T_-y|4hKGCE%|r6aHa6zk?;R1cub=GJW;sjc49&Hlp~Emo8|B#sic$nm>Ue1p`+w$H-QP6UO{T<0Z(9^M?Ev zpS$#|c3-K_PYWDfFVlkAYz;`znI}*?+h_beT1c}c?B$@x>rWeu3y8=xj~Db9o(ryaIdESt83qAzS; zMnf2wpJ%Qox{waUjLsGvygL)ZiZ!S((_m{1cKTt!+m^tC0NbLE+K4XW$nY|Q6}Hte zp?s<^4&?Tou4xQR2(H1n=Y-2W=GdwEqVgW*JX81x9m>=Rsn>yr9!uZyK)KKRD2Uk? zdLw?OzGSa(%j}-w-f~FEiK9t)9k1`Q*~eKuj!Mk&usvY21$KPk>wUfkS(NUS$~a1M zpI%&|gbD^#p>$0~&6#02Jb>?2*8%349roM8tB|P5B$S!`u+Mz+0i@qAIyRCIW7`>G zHMSQ>(Ho8LG@gp0jY(+464=4+g7$fBQQ}BK=;0F8QbLFpfRF({=l(qiB}FL$N@g4_ zr0{^NUBUy!>j@tnKyZrJCk+NM`1gODRIQ1O%JgcjB(vGHzB;)qWLBr~i#|l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nDU1%%1KM3melvL!OP@-^*LF<1p8OU^EDvu +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

  • Since: 0.10
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

iter f t applies function f to all elements of the persistent array, +in order from element 0 to element length t - 1.

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 sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
val to_seq : 'a t ‑> 'a sequence
val of_seq : 'a sequence ‑> '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 = Format.formatter ‑> 'a ‑> unit
val pp : 'a printer ‑> 'a t printer
  • Since: 0.13
\ No newline at end of file diff --git a/2.1/containers.data/CCPersistentHashtbl.odoc b/2.1/containers.data/CCPersistentHashtbl.odoc new file mode 100644 index 0000000000000000000000000000000000000000..d2a0029f9f1f5b92dad69af7cb9c8e87aeec3cd9 GIT binary patch literal 6204 zcmbVQeRLgVola)nCpF=#iH!Y-8ZIPxHQ1_I{y>pWxbMIX4 z%uR@T%38a&YIP@K3kV(tXt2ABQd$wKN9YP#kLw4t%Py>}!Xn2#yDHssK>Rqm&-=bJ z_g;_wWzR`7@4Ua~`F;Q1cj6cQ!txb^7Y`2a+gcQ<0p2AcVG0(7Vk;Twe)yf+oHa< zwsU^h*7o{mU)R=_X^a0-Mqxy8{P1W#jyf-H8emP)g5{w-;W?IHu|mIU`6cVBb#~dy z1!`061^HM4pC9$geh^xAU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IUZK4WI78uXlQ?bxr@`DK zfoSi9`Ei)LQ`s|tb71aFm#+t`yhber-VF1j8g)L*zlC{oDrNy$m><%D8DJUAIW5=+ za|UMp5X>7=;XzYsrhun&zV@(J|Y z!1rMMP%HW_3@-jfVZPhIoB*Dam}4pCY2e2&zO6CO!gvhEH&aud2WW>}!g#bn@jt+? zB*h~s#Y?~|FutKF=;_yB97!o&1AecUFusyf813jdQ&K#XP#7KPI33296@}3S<3Sku z9>r07t003%&`)eJ~ahwMI8Oa$FK~PXp7Bj+GK~H!(2o z(zqcQ`(W_01LL!l{#2}zV5~&Pr7-p+ +1-H (containers.data.CCPersistentHashtbl.Make.1-H)

Parameter CCPersistentHashtbl.Make.1-H

type t
val equal : t ‑> t ‑> bool
val hash : t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCPersistentHashtbl/Make/index.html b/2.1/containers.data/CCPersistentHashtbl/Make/index.html new file mode 100644 index 00000000..04339b3b --- /dev/null +++ b/2.1/containers.data/CCPersistentHashtbl/Make/index.html @@ -0,0 +1,10 @@ + +Make (containers.data.CCPersistentHashtbl.Make)

Module CCPersistentHashtbl.Make

Parameters

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 !.

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_seq : (key * 'a) sequence ‑> 'a t

Add (replace) bindings from the sequence to the table.

val of_list : (key * 'a) list ‑> 'a t
val add_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val add_list : 'a t ‑> (key * 'a) list ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence

Sequence of the bindings of the table.

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

Misc

val equal : 'a equal ‑> 'a t equal
val pp : ?⁠sep:string ‑> ?⁠arrow:string ‑> key printer ‑> 'a printer ‑> 'a t printer
val stats : _ t ‑> Hashtbl.statistics

Statistics on the internal table.

  • Since: 0.14
\ No newline at end of file diff --git a/2.1/containers.data/CCPersistentHashtbl/index.html b/2.1/containers.data/CCPersistentHashtbl/index.html new file mode 100644 index 00000000..7e53ad85 --- /dev/null +++ b/2.1/containers.data/CCPersistentHashtbl/index.html @@ -0,0 +1,5 @@ + +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 sequence = ('a ‑> unit) ‑> unit
type 'a printer = 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 : functor (H : HashedType) -> S with type key = H.t
\ No newline at end of file diff --git a/2.1/containers.data/CCPersistentHashtbl/module-type-HashedType/index.html b/2.1/containers.data/CCPersistentHashtbl/module-type-HashedType/index.html new file mode 100644 index 00000000..3af4a03a --- /dev/null +++ b/2.1/containers.data/CCPersistentHashtbl/module-type-HashedType/index.html @@ -0,0 +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 diff --git a/2.1/containers.data/CCPersistentHashtbl/module-type-S/index.html b/2.1/containers.data/CCPersistentHashtbl/module-type-S/index.html new file mode 100644 index 00000000..5f05a082 --- /dev/null +++ b/2.1/containers.data/CCPersistentHashtbl/module-type-S/index.html @@ -0,0 +1,10 @@ + +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 !.

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_seq : (key * 'a) sequence ‑> 'a t

Add (replace) bindings from the sequence to the table.

val of_list : (key * 'a) list ‑> 'a t
val add_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val add_list : 'a t ‑> (key * 'a) list ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence

Sequence of the bindings of the table.

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

Misc

val equal : 'a equal ‑> 'a t equal
val pp : ?⁠sep:string ‑> ?⁠arrow:string ‑> key printer ‑> 'a printer ‑> 'a t printer
val stats : _ t ‑> Hashtbl.statistics

Statistics on the internal table.

  • Since: 0.14
\ No newline at end of file diff --git a/2.1/containers.data/CCRAL.odoc b/2.1/containers.data/CCRAL.odoc new file mode 100644 index 0000000000000000000000000000000000000000..7cd86e76c6b5728590415e68279d67e0ee03691e GIT binary patch literal 5936 zcmbtY4~!gD8Na=Iv&R(zgdi#czPsDK-Mv4%*Onq}xpvztht)#iuH{cuj=A00+v&~D zY-eV#Jy40n1Y$~@rGH2P!&oR*Fi>j>0tu-Sicyg$jS0$MMWcZLiIC7h(BJpo%+4Gf zh}iV*-kbM*zwiI|z8R}*m4+7Qm*j`PyZfHU+S=Os@uT49Gx$06V4-B0uBw}w?c~d< ztNt)OIy$~)Lvi@2n|EDvboIGAPjU}$dGz4;^^*IHV{L6GbhWjeaSZ^nC$zPt+Wb$B z!P-6Fe`rn7_m+;UX4$F@ttpi>$Ke}v$90N64!WM+RMj1h|EkG1j;b|->$SR})ikK- z>Xyl^3g0-RI_iv`ad=&=Yxbg^OB=Rk%<-{?St1(M;1Zw5@q6-oz01p51=a$d8xT5V z=rbB8!xuTO-6**L;@fn$$~R^g=Qy0>6yP3%TaY8+a-JaW;_fv-6?_VZZPH@7~ODIaQvMz zv|`cUnHtV7URq>l`F`KpMx~d+oVf|90x&+2>|&dE?q=_xXN$bE&FAfvb%5&gTw4u3UG~!+&(Y z{r2yR-oYh~T`G`Y3nHKLP^YU1Q5Z>wr?q?M;MU0rx)o5U&P^VXu;hS z!M)Z~Efd(tm~JDOp+_iyffEL~Wf%P)4X-z6RYNaNs`hk)+JWya(<7=6hu}^j4hm2p zm4wpc8YHNze_X3svzqkyJfZM^?f(}0^Olv5iItSzlNP}h3JeDdP#=-OTR@kX14J+> zl23=wd-|+8H9CJMJ@M)6C2@uhA&gy@6XGVd?IJOjY&IRWqVZX@`JjjT2Rv})i(tdA z|J}R)7V=v1mBb>cfRu0c8JaomR>|Jgmo#cqC>B`M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cF(2v$U)&MI8W{W!0WKh4k0AG@vO_})BDQ~RKB5-_ z?Gh$-p6m;(+hyZokEa22H6b-KD#wyWI<#JSThm9pX$%Rng^K|J7Xk*ORPd?>;_P7X z){GNuhlp3(UNRbGt&Dej@yYN@p%T9c7f(oSR!ePui#)+UrSmd>?-8Z*E>BS|ZSF!A z>{B}LWyk$BXz}blk*}SH*m3p_dsS{8WPfIVVo%ArOt$JlPRi`^(Uzhrf0 zF*z@F9%U13oGpuA8$IhcLcD1FoyRhDTYS8P5;x3i{&zK%&Y$Hf;)5pUK$wEOByX|; xanq-d&R2WzdZ8$L4|z?z3fFPErw`wDF<(i`_bZ+6vP>9L)+y}olrIqg`41Xj1cU$p literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCRAL/.jbuilder-keep b/2.1/containers.data/CCRAL/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCRAL/Infix/index.html b/2.1/containers.data/CCRAL/Infix/index.html new file mode 100644 index 00000000..2889728b --- /dev/null +++ b/2.1/containers.data/CCRAL/Infix/index.html @@ -0,0 +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 diff --git a/2.1/containers.data/CCRAL/index.html b/2.1/containers.data/CCRAL/index.html new file mode 100644 index 00000000..6cd09614 --- /dev/null +++ b/2.1/containers.data/CCRAL/index.html @@ -0,0 +1,6 @@ + +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

  • Since: 0.13
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 v.

  • 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 sequence = ('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_seq : 'a t ‑> 'a sequence ‑> 'a t
val of_seq : 'a sequence ‑> 'a t
val to_seq : 'a t ‑> 'a sequence
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 = Format.formatter ‑> 'a ‑> unit
val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/2.1/containers.data/CCRingBuffer.odoc b/2.1/containers.data/CCRingBuffer.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8984a317bab7e94084c756991f841a194f902b46 GIT binary patch literal 13025 zcmcIq33yw@wf4Q5U(%HfgaT!UYhovM;w=l1kOX8x0%3=QB|sBoTaHC!$!N*KQo69i z136(U6e>bOQlKS)u(gE-C`()R(z2AT4|uQal(z7o1m1sU=1PW-(pTEY_XX?TbLKxY z=bSmq%+2-YdfLXdk8kfh{o-rys;jFT$A93zt@&^BwH-aVY%!V6rt*dM-efU(b?fx$ zho`d(_Ad4HrSgf+*xMhybjg*suQ>9<1CO2hY{!EJWc)Yl>NcHHS2yNIb#=|zXkA@n zUFDyKQf|3YxveWvDepc#o$o1Sl6l{V^_%xeomfh>Bq}6&6OJgP`brtUFPHac9n$La zPqN@A{q9^T+nefbE2K|K`N>Q%mCq)N=|w5OnDZ-Z%2ziXR!Wsp34z$fU)-O{#=4Wm zo_;?!n97qemnBF(E4u|%Vw6=Cgpc){rQD-wkPF}YoCy)EFam~J~^QpDwU?amljin za_8EoUs!kc=)tyk&pvUBpG=dGUm`!ei5mQ1nUa*=5v?6I-+&QiOtL2Iq8`diSpXXg?vwk*tBD~ zN!uyF>*(mu4Wv2>>499fV{tCOurQeHNe%Obj``iCbf&kXH`SLcWs05e`sIy3+V$iM zpGdC#ODXc=2VIGBMYq^ zDCUzr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4pny=o{YM%~xYZMu`)x$0Ks|1`--CLLwQRus0U{e}li7&q z{!n*w@CJ?TI#72){mgQ^VcLm?Q#V<|xtkz*jMQlc+}#}NMyMYL>|aOZMXMoJ0?~e` zD=p*BP~V5TB4BJpgylNaP=GrY(ItEga66#NP=O!26A{@M;7&&LOsH>K+-Xp!LfKjq z?%s&<2-e2sIc?gE4>m0QV?FIk4L@9t)L(IzC`L9?=%TJu<*u zfarQY2Dl5MSXj>q*as1v9N?A^y@ySK#a*hK1N}{q_>p@Wq7Sh@ATy(g`&~p2w2Wuz zu3=h$cs`;>1c*b3zQ8tuvL)lk->rUkGi7gc$W-DNstb5#v_OA;tJ^F28Z$`eM-ThL zCVs;P34B_ps(xV;zggy^^cOaWm2{F)2g`>vK|drtCP(rUEBVxBT$gH+wre z&C`wY=f1XKK`I^8{_vRT#|&M=w4guKQKOapu>-%kG}#)#jI_y$YrMEq0P zM|SbMqJA@jFd6Z+h}&4rUap>3PGtMO9k&nacjDva8gf6xFGl<#OF9VkJijLKWcl9` zJ+s-U-^Jh_h4>=GOP2RI)Q{C}ppHjI&Xyc$|u~sgJ^Ifak-rpSdzQZwGH%&f0?( z^)$R)&77E@U3e^E_4_}-GtR4CWx6*UuOa#gq8ly8+frd6`k|iWdx*Y|=wB`A11YkY z#x;p$Ap_T2h6JaMl?G`q3k{AEmybRl5IuN()P#+9o56b*(c8&=o8jI9(HjuGKH%O4 zUa7{t6TD9mT}W!7 zQ<;hwE8NLuKSAn_Nr+bC`V4sdlrK8LU@{f)|(5?=LRpRRiS1Xqn5R(o${9=InDq{EZF~EHd;TI6D`tjR{RXgNABlaZA zN{jme%S(iR6-?k`#O4a_28-*45POA>7T1j+{Bwlwvg~d>VnK(@6diky#iqe^S<2ps za5Z6XhnRH8;gtby1L7_p1KcK-od~Z8aK|8ameqsXf%pi7FS5835MGY(GGWwtjWKgO lgwN-r +Byte (containers.data.CCRingBuffer.Array.Byte)

Module CCRingBuffer.Array.Byte

Efficient array version for the char type

type elt = char

The element type

type t = Bytes.t

The type of an array instance

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 diff --git a/2.1/containers.data/CCRingBuffer/Array/Make/argument-1-Elt/index.html b/2.1/containers.data/CCRingBuffer/Array/Make/argument-1-Elt/index.html new file mode 100644 index 00000000..690a5bc5 --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/Array/Make/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +1-Elt (containers.data.CCRingBuffer.Array.Make.1-Elt)

Parameter CCRingBuffer.Array.Make.1-Elt

type t
val dummy : t
\ No newline at end of file diff --git a/2.1/containers.data/CCRingBuffer/Array/Make/index.html b/2.1/containers.data/CCRingBuffer/Array/Make/index.html new file mode 100644 index 00000000..996bdf1e --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/Array/Make/index.html @@ -0,0 +1,5 @@ + +Make (containers.data.CCRingBuffer.Array.Make)

Module CCRingBuffer.Array.Make

Makes an array given an arbitrary element type

Parameters

Elt : sig ... end

Signature

type elt = Elt.t

The element type

type t = Elt.t array

The type of an array instance

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 diff --git a/2.1/containers.data/CCRingBuffer/Array/index.html b/2.1/containers.data/CCRingBuffer/Array/index.html new file mode 100644 index 00000000..37060726 --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/Array/index.html @@ -0,0 +1,2 @@ + +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 = Bytes.t

Efficient array version for the char type

module Make : functor (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 diff --git a/2.1/containers.data/CCRingBuffer/Array/module-type-S/index.html b/2.1/containers.data/CCRingBuffer/Array/module-type-S/index.html new file mode 100644 index 00000000..77509e4e --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/Array/module-type-S/index.html @@ -0,0 +1,5 @@ + +S (containers.data.CCRingBuffer.Array.S)

Module type CCRingBuffer.Array.S

type elt

The element type

type t

The type of an array instance

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 diff --git a/2.1/containers.data/CCRingBuffer/Byte/index.html b/2.1/containers.data/CCRingBuffer/Byte/index.html new file mode 100644 index 00000000..18d37024 --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/Byte/index.html @@ -0,0 +1,15 @@ + +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. Doesn't actually destroy the content.

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 diff --git a/2.1/containers.data/CCRingBuffer/Make/Array/index.html b/2.1/containers.data/CCRingBuffer/Make/Array/index.html new file mode 100644 index 00000000..eed8626a --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/Make/Array/index.html @@ -0,0 +1,5 @@ + +Array (containers.data.CCRingBuffer.Make.Array)

Module CCRingBuffer.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 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 diff --git a/2.1/containers.data/CCRingBuffer/Make/argument-1-X/index.html b/2.1/containers.data/CCRingBuffer/Make/argument-1-X/index.html new file mode 100644 index 00000000..77d276ab --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/Make/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCRingBuffer.Make.1-X)

Parameter CCRingBuffer.Make.1-X

type t
val dummy : t
\ No newline at end of file diff --git a/2.1/containers.data/CCRingBuffer/Make/index.html b/2.1/containers.data/CCRingBuffer/Make/index.html new file mode 100644 index 00000000..a2bc7ba1 --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/Make/index.html @@ -0,0 +1,15 @@ + +Make (containers.data.CCRingBuffer.Make)

Module CCRingBuffer.Make

Buffer using regular arrays

Parameters

X : sig ... end

Signature

module Array : Array.S with type elt = X.t and 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. Doesn't actually destroy the content.

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 diff --git a/2.1/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html b/2.1/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html new file mode 100644 index 00000000..45eea5e2 --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html @@ -0,0 +1,5 @@ + +1-A (containers.data.CCRingBuffer.MakeFromArray.1-A)

Parameter CCRingBuffer.MakeFromArray.1-A

type elt

The element type

type t

The type of an array instance

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 diff --git a/2.1/containers.data/CCRingBuffer/MakeFromArray/index.html b/2.1/containers.data/CCRingBuffer/MakeFromArray/index.html new file mode 100644 index 00000000..a2889dad --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/MakeFromArray/index.html @@ -0,0 +1,15 @@ + +MakeFromArray (containers.data.CCRingBuffer.MakeFromArray)

Module CCRingBuffer.MakeFromArray

Makes a ring buffer module with the given array type

Parameters

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. Doesn't actually destroy the content.

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 diff --git a/2.1/containers.data/CCRingBuffer/index.html b/2.1/containers.data/CCRingBuffer/index.html new file mode 100644 index 00000000..d71993b0 --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/index.html @@ -0,0 +1,3 @@ + +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

Ring Buffer

module Byte : S with module Array = Array.Byte

An efficient byte based ring buffer

module MakeFromArray : functor (A : Array.S) -> S with module Array = A

Makes a ring buffer module with the given array type

module Make : functor (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 diff --git a/2.1/containers.data/CCRingBuffer/module-type-S/Array/index.html b/2.1/containers.data/CCRingBuffer/module-type-S/Array/index.html new file mode 100644 index 00000000..e20d55b7 --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/module-type-S/Array/index.html @@ -0,0 +1,5 @@ + +Array (containers.data.CCRingBuffer.S.Array)

Module CCRingBuffer.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 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 diff --git a/2.1/containers.data/CCRingBuffer/module-type-S/index.html b/2.1/containers.data/CCRingBuffer/module-type-S/index.html new file mode 100644 index 00000000..24e20ac0 --- /dev/null +++ b/2.1/containers.data/CCRingBuffer/module-type-S/index.html @@ -0,0 +1,16 @@ + +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. Doesn't actually destroy the content.

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 diff --git a/2.1/containers.data/CCSimple_queue.odoc b/2.1/containers.data/CCSimple_queue.odoc new file mode 100644 index 0000000000000000000000000000000000000000..4a465e7f6cb193d40baa849def76ee2a6b3eb5a8 GIT binary patch literal 3157 zcmbVOTWl0n7~Y*d$503;A&3gdl-=$H%kFZKa4BZm;?{ZrN&)e~l`ub)i zmsd&4>LMu;DfwFR)g7}gJ-Oh_wb3{G*WTRBVMYx4e5l6f8*v$ab;EqVkk7skFeF&E zeY94xt=XxfmNpe#lU0#bHpFOF$?7pllF%^Q4%Zd4SyHf)@9my7=i>Y|sk5uk52jK# zW41lJUe2kCW|9IVr}RQjHtS?VNgGzO^W$x!jy8YNzF^W%OP7DSa|Gb<04w>}xaM7< zRCm*0q@k(#>r4H%J!LT|bU>weg4+f~cbZ88veNo_P9 z=|7FvHyr=g+;r=LWF4Mo6w(PQUt*|wao|;vNVMrWk}#BQieXwPIV2CjtEFyRvX2B8Dk>cNkx;#^ z891hg? zOsPs=N-`*FZFX8Y?rW*KX)hsr-yaF5EWh5e_UyVIR7?4JVz3@u@Q6H9P5E6PC6 zf~N-eVqsEMqn1_HLgX)9UF=e+sER(dVSbE~jMb_NjFG83lcYdWX{ND%gM;n1&I-N` zfAVfoJQ$Vkit`r3fxGvA6^;$9@R3u2A%Dg;Y9m{=1Q*u$EnN?ViZ0kT>F9_VkJWeV_YSA zg78jsz%Pfgx|#u+d$=3GiO>#nWXYDoG?oc_PVcXf0wV-DC(CbNEc83(5gOb&SooY* z35<%EdJB7>V&M|EmGGh)))S&n*pA@`f>Ak>al>yo;VKJY8|P(4&s6C2T|J8HfTM zH*vEQTT`ww(i3}uQm5Z6IMBl)L6q-t;F)rCr6>A2(}#zD-~h+jbGAX_%W3mGY5&qg z;8|y!tWp8QZ!iAUc(e}YZgS%y=i>&W36t}Ap!Rd0)fF^I9*oe7Q5Xj<(ho2kxJo}n SV1+8&!stQ%WIg)>aQ*{z^V%N( literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCSimple_queue/.jbuilder-keep b/2.1/containers.data/CCSimple_queue/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCSimple_queue/Infix/index.html b/2.1/containers.data/CCSimple_queue/Infix/index.html new file mode 100644 index 00000000..83ae918b --- /dev/null +++ b/2.1/containers.data/CCSimple_queue/Infix/index.html @@ -0,0 +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 map.

Alias to append.

val (<::) : 'a t ‑> 'a ‑> 'a t

Alias to append.

Alias to snoc.

\ No newline at end of file diff --git a/2.1/containers.data/CCSimple_queue/index.html b/2.1/containers.data/CCSimple_queue/index.html new file mode 100644 index 00000000..521b50ab --- /dev/null +++ b/2.1/containers.data/CCSimple_queue/index.html @@ -0,0 +1,4 @@ + +CCSimple_queue (containers.data.CCSimple_queue)

Module CCSimple_queue

Functional queues (fifo)

Simple implementation of functional queues

  • Since: 1.3
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
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 map.

Alias to append.

val (<::) : 'a t ‑> 'a ‑> 'a t

Alias to append.

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_seq : 'a t ‑> 'a sequence
val add_seq : 'a t ‑> 'a sequence ‑> 'a t
val of_seq : 'a sequence ‑> 'a t
val to_klist : 'a t ‑> 'a klist
val add_klist : 'a t ‑> 'a klist ‑> 'a t
val of_klist : 'a klist ‑> 'a t
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 diff --git a/2.1/containers.data/CCTrie.odoc b/2.1/containers.data/CCTrie.odoc new file mode 100644 index 0000000000000000000000000000000000000000..35c38959e1a026290ff156625398ec48fd52087d GIT binary patch literal 10017 zcmb7K2Yggj*3Z0m|E~=ox+n^w10*4kkc6Vrgo!j)1(9k6UuIsyNHP;=CLp?NL+oXu zf(oc35&=O4v7#a>eijtls%x)c!@j7CZO?6!Sib#zA3qcCefOOIDfirS&b^R|r(*pF zR1U1HK5x-2n~I8x%IOF6vp4;8URM=MC9{4a8Kg6naX;(dR62U})N~?Jq0# zrlx}+8jUh1pC2;XZ)`{;vq3uPH;hZA8~yBIekKviHYXb5Rq>$CZ*Is||GKXGLpwTkII}jopvMWHOg_FQ zn#*6gxs~-S%LJ!32gz8F%SWS|^Z8s)pRCB;8ND+~!xg#Q;^O9HA{(U<1FZ>XW{kLK6+o|tGL=d3TDn2HC{{8bz_FTffSnJgc*vYD({Nh8>3eo2md z^f2;hzbT3Oq@Qh02bs2oakNlf6B(UqY)WMk*&s3_m5xVAR?Z#Dhna|<4kC?yJcy*~ zBC*+i+KNJ^9uI&;u%Lz9+P7y=30b# zZqICv#W$01BH&)?T*3io<=7ncanZW9tZSbbDMM0oEPW^UPb)isbt1oUKY;&U+?#?R zn&-sjrPn1gtGGd_DD>_(^G0#_NsVN=IO{AJLkyJA1TN#xuY-LBVVKNG(%zi>6?tF}SHveqK8*LO;A(Tphy2bozC5rO zw{MU)FVWBtNe7f-l7g)lIr*yM>dFC!D9_!X{=Y?UBU>e-d{=366D4C2Z|;a`Vk{h` zqrEPb7V~;a=t-_)Wn?PtR$X&4#>0TyDVDr^3nj;7KpV;}Yqz6*Esxj=%1~rQ=@iQI zk-7O?v9zBb=zOk!dv|fK5JB~Dk8sG((k==pEx_&99$uc8IN_7b^t?nSASSPkNlGLk zCBm!u7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B`?cj; zwhP`a!s@HAcEkG?ZZX`R0^%3A2MCBBI@#KAd5`7pFOscG(F9i&L4@`|*nztz+)kVu zp})ZG05{BOJSl)briJ$cJvF!@91!XO=T|rs4{-jiX?i2PKUEz)Ekl^9@lI|aLKO&8 z-TqVxsD|?qoE@6*AcUz4pbGgOmFKr533U@M!zpB+Q3wyADb@QI^idCuM|eEhf4)Ca! z(*$QToQH*+O$D;~2+!wa4{14PB0LYygVLUJseyoVpEmgdgwLiaoV(@nC2;P5bGu&7 zAxv%3?WD#Um292WI@vBocsWmQ&MNx3S&VLyAj{!g3rDxSp_K@)REG?qwFtMuxtb7L z3L4*q@Le1zrwt +1-W (containers.data.CCTrie.Make.1-W)

Parameter CCTrie.Make.1-W

type t
type char_
val compare : char_ ‑> char_ ‑> int
val to_seq : t ‑> char_ sequence
val of_list : char_ list ‑> t
\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/Make/index.html b/2.1/containers.data/CCTrie/Make/index.html new file mode 100644 index 00000000..8aa89f72 --- /dev/null +++ b/2.1/containers.data/CCTrie/Make/index.html @@ -0,0 +1,11 @@ + +Make (containers.data.CCTrie.Make)

Module CCTrie.Make

Parameters

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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/MakeArray/argument-1-X/index.html b/2.1/containers.data/CCTrie/MakeArray/argument-1-X/index.html new file mode 100644 index 00000000..8aad7177 --- /dev/null +++ b/2.1/containers.data/CCTrie/MakeArray/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCTrie.MakeArray.1-X)

Parameter CCTrie.MakeArray.1-X

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/MakeArray/index.html b/2.1/containers.data/CCTrie/MakeArray/index.html new file mode 100644 index 00000000..c7bb46e7 --- /dev/null +++ b/2.1/containers.data/CCTrie/MakeArray/index.html @@ -0,0 +1,11 @@ + +MakeArray (containers.data.CCTrie.MakeArray)

Module CCTrie.MakeArray

Parameters

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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/MakeList/argument-1-X/index.html b/2.1/containers.data/CCTrie/MakeList/argument-1-X/index.html new file mode 100644 index 00000000..f29b9408 --- /dev/null +++ b/2.1/containers.data/CCTrie/MakeList/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCTrie.MakeList.1-X)

Parameter CCTrie.MakeList.1-X

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/MakeList/index.html b/2.1/containers.data/CCTrie/MakeList/index.html new file mode 100644 index 00000000..1a9d8aa4 --- /dev/null +++ b/2.1/containers.data/CCTrie/MakeList/index.html @@ -0,0 +1,11 @@ + +MakeList (containers.data.CCTrie.MakeList)

Module CCTrie.MakeList

Parameters

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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/String/index.html b/2.1/containers.data/CCTrie/String/index.html new file mode 100644 index 00000000..984ef4ed --- /dev/null +++ b/2.1/containers.data/CCTrie/String/index.html @@ -0,0 +1,11 @@ + +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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/index.html b/2.1/containers.data/CCTrie/index.html new file mode 100644 index 00000000..55fa3a34 --- /dev/null +++ b/2.1/containers.data/CCTrie/index.html @@ -0,0 +1,2 @@ + +CCTrie (containers.data.CCTrie)

Module CCTrie

Prefix Tree

type 'a sequence = ('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 : functor (W : WORD) -> S with type key = W.t and type char_ = W.char_
module type ORDERED : sig ... end
module MakeArray : functor (X : ORDERED) -> S with type key = X.t array and type char_ = X.t
module MakeList : functor (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 diff --git a/2.1/containers.data/CCTrie/module-type-ORDERED/index.html b/2.1/containers.data/CCTrie/module-type-ORDERED/index.html new file mode 100644 index 00000000..b2352f56 --- /dev/null +++ b/2.1/containers.data/CCTrie/module-type-ORDERED/index.html @@ -0,0 +1,2 @@ + +ORDERED (containers.data.CCTrie.ORDERED)

Module type CCTrie.ORDERED

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/module-type-S/index.html b/2.1/containers.data/CCTrie/module-type-S/index.html new file mode 100644 index 00000000..e9c3f55f --- /dev/null +++ b/2.1/containers.data/CCTrie/module-type-S/index.html @@ -0,0 +1,11 @@ + +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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/2.1/containers.data/CCTrie/module-type-WORD/index.html b/2.1/containers.data/CCTrie/module-type-WORD/index.html new file mode 100644 index 00000000..2f9b256f --- /dev/null +++ b/2.1/containers.data/CCTrie/module-type-WORD/index.html @@ -0,0 +1,2 @@ + +WORD (containers.data.CCTrie.WORD)

Module type CCTrie.WORD

type t
type char_
val compare : char_ ‑> char_ ‑> int
val to_seq : t ‑> char_ sequence
val of_list : char_ list ‑> t
\ No newline at end of file diff --git a/2.1/containers.data/CCWBTree.odoc b/2.1/containers.data/CCWBTree.odoc new file mode 100644 index 0000000000000000000000000000000000000000..c4a8dd3af2b757ef45ec9428fc3585ac8de57460 GIT binary patch literal 9127 zcmcgxX>?RowocVO-yJFrC@PB64VfVmqlh2{Xh0D}5s|hvR+5{fObxNB0zntfPi@im z1_Ts`z6?=p2M{0Hv~MAH+qUi8D$e3OG-5lV?fmwcDuvB@YxSSUA}jaYv%mfAv-dvx z>~oWDO}EqzuNzU=OFsoZ$o`cI+csXQ(h)p*BZ;kR#i=zGI#Q6 z8PAJ0Y+EvTJDc;v_NTu7`ht-=?>}5BD4kYRwAYbEMML%}Dk>?qi;BvMg8xVj3;RLv zz@%v4kDBYn+dFc#lVgcks>N${1#b`y*7C`0E|%-gj&r@9E-w>LdSquJ8V#0~HPj6s z8D;wgLB-_mwl**0H{5*Fn4_PYu%PiT=RNgVW8=rwK`?eoESZR>a$Y7COEji4$yjc3 zEE{jh`V9;3xn`dSX0Pu&?#Q=JJN>UKib;=&Nj6a?ib zq;exi_zkaZtqNcL!nPIjo=?8Gbz%GvIWuOI-|+dP;d|?DFI{`)me`cf54xi_2&!ks za`E{dvHJ}dlvt$?Ke>LV|MP)8cV9Sfc@PYp zaM$0X{)W-nOiMkFU%d`r9WCFfukT1Fz4~lCnNHO&NM|~;U9lFgAm;T=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wt)EN+ax`x9_R9&(K?d&Qahk$@c>ACVh&~e6OI`7O4E2H&JW>Z)kz{ pP`nrLnoPBiP)zsWSEQz$z>B~(E%-T#=^Mv3`eH+5f2R)^{|oW^?oa># literal 0 HcmV?d00001 diff --git a/2.1/containers.data/CCWBTree/.jbuilder-keep b/2.1/containers.data/CCWBTree/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.data/CCWBTree/Make/argument-1-X/index.html b/2.1/containers.data/CCWBTree/Make/argument-1-X/index.html new file mode 100644 index 00000000..e31dd146 --- /dev/null +++ b/2.1/containers.data/CCWBTree/Make/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCWBTree.Make.1-X)

Parameter CCWBTree.Make.1-X

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCWBTree/Make/index.html b/2.1/containers.data/CCWBTree/Make/index.html new file mode 100644 index 00000000..3514d879 --- /dev/null +++ b/2.1/containers.data/CCWBTree/Make/index.html @@ -0,0 +1,12 @@ + +Make (containers.data.CCWBTree.Make)

Module CCWBTree.Make

Parameters

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. Will use WORD.of_list to rebuild keys.

  • 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 : 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 : key printer ‑> 'a printer ‑> 'a t printer

Renamed from val print.

  • Since: 2.0
\ No newline at end of file diff --git a/2.1/containers.data/CCWBTree/MakeFull/argument-1-X/index.html b/2.1/containers.data/CCWBTree/MakeFull/argument-1-X/index.html new file mode 100644 index 00000000..708c2c23 --- /dev/null +++ b/2.1/containers.data/CCWBTree/MakeFull/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCWBTree.MakeFull.1-X)

Parameter CCWBTree.MakeFull.1-X

include ORD
type t
val compare : t ‑> t ‑> int
val weight : t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCWBTree/MakeFull/index.html b/2.1/containers.data/CCWBTree/MakeFull/index.html new file mode 100644 index 00000000..d6bc915f --- /dev/null +++ b/2.1/containers.data/CCWBTree/MakeFull/index.html @@ -0,0 +1,12 @@ + +MakeFull (containers.data.CCWBTree.MakeFull)

Module CCWBTree.MakeFull

Use the custom X.weight function

Parameters

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. Will use WORD.of_list to rebuild keys.

  • 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 : 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 : key printer ‑> 'a printer ‑> 'a t printer

Renamed from val print.

  • Since: 2.0
\ No newline at end of file diff --git a/2.1/containers.data/CCWBTree/index.html b/2.1/containers.data/CCWBTree/index.html new file mode 100644 index 00000000..361872d4 --- /dev/null +++ b/2.1/containers.data/CCWBTree/index.html @@ -0,0 +1,2 @@ + +CCWBTree (containers.data.CCWBTree)

Module CCWBTree

Weight-Balanced Tree

status: experimental

  • Since: 0.13
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type ORD : sig ... end
module type KEY : sig ... end

Signature

module type S : sig ... end

Functor

module Make : functor (X : ORD) -> S with type key = X.t
module MakeFull : functor (X : KEY) -> S with type key = X.t

Use the custom X.weight function

\ No newline at end of file diff --git a/2.1/containers.data/CCWBTree/module-type-KEY/index.html b/2.1/containers.data/CCWBTree/module-type-KEY/index.html new file mode 100644 index 00000000..3e1a6e17 --- /dev/null +++ b/2.1/containers.data/CCWBTree/module-type-KEY/index.html @@ -0,0 +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 diff --git a/2.1/containers.data/CCWBTree/module-type-ORD/index.html b/2.1/containers.data/CCWBTree/module-type-ORD/index.html new file mode 100644 index 00000000..0d379fa4 --- /dev/null +++ b/2.1/containers.data/CCWBTree/module-type-ORD/index.html @@ -0,0 +1,2 @@ + +ORD (containers.data.CCWBTree.ORD)

Module type CCWBTree.ORD

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers.data/CCWBTree/module-type-S/index.html b/2.1/containers.data/CCWBTree/module-type-S/index.html new file mode 100644 index 00000000..4ab23089 --- /dev/null +++ b/2.1/containers.data/CCWBTree/module-type-S/index.html @@ -0,0 +1,12 @@ + +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. Will use WORD.of_list to rebuild keys.

  • 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 : 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 : key printer ‑> 'a printer ‑> 'a t printer

Renamed from val print.

  • Since: 2.0
\ No newline at end of file diff --git a/2.1/containers.data/CCZipper.odoc b/2.1/containers.data/CCZipper.odoc new file mode 100644 index 0000000000000000000000000000000000000000..43807399aaa540473a6da72b40ae4b5195c9b886 GIT binary patch literal 2884 zcmbVOONd)l7*0Z>%?LggmV&P{Z6-}JnPmEyI<&UEb!y8%r>Gs3)?zr5dopvJn|s2! zH%U_zMReE2oepgUL5`(kT}T~7sVnV9TolEXAP7pa;6ms^v|GBT&nGTMNz|B49 z{NMNekMCSziu%a5%J$0W+vh&~GLcA(z%K*8jqrPDxmp*tOS#RYQ!%MaKPXI0oZzh% zlg8+>J^k15Kc@Gkzmw+e8?~$-VBlsVk$OFmxcBEo;-1?Z5{XCFvMZ#zWTa9~gx#x=kgq=sR5i|Uf+ozGz~{R;o4v%#vN&MkkOo*rV&mfJ&K zBhTOyIjxIYF$~zelzt_>+dqn%S%EvXX#cMM{rk!D%xz2CK~b)3Gv)0iywT7E-LBAz z96}`{IsnA~6cN&!ltwzAn-RkDIlZyf6*VM{tg>4sgxz7%)scL1WQNw~i7N=zVJib_ zVI(+03RYPbm6szNsjQyB!3cd^i$fkS#WF7rLoiHw$YJlA6x5{y$}7Nr7!76`%6l?k zHE9z8#gqh^#&pU+=fAR)!~!}I%X-A}t(fJvxh9=wIz_uDB%>~abOiZn3783P&l2jV zt-&Sq6SG(oI*bUvDyS}kSd1Xvj3Iu_S*+n#;qYOB3D>;|@5)3-VhUn|K*ZsG$N(Nv zPc5Ki_K*O^XbQk@2`9o^i104Ncz+jgZ;hR@QP%dAkcPTEI%#*P#myR(vu%_EEmB-J z{FMm)vj{$u+%zQl?3^!nGDg=g*P~b;SRwiA2=jU$X0@nyhoX0^0(%$LrL|PAPT@vG z;kP~tNAgW!@`g5n?9`Ng)|IZerNo8_8mEk9rgjhPrw4|Gwgl2bU4c|uJSU1jhT2qNUw zHZ=7NYX~qk4kJOqp#8I<8^b<-iouWr`g>yfU>o4mXv3N0QeLvA=-@mrfS2GSLS}~` z(fG%|7DD!S6eOIgO!9>|`pbRMzbb)o2eNd6#wPuM!N3Mfc!xM}*M-^GPp0Q!fH`o?A|D)c867w$NP` zg5N0$;_VFAfG62Ybo83?hVW*A>TJ_j37Q@(HmK!5qeZTnNxmBD6s?-yDq4T(AiN-W zW%R;iWAf2nH=_q`CWSh+;LB##PkJUfp)VHLVEeU*&9@kr|NBsJCiz33 +CCZipper (containers.data.CCZipper)

Module CCZipper

List Zipper

  • Since: 1.0
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 diff --git a/2.1/containers.data/index-generated.mld b/2.1/containers.data/index-generated.mld new file mode 100644 index 00000000..75a16ac6 --- /dev/null +++ b/2.1/containers.data/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.data} +This library exposes the following toplevel modules: {!modules:CCBV CCBijection CCBitField CCCache CCDeque CCFQueue CCFun_vec CCGraph CCHashSet CCHashTrie CCHet CCImmutArray CCIntMap CCMixmap CCMixset CCMixtbl CCMultiMap CCMultiSet CCPersistentArray CCPersistentHashtbl CCRAL CCRingBuffer CCSimple_queue CCTrie CCWBTree CCZipper}. \ No newline at end of file diff --git a/2.1/containers.data/index.html b/2.1/containers.data/index.html new file mode 100644 index 00000000..60be1167 --- /dev/null +++ b/2.1/containers.data/index.html @@ -0,0 +1,3 @@ + +index (containers.data.index)

Library containers.data

+This library exposes the following toplevel modules:

CCBV
CCBijection
CCBitField
CCCache
CCDeque
CCFQueue
CCFun_vec
CCGraph
CCHashSet
CCHashTrie
CCHet
CCImmutArray
CCIntMap
CCMixmap
CCMixset
CCMixtbl
CCMultiMap
CCMultiSet
CCPersistentArray
CCPersistentHashtbl
CCRAL
CCRingBuffer
CCSimple_queue
CCTrie
CCWBTree
CCZipper

.

\ No newline at end of file diff --git a/2.1/containers.data/page-index.odoc b/2.1/containers.data/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e4a4b413aff3bc64dcb81c29de39d9bda83e3a44 GIT binary patch literal 635 zcma)(J5Iwu5QZHD1yIm%03-1V50iidQbdtt5f3SmAc=@X6D{@xFIs!edL5FAhK4Q; z4We)wXwxAY4!|im2BKo(*bz`sjO1@-{`tqV!V>0s*4Q*MxA#wPnx>^OCNO3(X8IeZ za1~`PNZ+uiqTL1NTF}lsrnWwJ>#x&arMq1I=I1Hgc~JR1_`y#fLjqS5kjbGLjrqn6%1jSko}VYVoD}MXGegwL+aaAP!XcV0Be#B2Q47Sr8Pp194Al(DQPEaMwcU3m8q9dnYEo?w?(E%! z*_qYMtnN-u07F8l2r+Xg5>Z5jML}4^IF?0-9G62Wg$-p=CV^laxk8!X!l{JBkz+fR zRHa<`-s_$p{aA^utE=mo?)TpJe)_%FJ#uSqb@f+i#hA{B|LeZ?^Q?0QX|SxWdO>K zjLf+WbHukAt}`<4dUyLxqiUv%J2E}fvh3PO&8!wjeBu(xDN%lYK!b?vso{yo4o4v)`&5 zYFFA{?B8YCh@~&)5leoheUNl)WB$1K8?jO;Oq>p#d{(^K?^w|IX(GRZ=lJzI1+&o% z7DI80Caz8hjUo+e>|T?xVkO)>=KV8m6xYbEc#Ff!p-U`ea>Aj_a1MyA3M{ z%-V2{mq_Y0G$9$9H67MA_nBT9mMM&uuPt9&ITeCA;eS4Hz`hjDj~A+oRU5(A4zt@Q zXb1qF+nSvtAUXxU5xAaiIduzRXxfWqeNTGApL1Jw%^3*v8B=G=rlqs*9%6X}B1}m( zi!G<_+BLG!upH`j-KbXE;ecK>Y?};JP;ZL5;nddW+J}I%-y*B5VmZ>Q9JzGV5+GUBw(-;q)EZ#>Toc5|$1onOn(nFiS+ z9NU3`?$+7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nUo3{7%_ zeKM1*>=FbUo@XplE?kp7BA^H3iFEOVR)-7xHsYpb<=IHGJ5U0$m|b?2)D<5W7!irV z=PhpRsMoe|MpGFvD*xG+BgSG?O54I-KtussMN+e>VwGb6|j$c`0V#$vC`&JoxdtVEMgsASyFNM-_gS3TJBXX_eUv^ z-=x*_iB`)Um#cG>1PyEgd_l;)qvhzv)KD(}=OQdmtK01*asr0>ERF>0_#OubL3ulX z*QyVu9+#RpOmIW>Q+haMNzNWDTFZ?|u}NK8HMu(qy=BW+$=)VAeKUR0jhlXXhfAIK zEbh|qanht)NBSyQQlGc=Rl}&87?kz^Dwo6}2^_pp0_<%|O@c`%8 iaH$_`D2R$^|1d9u^SHJwujLL!wo;#0a(D3y0R3Mg;-4-6 literal 0 HcmV?d00001 diff --git a/2.1/containers.iter/CCKList/.jbuilder-keep b/2.1/containers.iter/CCKList/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.iter/CCKList/Infix/index.html b/2.1/containers.iter/CCKList/Infix/index.html new file mode 100644 index 00000000..45dfb5e1 --- /dev/null +++ b/2.1/containers.iter/CCKList/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.iter.CCKList.Infix)

Module CCKList.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 diff --git a/2.1/containers.iter/CCKList/Traverse/argument-1-M/index.html b/2.1/containers.iter/CCKList/Traverse/argument-1-M/index.html new file mode 100644 index 00000000..791fe65e --- /dev/null +++ b/2.1/containers.iter/CCKList/Traverse/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (containers.iter.CCKList.Traverse.1-M)

Parameter CCKList.Traverse.1-M

type 'a t
val return : 'a ‑> 'a t
val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t
\ No newline at end of file diff --git a/2.1/containers.iter/CCKList/Traverse/index.html b/2.1/containers.iter/CCKList/Traverse/index.html new file mode 100644 index 00000000..e466f737 --- /dev/null +++ b/2.1/containers.iter/CCKList/Traverse/index.html @@ -0,0 +1,2 @@ + +Traverse (containers.iter.CCKList.Traverse)

Module CCKList.Traverse

Parameters

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 diff --git a/2.1/containers.iter/CCKList/index.html b/2.1/containers.iter/CCKList/index.html new file mode 100644 index 00000000..fde7e0a6 --- /dev/null +++ b/2.1/containers.iter/CCKList/index.html @@ -0,0 +1,16 @@ + +CCKList (containers.iter.CCKList)

Module CCKList

Continuation List

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit

Basics

type +'a t = unit ‑> [ `Nil | `Cons of 'a * 'a t ]
val nil : 'a t
val empty : 'a t
val cons : 'a ‑> 'a t ‑> 'a t
val singleton : 'a ‑> 'a t
val repeat : ?⁠n:int ‑> 'a ‑> 'a t

repeat ~n x repeats xn times then stops. If n is omitted, +then x is repeated forever.

  • Since: 0.3.3
val cycle : 'a t ‑> 'a t

Cycle through the iterator infinitely. The iterator shouldn't be empty.

  • Since: 0.3.3
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.
  • Since: 0.13
val is_empty : 'a t ‑> bool
val head : 'a t ‑> 'a option

Head of the list.

  • Since: 0.13
val head_exn : 'a t ‑> 'a

Unsafe version of head.

  • Raises Not_found: if the list is empty.
  • Since: 0.13
val tail : 'a t ‑> 'a t option

Tail of the list.

  • Since: 0.13
val tail_exn : 'a t ‑> 'a t

Unsafe version of tail.

  • Raises Not_found: if the list is empty.
  • Since: 0.13
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 iter : ('a ‑> unit) ‑> 'a t ‑> unit
val iteri : (int ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Iterate with index (starts at 0).

  • Since: 0.13
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).

  • Since: 0.13
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.

  • Since: 0.3.3
val product : 'a t ‑> 'b t ‑> ('a * 'b) t

Specialization of product_with producing tuples.

  • Since: 0.3.3
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].

  • Since: 0.3.3
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.

  • Since: 0.3.3
val flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b t
val filter_map : ('a ‑> 'b option) ‑> 'a t ‑> 'b t
val flatten : 'a t t ‑> 'a t
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.

  • Since: 0.17

Operations on two Collections

val fold2 : ('acc ‑> 'a ‑> 'b ‑> 'acc) ‑> 'acc ‑> 'a t ‑> 'b t ‑> 'acc

Fold on two collections at once. Stop at soon as one of them ends.

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 zip : 'a t ‑> 'b t ‑> ('a * 'b) t

Combine elements pairwise. Stop as soon as one of the lists stops.

  • Since: 0.13
val unzip : ('a * 'b) t ‑> 'a t * 'b t

Split each tuple in the list.

  • Since: 0.13

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.

  • Since: 0.3.3
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.

  • Since: 0.3.3
val memoize : 'a t ‑> 'a t

Avoid recomputations by caching intermediate results.

  • Since: 0.14

Fair Combinations

val interleave : 'a t ‑> 'a t ‑> 'a t

Fair interleaving of both streams.

  • Since: 0.13
val fair_flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b t

Fair version of flat_map.

  • Since: 0.13
val fair_app : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

Fair version of (<*>).

  • Since: 0.13

Implementations

  • Since: 0.3.3
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.

  • Since: 0.13
val (<.>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

Infix version of fair_app.

  • Since: 0.13

Infix operators

  • Since: 0.17
module Infix : sig ... end
module type MONAD : sig ... end

Monadic Operations

module Traverse : functor (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.

  • Since: 0.13
val to_array : 'a t ‑> 'a array

Convert into array. Iterate twice.

  • Since: 0.13
val to_rev_list : 'a t ‑> 'a list

Convert to a list, in reverse order. More efficient than to_list.

val to_seq : 'a t ‑> 'a sequence
val to_gen : 'a t ‑> 'a gen
val of_gen : 'a gen ‑> 'a t

of_gen g consumes the generator and caches intermediate results.

  • Since: 0.13

IO

val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print the list with the given separator (default ","). +Do not print opening/closing delimiters.

\ No newline at end of file diff --git a/2.1/containers.iter/CCKList/module-type-MONAD/index.html b/2.1/containers.iter/CCKList/module-type-MONAD/index.html new file mode 100644 index 00000000..700bb5df --- /dev/null +++ b/2.1/containers.iter/CCKList/module-type-MONAD/index.html @@ -0,0 +1,2 @@ + +MONAD (containers.iter.CCKList.MONAD)

Module type CCKList.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 diff --git a/2.1/containers.iter/CCKTree.odoc b/2.1/containers.iter/CCKTree.odoc new file mode 100644 index 0000000000000000000000000000000000000000..ab1295fecd0505c11356d044cbfad058c319ca43 GIT binary patch literal 4648 zcmb7HeQXPw76J3Xx&=3p(5@Kkp#41%tO#Ghb zJ%6+kOiPs9`F)@7kKgmyExV=R(fnAx@c4;yKTjkQL-^D2cRT(zo*yZ>PGDM&^!&UP zNbmIEVs^z}h|_KADGby~NkpL>79y5hg>wM0U@oJidILL#xj{A41LPDCF^ zik1qa=;hr;6mFX_kFE&PCFTOJQ3@KK#BsOVGhelQ;Wy7j$#g_fiiR)CB5;K#>z?$b z6Nmu3zA&A#C|jN^1+v_;=$ZAZFS4dDET>{Q@JW&7@L8C`CY=@2uUf8?7cV9THa10}ITS4W=!EmAcFuhW42#8rajQRHPRco;@|b^UAK}>0dqi`qk;_ zcXLs+W74eImV-b#rakR?H8a>_`c}yg3o9>v|JIl1)|aO4d1wBiSD(HGauh*WxO3Co z57N^o9=JNV?}54BzIic#fD{HSG!Q?pRV&`|4obKESJYh={NYs+~S0z*X zY%K5>{WY@=%f1_14!@Mu*PB*rAF{K`)3-C(`;P6(fgxftJ$Vb$wYk~PO&u&BpHnFw^fh?*V=j6?V4E%c< zMXO+`cgA&>1gwMs%??NPqwLXlKDBAIIxvSq7YmSbQzl+x^&Oa!I>V||Zc^iXO}R;} z^La-HjLgE>U}c!cCrZemV(uQ_d&H!Oh%Cb$O#;)l(POaBG0}r!+A6w^St?ng(r`*N z+jIB!M8|s)iR2rCe-KYmTUw}CMd65DJ?c;ZX97gEgmx_s3R`%>>bMkyveqt#`rg5v zw0+DcqVz=8-s@5Dq;e9@tUbR&d8sfsrmMJ?WAq9BfeZ}>jZ zT%%e8R%9QUL>D-1O~=GSCne3eF;LCg4Q!%KH*>I${LMPUqaE*Kx!jGm)$0o+KvZf0 ztZN3a!!o6v6i)N%lCN-nD$LQBDfbDdlbWq?{x5mkfLLNIurFg8`96_thM-;-v30R8 zJ79aI#*D-2w}Gt8Ort8WcM*H!P3P=I)~&)Ye{fkD$?brFSq`TY#SL*-Oh1 zZy=!bBu`tc8X%J83E^Y;C5bd?7abR8)O7uY{7%(#YkJoXJ@unzWow_HokUOBe9*bs zbq}cuhrt++ERxGhOx-^(vWtZOhpnSIDs7Yrp?Y}rjNUcZKjj9Y-gU?7DsQXZIWq`6 ztJny59Phv_W>S0-HwIFQ0dfg&t^jb-wOs%p3_Cdh?4a%f5@zPAW*xwQW38JG2EM|h znosoP6-5)Q*fGr}KA54^PBGn02Yvg?>QjcV??=Nx)srk0ks{$^1U0y&oqjgMo-)u+ z?G|NN&j%D=tbt}t4v9L|a(nlq&iBA)XWPN(-FQisa{aHQUrN^4) zXf!J6hcHj`GH4b{Vcx)lTr_4JdrS+Oa0t_o;BP7fh5M%n>x}2muIgQDgyKljc1m)D zqxf4|F9r)~?pjrj_aXyo<cPPTRaG+i^7B+Pjo z!#GW`rEILJy4Ab(DqAPj;~+gWo(deUH?_x9px)|O_w}y#Iz|1uDe4g=hT?VXs4Pf(vzQRws~fjdWO2z<#yp3z{JA# zX%gfQ2^o~AFEfSwcz#p~-^St&sC?^5p+?I>;9?ZmJdAg6D>hGn;I^bFiNz?)sy5}( zjE@sov!NRm0vfSgbukWzl)k!0tH4^tiF)X;LQTD7pNf*^uvyvxwRI%-4R%;E9>2G3 z;Ht+2EMRCXq5jRdPh2dc@&3#tL&B{~U>toVVB>Bur#sDi1pCP}&2A%aXs0C>n0$`Q zBMQgZ|5!dZW~V>lYO{*;9Ver#C~_K4%#J1w$m< AeE +Dot (containers.iter.CCKTree.Dot)

Module CCKTree.Dot

type attribute = [
| `Color of string
| `Shape of string
| `Weight of int
| `Style of string
| `Label of string
| `Id of string
| `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, Buffer.t, unit, attribute) Pervasives.format4 ‑> 'a

Using a formatter string, build an ID.

val mk_label : ('a, Buffer.t, unit, attribute) Pervasives.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 diff --git a/2.1/containers.iter/CCKTree/class-type-pset/index.html b/2.1/containers.iter/CCKTree/class-type-pset/index.html new file mode 100644 index 00000000..63f80230 --- /dev/null +++ b/2.1/containers.iter/CCKTree/class-type-pset/index.html @@ -0,0 +1,2 @@ + +pset (containers.iter.CCKTree.pset)

Class type CCKTree.pset

Abstract Set structure

method add : 'a ‑> 'a pset
method mem : 'a ‑> bool
\ No newline at end of file diff --git a/2.1/containers.iter/CCKTree/index.html b/2.1/containers.iter/CCKTree/index.html new file mode 100644 index 00000000..ce81dc33 --- /dev/null +++ b/2.1/containers.iter/CCKTree/index.html @@ -0,0 +1,22 @@ + +CCKTree (containers.iter.CCKTree)

Module CCKTree

Lazy Tree Structure

+This structure can be used to represent trees and directed +graphs (as infinite trees) in a lazy fashion. Like CCKList, it +is a structural type.

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a printer = 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 ] klist

Depth-first traversal of the tree.

val bfs : pset:'a pset ‑> 'a t ‑> 'a klist

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;;
+
+      let rec fib n = match n with
+        | 0 | 1 -> CCKTree.singleton (`Cst n)
+        | _ -> CCKTree.node2 (`Plus (mk_fib n)) (fib (n-1)) (fib (n-2));;
+
+      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 diff --git a/2.1/containers.iter/CCLazy_list.odoc b/2.1/containers.iter/CCLazy_list.odoc new file mode 100644 index 0000000000000000000000000000000000000000..98259e2c87b502f0046252766ccb78977bb08d1b GIT binary patch literal 2010 zcmb7EO>7%Q6t=Bd+CV83B%~6dPVmNYh+{h`Bt~kI4Q?udLO~EpC5o)EJ&sq|-7&lC zv?)Cx#NVM3la!<+J#-0_Ab}uig(_5mqE-SfoO%ExkhpL|0uEg0h4*IHKY|kn%Wr1C z_r33ZZ)QYQRE9^gquKmxs~>(9i^cNr)8Ka>{Pu02TM}nm%{m8!8rO+3BT{ zWqQ7mzw5TArr!Vh(a-Np)vv6+a(yJ^*mWuvOI(Y^cCEti;OEY>rEb9z2IGH#GNf}l`jwq-gX%3;}Lyy5BxHB z?3?ode&}iLF2dJE4xcZO-+ns(>)n|L9!{_Pe)`8vLv9y5x01sKb6x#qfxjo0s|%aw zJku6V?xb)RyaucAE?;t`a?`Y`xhk)*rse1NkNvqaeq$>WPn`YXyPHqUOdB#-*||jY zK3@igu@eNck4eKYsq>NUC-Dvu}N*9^cw4Y1(D(Qc1DkD3k*mirJ| z$WYGaxoa)aG#m}iTZ+JT1qsqpWqzs;JC@U`Ua-~M|dk~vj)};FApq`L(0CIk}Uhm zq3SCwLh=PfWtFVOds8*j0)LPodqjod)V*wU0}EYbSbPIc1O9*C=KEPiC`OA<={{TF z$Tl_y0cAe51@!0qmsPQ>Mr?nz*=}{Qy_jN+26vRL2i4mE)2P58VVGb^%PcLvMP}~GUIz<0%9dxP1^T1FJMQZW!4)cWC51YO? z5IqRkcfME`W`$GH;4brpi#{etvmL;hMHg2G>&1;3EmscMO1aS_@OJMZAjVx>~64TNUDirp5mb)_1f7=ueR4cYtYA zOXP_iOa~j1G?bl*0_Wdj;ENWT vg+3?n>@d_pdb^PC4n@e4%NK#$kI=<7I@^W*I0fiX@|zLxSR449iVWi)z8wc# literal 0 HcmV?d00001 diff --git a/2.1/containers.iter/CCLazy_list/.jbuilder-keep b/2.1/containers.iter/CCLazy_list/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.iter/CCLazy_list/Infix/index.html b/2.1/containers.iter/CCLazy_list/Infix/index.html new file mode 100644 index 00000000..5e7f4174 --- /dev/null +++ b/2.1/containers.iter/CCLazy_list/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.iter.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 diff --git a/2.1/containers.iter/CCLazy_list/index.html b/2.1/containers.iter/CCLazy_list/index.html new file mode 100644 index 00000000..019539e5 --- /dev/null +++ b/2.1/containers.iter/CCLazy_list/index.html @@ -0,0 +1,3 @@ + +CCLazy_list (containers.iter.CCLazy_list)

Module CCLazy_list

Lazy List

  • Since: 0.17
type +'a t = 'a node lazy_t
type +'a node =
| Nil
| 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 diff --git a/2.1/containers.iter/index-generated.mld b/2.1/containers.iter/index-generated.mld new file mode 100644 index 00000000..c0b636e2 --- /dev/null +++ b/2.1/containers.iter/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.iter} +This library exposes the following toplevel modules: {!modules:CCKList CCKTree CCLazy_list}. \ No newline at end of file diff --git a/2.1/containers.iter/index.html b/2.1/containers.iter/index.html new file mode 100644 index 00000000..408b61d4 --- /dev/null +++ b/2.1/containers.iter/index.html @@ -0,0 +1,3 @@ + +index (containers.iter.index)

Library containers.iter

+This library exposes the following toplevel modules:

CCKList
CCKTree
CCLazy_list

.

\ No newline at end of file diff --git a/2.1/containers.iter/page-index.odoc b/2.1/containers.iter/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9e8e2cae712e7cd8e6dce6b0bd6927c1c486f391 GIT binary patch literal 282 zcmc~#$xqfb)HBjEXqmcf9|Hq}CJ?g%u?P_JZ_rQ9&nrpH%u6jQ*2^qOEt;U3nU|7U zVQ_VN+9m&<3C*b{wXOXJSSLd@?+0p92I49p&e*V!XzeUa6BaDk?&z>!g1Jv-Qc+@2 zr2?A8Kq*c$u8@q(Vuc*2iqwjN{NmJNg_4X^g|z&foc!|4ymW<<{DPd+veX=f-29Z% zoYZ0~g$1*KhA&iicJ}tkEG_|B0^x)drKW;8+Rn~CiB*;HIbd0!MT&Y34lJ?&A)l3*wpMv5%Q*;#kmnK|oRymTSx z@@6n(tB??5RM5rRdPoS0paU@#fptv>5o#ae?z32Xwsn5{?UV-iAwpO|IuH#U#%yZRk(KB%0tI!-6S= zPdSEctH`i;Xe4=*RZM6j)8bPm()m8c9EX-Vu2_;JffCPaibGvf4O=k{sC6Mzhju## zvgJmn9!+mu>VKT+*tc?GV0mtf=hYNmccb&*+o!qD+iLe76t4X^^Wm1{=1VIqQx?}G zBd!Z3f_Ewv#Wd0t(NZxJCy<%3vQSpULb76F#8I`Rm{d~G(d=lxyyxDP-y<^%_ZMF* z@;_H%lIz`YT~G36LinI0FPDD^szX9cHGU>Nm2SK4YzTi5{RuXc2jLNfG)mjTLUU`i z3w99-b~0D)JFuOazL3z2Nfjmg8L1&8ObHALew8Ll8W}lCNCPD%-U)XFx~VzFOb;<# z)LaS+t-cwg<`gr-#GIt&dX4K}2Of%vVG9!^#y`^@1sg86TDRpw~?Lj8rr6Fkh7l%atE-bV}{LINY)YDqCl_?*w z!X$g}fch_$IQOC#z;0&ukS1PH`v)giOluj968fIdV4w^qSZrg=b`txQ*(%&aanoRc z;X#7`GTdB=kEXbChGFF6U|`3(*w`p`Kx0%fkz?__tMkWV3kHU8Zse|dIXt|LeVPI- zg?I3Z$2-Rys712rDLjEt<8kJNiHrEJ@v33j3QR^MDTkAP(iX>qt|k>T;aI9MnqVao ot0iLeuz~?CEL6~4{i&%Zd$+9Fd&od`Q3J#OcYsT5paV(z2Of$O=l}o! literal 0 HcmV?d00001 diff --git a/2.1/containers.monomorphic/CCMonomorphic/.jbuilder-keep b/2.1/containers.monomorphic/CCMonomorphic/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.monomorphic/CCMonomorphic/index.html b/2.1/containers.monomorphic/CCMonomorphic/index.html new file mode 100644 index 00000000..619da61c --- /dev/null +++ b/2.1/containers.monomorphic/CCMonomorphic/index.html @@ -0,0 +1,2 @@ + +CCMonomorphic (containers.monomorphic.CCMonomorphic)

Module CCMonomorphic

Shadow unsafe functions and operators from Pervasives

  • 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 Pervasives.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • Since: 2.1
  • Deprecated Please use [not CCEqual.physical] or Pervasives.(!=) instead.
\ No newline at end of file diff --git a/2.1/containers.monomorphic/index-generated.mld b/2.1/containers.monomorphic/index-generated.mld new file mode 100644 index 00000000..eb74308f --- /dev/null +++ b/2.1/containers.monomorphic/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.monomorphic} +This library exposes the following toplevel modules: {!modules:CCMonomorphic}. \ No newline at end of file diff --git a/2.1/containers.monomorphic/index.html b/2.1/containers.monomorphic/index.html new file mode 100644 index 00000000..480fc0cd --- /dev/null +++ b/2.1/containers.monomorphic/index.html @@ -0,0 +1,3 @@ + +index (containers.monomorphic.index)

Library containers.monomorphic

+This library exposes the following toplevel modules:

CCMonomorphic

.

\ No newline at end of file diff --git a/2.1/containers.monomorphic/page-index.odoc b/2.1/containers.monomorphic/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..abc761f61974a63d1aaa8d6e161fc39fb5ea6f2b GIT binary patch literal 279 zcmc~#$xqfb)HBjEXqmcf9|Hq}0T8nSu^12wY%ojC&nrpH%u6jQ*2~S$%g@a(D#*x8 zo}ikUmy%jx@L~O^~VZnm!jt&bZ z*!g586(tr`Dqwd8Pz9$MS4c)?u|f`1VQNJ|esOBCLPPHM50!h%^qI~M9XJNqJh<>&x3P*KmpfkhMm{FP`Z literal 0 HcmV?d00001 diff --git a/2.1/containers.sexp/CCSexp.odoc b/2.1/containers.sexp/CCSexp.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8b8e09ede9a315c186ccf3ca0cbbaf498a902628 GIT binary patch literal 3528 zcmb7Ge~cVe9p9auG299iqdl?K_O-XSyZ3AN?mz|4@TETkH`_H3RL*uLA8Q1Wb%vAPp#*MjmPq%$LAg&Z~pr?2lpxVtM;c-nIEK5*>~Y-zao{&rQ-J?#5AHf zerBs3M>pI;eaCbCDKg#%`UDFCm-~Tj+vXKkxmdtyK0XxuOeuYKmx>epKd&veClPAn) zJHajLMdsa0()M<62m$Nx|3Yq(b58+ZE>w7}P6hbiRFEzW?UT?Bs5gcDZEl(d(~)^x z!G@%~HHvmIN5Ohaj!hAJ}8Df*o;`aEY#*j*Y{=mD5uGYSeO z5A0?$Fa#J0rx`*173;nu`M;(3Bh5cl1pcbWX^8&*U*?5QiIJ+0Y1UiOLae9AO0PxJ zPH4gxkx-|u0K$eP`#!1nSyc@`R_dSA(EVKig(9wd48Q{k_+`X}|epk9AdjDOdR-|q&-87f=~S&8H3^{b!6r!_{XmD1WK0+hg1=_D*LO6>>f<6l`d(SuVZEuixgVeo!ARLYf+Q)#0B#)c3N(* zDtI`SiMP^6WiqVv2(+_QvD0puBgHWoVWFC0*z8vN-F(PlT2{fB(@^=xnpXN>o5IA* zNhRYkWv20=E&!`G1pKdMr&wvOKtI=@4Fv#IU0Gv))R41@z=I0=lE#*MG)1}sO*IMfTnJz!9ma&g1N z>fK7@k-%ic&CLZ0XQTptLrfaNhqJ=%Sn*^oj)utWG~~|>6%WjH=w@iU-YoPkwB87H zJ;GoD6cvyv9FhB&%z`^O4H_6^=JXOSvT?KHX5WdU8;M($72^8!MyQ~*dN>aOUfHX# z)uMR$VY91K8U)!s7^%IAr-M1v4u{`}WSJOW!R-fxA=Cip_eFRRU3$neUM*~gUUuMK zWf@1BO}RbWU;#rs5(?-AxZa;1!Cv;*oNOxN30-4n^6Cf!zi4hW+hwB7j-1ctq^!0Y z#$Rm`JbTX#54=x8j75ewmiNZM4g5lw^*EFS^Lb-x8ad=4guO0!9V)f;%9u2bxkegf zWlU3GBo?hqn`L}idSmOgmAP6Mg6@29ysT`!d?#DR&$PJpmhlG4vkX|Fvhy;zZdFdQ z`9Mb7gNcw0Jb*kDQ(a@D8vQ1VQbx4g1MjRSaC;{qceO7^6FctH?B;ds15C>c* zK!m*lbu!Nz#AkA3!hOAO3f77bUwDHT+#^L+nkr>sm#xiX@Yvj_{9Z`>9xko=J%P7B^nEb#UHb=vLJl;bGXb|B*3eQ@R+f%-(W~c6r0GG99WWGxlYI%u&VtQ}udrMM$7i zC#O1^U%0gnt&QQpBe=0SDt>xFt0cNBw;?N2w$VDK1fNSn^L1?;3R$^Ry?^1`rEqy; Nvy69?j<;nA{}-EiVh#WR literal 0 HcmV?d00001 diff --git a/2.1/containers.sexp/CCSexp/.jbuilder-keep b/2.1/containers.sexp/CCSexp/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.sexp/CCSexp/Decoder/index.html b/2.1/containers.sexp/CCSexp/Decoder/index.html new file mode 100644 index 00000000..6a8a2937 --- /dev/null +++ b/2.1/containers.sexp/CCSexp/Decoder/index.html @@ -0,0 +1,3 @@ + +Decoder (containers.sexp.CCSexp.Decoder)

Module CCSexp.Decoder

type t

Decoder

val of_lexbuf : 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.

\ No newline at end of file diff --git a/2.1/containers.sexp/CCSexp/index.html b/2.1/containers.sexp/CCSexp/index.html new file mode 100644 index 00000000..46e2b5fa --- /dev/null +++ b/2.1/containers.sexp/CCSexp/index.html @@ -0,0 +1,8 @@ + +CCSexp (containers.sexp.CCSexp)

Module CCSexp

Handling S-expressions

type 'a or_error = ('a, string) Result.result
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option

Basics

type t = [
| `Atom of string
| `List of t list
]
type sexp = t
val equal : t ‑> t ‑> bool
val compare : t ‑> t ‑> int
val hash : t ‑> int
val atom : string ‑> t

Build an atom directly from a string.

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

Reverse the list.

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 : Buffer.t ‑> t ‑> unit
val to_string : t ‑> string
val to_file : string ‑> t ‑> unit
val to_file_seq : string ‑> t sequence ‑> unit

Print the given sequence of expressions to a file.

val to_chan : Pervasives.out_channel ‑> t ‑> unit
val pp : Format.formatter ‑> t ‑> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Format.formatter ‑> t ‑> unit

Raw, direct printing as compact as possible.

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| 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 parse_string : string ‑> t or_error

Parse a string.

val parse_chan : Pervasives.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 : Pervasives.in_channel ‑> t or_error gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Pervasives.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 diff --git a/2.1/containers.sexp/CCSexp_lex.odoc b/2.1/containers.sexp/CCSexp_lex.odoc new file mode 100644 index 0000000000000000000000000000000000000000..02fe605e9c2cb66cfda9f182c9064878e891b18d GIT binary patch literal 1057 zcmb7DT}TvB6dv>{S@xeIREW8|>6SaIrTCLDx~;KfuC*FS!ZbU3H@BVLac5?AEwYCK z!wRmVE@jYI{zO`7P|-`QM88m|4~8LVkcAoOOZZfDXJ*BGY~V7?ch2{n@0@dockygi zwkgMCzTDaWf*=SIpE!Jy@!2{|vb(Ys&vBV4W zhc4REw$Edq^eC~ho! z75K1JR<@8S%lQ_@$9en`6#NWV#tS}1DrH0uD!P?5UQnvB8bCHANld^<`Y39ELppGsv6}fQd7y_vYfiADHj^Y{-yhV{D>FaPM&BvC>kxjoVc z3iT52g?YDyRv=(Q8o1M_ zf|hc-!-{}Cil(Jo?KT9e@h2sBMD7DdZxsYyK%iDrPRG-tlo}vjdu1w_ox?+*K@YXe zz+6!k2&+Cpkzxz?p1LNUgFufKw<^U{-y=q4moy9n84iIV z)o7Pa!J?+)73*C(C(m;l<8_t*eS8C?13_NG*9wfP9fL|>k5XFHZd4VC J)x|d4=wE|@tYiQH literal 0 HcmV?d00001 diff --git a/2.1/containers.sexp/CCSexp_lex/.jbuilder-keep b/2.1/containers.sexp/CCSexp_lex/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.sexp/CCSexp_lex/index.html b/2.1/containers.sexp/CCSexp_lex/index.html new file mode 100644 index 00000000..ae2b6348 --- /dev/null +++ b/2.1/containers.sexp/CCSexp_lex/index.html @@ -0,0 +1,2 @@ + +CCSexp_lex (containers.sexp.CCSexp_lex)

Module CCSexp_lex

type token =
| ATOM of string
| LIST_OPEN
| LIST_CLOSE
| EOI
exception Error of int * int * string
val error : Lexing.lexbuf ‑> string ‑> 'a
type unescape_state =
| Not_escaped
| Escaped
| Escaped_int_1 of int
| Escaped_int_2 of int
val char_equal : char ‑> char ‑> bool
val remove_quotes : Lexing.lexbuf ‑> string ‑> string
val __ocaml_lex_tables : Lexing.lex_tables
val token : Lexing.lexbuf ‑> token
val __ocaml_lex_token_rec : Lexing.lexbuf ‑> int ‑> token
\ No newline at end of file diff --git a/2.1/containers.sexp/index-generated.mld b/2.1/containers.sexp/index-generated.mld new file mode 100644 index 00000000..559aaa65 --- /dev/null +++ b/2.1/containers.sexp/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.sexp} +This library exposes the following toplevel modules: {!modules:CCSexp CCSexp_lex}. \ No newline at end of file diff --git a/2.1/containers.sexp/index.html b/2.1/containers.sexp/index.html new file mode 100644 index 00000000..3076792c --- /dev/null +++ b/2.1/containers.sexp/index.html @@ -0,0 +1,3 @@ + +index (containers.sexp.index)

Library containers.sexp

+This library exposes the following toplevel modules:

CCSexp
CCSexp_lex

.

\ No newline at end of file diff --git a/2.1/containers.sexp/page-index.odoc b/2.1/containers.sexp/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e84cae87adaa516df59028a548f66713dffb1149 GIT binary patch literal 267 zcmc~#$xqfb)HBjEXqmcf9|Hq}CJ?g%u?P_JZ_rQ9&nrpH%u6jQ)+_9oSoS? z?g>yifzZ0pM1sq

@gsp_ksO-1;|wIB-F|P*og2;soEf>mO-ALL!pmncbQ9z3;s@ zW7(GOT*I2T>X)y6b*E4$EWoD(pJ(9n)Lz4tLQ^hSq%7@6jJB`YOH1bi>27eb{(8(} z=F~radT0Nd{HwS4?!B{5{4t?&q(|=;3dJt~%q$d)4<9QO%tHGA@Qg>2G`)S!NfT>W zndGHYcsB9Yn$H#4L@vaqick{pkZaZ^ieF+DS&5YoWa0T14PcEFMEh*8q3bh2xGn>N z7Y709a`@N6{wyc`#H?G51;=axXbawMF?jvC@#{~!zZ|VSccOab!KELrJIUTz6}fgUr#dXB1!X2| z+m|7;6%VDbyE58P9qKZBY=+%z#XM-+ZRXK9(DjS=uismLw*TkN%ggUQ`2OwR&pAnY zW&egzt!U6LnV4Fo9-GTc4m$T_lnbJW^oZ_t7)kpt%uvVKhaDC8#=rFH-c4h1+6C)1 zL#WeB*$~tetUG{${U|l;uZT3MTI3Cdf~WmiaVDhOP0$TETqHD zxB#~XP}TW&78+m(3l#xRz)Pudy~i~yB_RuC)SEq>?}rML;!FduPm~X1!`7DE20yh= z>I8ai5EihIVSO$XZ!<9X>-q%&q2TQ%jn-p)nI@Cm1KcS=UM7HCu^i`?^JS9kOhOkp zxMBDP#0~_?w2@{9@&(HDt2iK=WE&(PIA#ifDlnafiqHd0Hi0Xt8xgA5KU z8kMZdEeC2L0W$`j@}j$@rW=_Z6UWzJl!16WQhM0r!!-nBZPp$EFJ{01n|1KbERt;o zT;*ArT){qa3osdQR`6X74h|!&9)69GUK>!%_~EK-4l`puXL@%QnGV7GbE6p%1jLvj z_#o2>l5@Z!8EcGXF4@Qgqc^T+e1L8kcJ?G|%^0AZ7>F9u!O4Gz!bDbs ze9U0*krZA?HB5ci=dNFNsbXNufFx>W>L>=53s(7phi^Q}14UZQr7jXYoIcB%NjiI+}h^|9qRY_SN@M~B>vqX-Uk&_e}BhisVK zQgJGEFhHdu+yfcjr&X82HOqA`!!*a3+3!Z)P5v|E!o}swV05BN#gjucyfps?sBX-n literal 0 HcmV?d00001 diff --git a/2.1/containers.thread/CCBlockingQueue/.jbuilder-keep b/2.1/containers.thread/CCBlockingQueue/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.thread/CCBlockingQueue/index.html b/2.1/containers.thread/CCBlockingQueue/index.html new file mode 100644 index 00000000..f2d80da4 --- /dev/null +++ b/2.1/containers.thread/CCBlockingQueue/index.html @@ -0,0 +1,9 @@ + +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.

  • Since: 0.16
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 diff --git a/2.1/containers.thread/CCLock.odoc b/2.1/containers.thread/CCLock.odoc new file mode 100644 index 0000000000000000000000000000000000000000..5d5e3f52d2123f29a6f0025a607bbd4626ef994d GIT binary patch literal 3059 zcmbVOYls_F6i(I&ZMLE-1z%LWG1+XpB$H%YO4UAQyFO@XX>GSYKnORJo9?)ixnbtc z?nV>@OU2@k**-y0rfXLOMVJ1mAWEfR{}x41@JB)PhX~a_f}qrM?ww3F`#{^$ft@om z=ljlgzH@GPotwpqKBAY8o%!I)L?TgyD+SlRaNV;|F}WkCGzg)ek60AF&NZheLkx1`PB-TE+Hj&6B!dptC^#x&gY19aV zkt4#gJwjdXJ9V<(7i`7|A)eMp$rQDHMy6fbYOy-89Ki`yuM|jwyQIloMm*YJqOBX@ zscc!_W@vYZ;kGf_wBdE;I@ErOyG<%~Q_nKJpxplCt-CHA{&ez*hp&%6d-dG9FdUSa zLHVEiu3tO1X7Kq#Z~S`vs}t6{VK{t{xl{1n6oU`n(SG~!+|L7rhqi1ydE@0D=8Rxr ztLK^}C74%Ig6V*pE|n&Dla)NH$(_j>qEAjW5^dF-}5T3j|uN5-_WD0h6l<<64$^>FeTVevlu(3(TWq2t=4f!uTv+%LD zJ#RuA1;ej*jLARYWrt0Zmdgb*1!R!o>V|RAfNw7Z!MwId+aUAE6bCmUL=^!b%WN^e zBQ|M-L7uq2Wm21XK+xijPWCinfQ_UETxjp^~+~Oa87EzkiarOkZ_sJsK@HEP^ePd zEK9to$__F$_%G`{Q50^w8dr%mS9&5V*8SMZ)QN@6vA8lS;c(H9gn$NyQK8&w3f0_uMnzO6k;WQkof82*{VX;!^ayG`GJVMa`D-m?^wc+?~UgDRvo86tEg88d+S8k zYxm2k3FH^44T(qr8MtJQdFf_QH z3MCkf#xl9os^cBo?38QGZtMNyFf1wqX;BZHj2}mcS<>`9f%YQIGbuC#N2}pGa(*Pc zuI5sLR8mtK1VN^Okq?8pRPqJwct%7LcLpMrWF7fHfnlYjs(UN6v}MCeQ!|cxjX45I zfwOZYE+Vf4>FkJNfl$GlIO0$kE*{W7mE68UQ(lkSaXP}SHfakRp(`4AtEdbUlQ&y% zXkZsAGeZT^COb%jYy<-lds7$`3aE)g;2nJBk(nW+2>V9OR_~w4@UVaQNGGlbww zT5Jpp%!8+AbY`kG*0D$5fP{WrLTfuCWU~l(3K+9Xt>ZNxvDt8s2C4ylO4jV`1K fKR~1i<(P#Gt;S=pL2d6=iCmFFY*Hi&aHRbUAXk&l literal 0 HcmV?d00001 diff --git a/2.1/containers.thread/CCLock/.jbuilder-keep b/2.1/containers.thread/CCLock/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.thread/CCLock/LockRef/index.html b/2.1/containers.thread/CCLock/LockRef/index.html new file mode 100644 index 00000000..510b27f7 --- /dev/null +++ b/2.1/containers.thread/CCLock/LockRef/index.html @@ -0,0 +1,2 @@ + +LockRef (containers.thread.CCLock.LockRef)

Module CCLock.LockRef

Type allowing to manipulate the lock as a reference.

  • Since: 0.13
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 diff --git a/2.1/containers.thread/CCLock/index.html b/2.1/containers.thread/CCLock/index.html new file mode 100644 index 00000000..be00e1fa --- /dev/null +++ b/2.1/containers.thread/CCLock/index.html @@ -0,0 +1,10 @@ + +CCLock (containers.thread.CCLock)

Module CCLock

Utils around Mutex

A value wrapped into a Mutex, for more safety.

  • Since: 0.8
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 diff --git a/2.1/containers.thread/CCPool.odoc b/2.1/containers.thread/CCPool.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e492aa8859bfe010d8df81f6f425c01c484de3db GIT binary patch literal 5814 zcmd5=eT*Ds8Nc0|G3;py+JG3Oyx05MYqxvXLTRD4o$EH0s+TnF#a4)(@9w^PJKpTf zIx~BBTN*VHA{Z0r3N0uq)21z^G)kQk!jKT#4e#P|;h_y?FsV*EYNJG-;} z5Ha=-FS*^>ndkfC_dM@-Rj;yPV{ub)@_}P#e%9C5w*mhq{%^wndsjAAJU5iKtNfrC z)_o$pzbKi&nELL)@$R zUPHvo`BF*q#L-~UiXR!CEN;BhGH#6HttHuTY&TTCE1f-_-;m)h8Q7H|nrwgPE2}OX z`0o7f+g_ge__L3_JC4`wQ~m;;E+{;H!g%$?$Nq9d;nq9yM_)Vq!bvMyxij!96FNS@ zgpN-U(sL6Nb+4f&0=wb46N{cdA2ek}O{77cm@T(#r#ewpHQ92)$=4@e_~6g|w?0t( z^E2wfRhfTGSy6oS;%TEe5`^$8iY@D63}0kq(O(qB7oRe&AKvY`Dl%3@^u)60-pykN zr5)PtTx7f-v~+9D=pJc1su~%$M)9dAIzFV9T#^zmUp!?T8re6se`-21)4sIyC!>{Tj8#*E`=Tg1Wjtg| z!do)zJx0;kVB{@r=9(eDSs@%kEvZV2 zDkQO5JJB)zymg)(7;d>XJb*8TX|dLA!;rs`6y@nc)WlL8O$a*>$gb^3UxXg?-A-2I zYxFTLHtZm>ajrcGK5tQa_>%;$)q)R^;7yV7WI{mC%bJQWiFB(bb&2%$$oN4oDG^nA z==nD>&1j}CPXsEQMXG1(Xdy@Wk@0-urty9Du*{!IlRq&kD4jlphN7rA zRYM~(6Xhsg9-}9$H>V1s;RT^UOktSk24c~69N|klP$H?U;=oKD=8*+diK8l0hQXg<>g)*2AG&WpX4P7ITaV#F!RrFHx=RZs1RoVpfg1rmqGp^K^%XFgIxxy5_>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W@yU_=ht{#a-zOZOzdV2a53>yB{3>(eL}r=B%M2F%f9SgUY9iqq zy*iog472g&Ilk1aZzR5&xrFn_T~4AkzNLNrb;|wQlpF6Gw6k#>jZZl?y)D5zD|)41 zW*+X%o!S3NS1zJ~c4A9j>yfoJ3B%Q7RWFfcTz7eVjQ6p0w)ke2$?-95`if4((TZuV bHBEt6543NZdDHxeY3?=6-H4)ji)H-_u2!Nu literal 0 HcmV?d00001 diff --git a/2.1/containers.thread/CCPool/.jbuilder-keep b/2.1/containers.thread/CCPool/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.thread/CCPool/Make/Fut/Infix/index.html b/2.1/containers.thread/CCPool/Make/Fut/Infix/index.html new file mode 100644 index 00000000..30f43a14 --- /dev/null +++ b/2.1/containers.thread/CCPool/Make/Fut/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.thread.CCPool.Make.Fut.Infix)

Module CCPool.Make.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
\ No newline at end of file diff --git a/2.1/containers.thread/CCPool/Make/Fut/index.html b/2.1/containers.thread/CCPool/Make/Fut/index.html new file mode 100644 index 00000000..83660e42 --- /dev/null +++ b/2.1/containers.thread/CCPool/Make/Fut/index.html @@ -0,0 +1,22 @@ + +Fut (containers.thread.CCPool.Make.Fut)

Module CCPool.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 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
val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t
val (>>) : 'a t ‑> (unit ‑> 'b t) ‑> 'b t
val (>|=) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Alias to map.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

Alias to app.

\ No newline at end of file diff --git a/2.1/containers.thread/CCPool/Make/argument-1-P/index.html b/2.1/containers.thread/CCPool/Make/argument-1-P/index.html new file mode 100644 index 00000000..98a72428 --- /dev/null +++ b/2.1/containers.thread/CCPool/Make/argument-1-P/index.html @@ -0,0 +1,2 @@ + +1-P (containers.thread.CCPool.Make.1-P)

Parameter CCPool.Make.1-P

val max_size : int

Maximum number of threads in the pool.

\ No newline at end of file diff --git a/2.1/containers.thread/CCPool/Make/index.html b/2.1/containers.thread/CCPool/Make/index.html new file mode 100644 index 00000000..b9b9783c --- /dev/null +++ b/2.1/containers.thread/CCPool/Make/index.html @@ -0,0 +1,3 @@ + +Make (containers.thread.CCPool.Make)

Module CCPool.Make

Create a new Pool

Parameters

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
Futures
\ No newline at end of file diff --git a/2.1/containers.thread/CCPool/index.html b/2.1/containers.thread/CCPool/index.html new file mode 100644 index 00000000..eecc82a4 --- /dev/null +++ b/2.1/containers.thread/CCPool/index.html @@ -0,0 +1,2 @@ + +CCPool (containers.thread.CCPool)

Module CCPool

Thread Pool, and Futures

Renamed and heavily updated from CCFuture.

  • Since: 0.16
type +'a state =
| Done of 'a
| Waiting
| Failed of exn
module type PARAM : sig ... end
exception Stopped
module Make : functor (P : PARAM) -> sig ... end

Create a new Pool

\ No newline at end of file diff --git a/2.1/containers.thread/CCPool/module-type-PARAM/index.html b/2.1/containers.thread/CCPool/module-type-PARAM/index.html new file mode 100644 index 00000000..d1ceb97a --- /dev/null +++ b/2.1/containers.thread/CCPool/module-type-PARAM/index.html @@ -0,0 +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 diff --git a/2.1/containers.thread/CCSemaphore.odoc b/2.1/containers.thread/CCSemaphore.odoc new file mode 100644 index 0000000000000000000000000000000000000000..da1f3d4cc5e0d49c3a2e9e6ccec2f5eebba40883 GIT binary patch literal 1265 zcmb7@J#5oJ6vqu1i53YE46szZ(5MYfV!Iy#L@9C!0>Ol6g_wvA=S)s@&gJf$Dhy>| z1Io3fbU;W3QCRq>SlAE(Bt~W=gjm=>OiV1?*`^5y2CSTNzWcv-@ArS_uoimdL2Jlz zt}H!xVHn1c8XMKvsmAuzK`*2N5sDeNM4e$&yIZVOCU65y*F%O~=hN4@k8f5!*WVR) z9qc)|?OdA0ylxol_87*7%WA+T!^j))|K~E-%Q${M?#6Op?L_Xn@nYVw28Ug9a~vP2 zphiHbz>K2cSjZYk96_9TTso~M*S0*Lcsg}-_ovA-Z&>01nDis> zVnkR{crlv;1s+Qa&Ih44#UY}C1nT$!l@~Z19@Av|OCai)0uo_^cqj;3-5d+9WJL}K z#~{a{taXYgJ9i}eA5IF-M+!f!;YL5h0Y*HnA)BW)40hyK{{5c6_@C+iNnl!J9L{&Siuf_c6U)I|`ltFL*qv_?W>3{Hd?d#V342y_S4mzA+ ju0AIVj)s`iegTcJM*Nnxs14f5^E%^s)yZ=+<8j@eiAm(y literal 0 HcmV?d00001 diff --git a/2.1/containers.thread/CCSemaphore/.jbuilder-keep b/2.1/containers.thread/CCSemaphore/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.thread/CCSemaphore/index.html b/2.1/containers.thread/CCSemaphore/index.html new file mode 100644 index 00000000..dfe11acb --- /dev/null +++ b/2.1/containers.thread/CCSemaphore/index.html @@ -0,0 +1,6 @@ + +CCSemaphore (containers.thread.CCSemaphore)

Module CCSemaphore

Semaphores

  • Since: 0.13
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 diff --git a/2.1/containers.thread/CCThread.odoc b/2.1/containers.thread/CCThread.odoc new file mode 100644 index 0000000000000000000000000000000000000000..14c7a24bb6e9157ad5d0a6f6867d75b45a3e5711 GIT binary patch literal 2021 zcmb7FU2GIp6yBPt&|(0M#$ZA?3)|goyWO7_X)&QpTY?f3CA6T4CT4c#?(Vg-cgUUD zE=%Hrf)4~Rvmhmr2d@bFVx;kQr&^*@1(2STNmr%V;5G?#BG zQ(eG$-Vdyx=062BfmYFFrm0RR^4Y?eX*{gd))}knauF~oEO(lhEh()=n1BAx@dx+* zap&{5e!Y5n?L(92l$yAA<8Dt@tzg>nx$TGf#>XetF3(87@uu(#~nQ z{ajn_EC$w>%T>H8%lW+OiCo>2^Zr50X1Q*ba<3F?+;wseD_J!+$lv(++RHZ+f!uuJ zhr)~B%}q_2p*nTtqA?i{LS>p)Of$Uje$#j&9+;@)nWc}6X9p0oE-(SjRAfO(g?#`v zWNKKnz3L zgc2N5;UI7yTt3eb>`6_XF4Y90!pJ0T(datg+ai)MZs8OEk-~^;{9_t_l<+eV%qSg( z#!80q`!PV{z8pkR)I^a(m}ec zYQ?cQ5HTux_hGBHb|qf*cvMZIwo6xhT7AWWUc~8reCMxP{d0?U_im-h{?oRE~O}k9q)WJJDLnK+R_k z1RnSeVOOLl_+i!+{0i~uq(7R}-9X0+Gf`t;UlcWERR84e-@5QO8yobg8C>mnn+3F+Rp0E(_> z&l6ME@8~|Nqkxgq6oD6&5r)_;qn9+x3!3G~V4KAun&HljbQuK6f|}I#TOeypg#*A# z6zK|o3dq-1A_JCia6>A}cBF2qpO!J&mRR6(VY4jk5r7IX33!z|J}ESM4?VV?rc6PV jS;EJz>)#PGLoSq;YkW^F;Vn9H>y|TQ`7txO27y| literal 0 HcmV?d00001 diff --git a/2.1/containers.thread/CCThread/.jbuilder-keep b/2.1/containers.thread/CCThread/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.thread/CCThread/Arr/index.html b/2.1/containers.thread/CCThread/Arr/index.html new file mode 100644 index 00000000..8e8a3a33 --- /dev/null +++ b/2.1/containers.thread/CCThread/Arr/index.html @@ -0,0 +1,3 @@ + +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 diff --git a/2.1/containers.thread/CCThread/Barrier/index.html b/2.1/containers.thread/CCThread/Barrier/index.html new file mode 100644 index 00000000..5c8077d6 --- /dev/null +++ b/2.1/containers.thread/CCThread/Barrier/index.html @@ -0,0 +1,6 @@ + +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 diff --git a/2.1/containers.thread/CCThread/index.html b/2.1/containers.thread/CCThread/index.html new file mode 100644 index 00000000..1b8a1dbe --- /dev/null +++ b/2.1/containers.thread/CCThread/index.html @@ -0,0 +1,2 @@ + +CCThread (containers.thread.CCThread)

Module CCThread

Threads

status: unstable

  • Since: 0.13
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

Array of threads

Single-Use Barrier

module Barrier : sig ... end
\ No newline at end of file diff --git a/2.1/containers.thread/CCTimer.odoc b/2.1/containers.thread/CCTimer.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8d91ee79c5c631a0f5c3afa48540cb0a68c83f59 GIT binary patch literal 1645 zcmb7EPiP%Q7~kkde9u4V!3s)olDy=lNxJVP)usid8=npIAc$$igAnHJ&L&HCXO@}S zygae>V8x5zylC5lmr-m5DH?j|tpq(-yy&&iLj`jX6!9Ql{bpv925)(=Zst$S@REDI7N$xxS|0&|I2g7jdr(^)KK$%$4YL8w1%w1e4`q5q85r#d*#QYs0jI9p^q z$MRJy(nzRw|J#qBytVY*`fD%TKmXQ`S0B@Q>J7p-;Oho~&!78$+`GE_)XdQrC%683 z_wJXW+MX9YYB?4}t70L5@U>QJjpd{z(wxy&kMVU;;E1#yaMxPtmT4BZVv^u8lkGc4 zPTlz7**o7~n%e#8gQIn^5GuX3bIlJ%B$Tdda|=jBYa}i+!coFFB8CSMpmP%Ok_wbk zluChEk0J*s2*aJw{PgAR8~*8u2(*&K1e;kvl=K{jaO!6Gl~Pw4B~7JyyXK$spLdsD zZwVq-$R=G`!!(A>aCM;8aSRMK?0BOMcC+z>pP=B`b zjenuJBw10ASm`iS6%!wh;{+fYBIY_c%K#oh5xjJ9w7!RX4B12Wn@dm2ybIKWy95Cl zV*$4MdN00Kr_;n9wzyFb3nX0XeXvUv)bS)^ScW&18c8g8KM5`9)RDeDik;-69jh2H zlvpb}9?1sIN)S>wLPjT#Y4r*Mf=w9?>M~6?ttvv|yf`e*ixs)k2O)mqAZ|Hc?;bn5 znM&wH-dFxRd&J%!2T#I|)`PZvtDHg6MX*BCa%_yzNRR>DG#2K4!#LGyYM<7+9*iaC zK+RmC$XW&MCp2XnYHhtyKgtLcczrx38SZO!24pBW+el*)&)6eL%7wJK9br}W+K6$M zy=8q^wK4(xj16P1)3&OGKJD3k +CCTimer (containers.thread.CCTimer)

Module CCTimer

Event timer

Used to be part of CCFuture.

  • Since: 0.16
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 diff --git a/2.1/containers.thread/index-generated.mld b/2.1/containers.thread/index-generated.mld new file mode 100644 index 00000000..2ca8e050 --- /dev/null +++ b/2.1/containers.thread/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.thread} +This library exposes the following toplevel modules: {!modules:CCBlockingQueue CCLock CCPool CCSemaphore CCThread CCTimer}. \ No newline at end of file diff --git a/2.1/containers.thread/index.html b/2.1/containers.thread/index.html new file mode 100644 index 00000000..3519f5f4 --- /dev/null +++ b/2.1/containers.thread/index.html @@ -0,0 +1,3 @@ + +index (containers.thread.index)

Library containers.thread

+This library exposes the following toplevel modules:

CCBlockingQueue
CCLock
CCPool
CCSemaphore
CCThread
CCTimer

.

\ No newline at end of file diff --git a/2.1/containers.thread/page-index.odoc b/2.1/containers.thread/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e18b49090fbe2118e7021c564f868b51f6de5c93 GIT binary patch literal 334 zcmc~#$xqfb)HBjEXqmcf9|Hq}HW0G{u_zD=Y%omD&nrpH%u6jQ)+@;!J()j+>TD`F-^8AE@?^KyCU!ycmdkH!LK<02ZbR3l?m5bXYLK(kC;i zD6yzg0mE{jB&QiyNJeI{LJm|-YDGbQacZ$bNk*zdT7FJWetBkIx}W07wS7ZJLTjjX9Lv)mZp}b0 +Containers_top (containers.top.Containers_top)

Module Containers_top

type 'a printer = 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 diff --git a/2.1/containers.top/containers_top.odoc b/2.1/containers.top/containers_top.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e4c37afdadca88a402809690ae465127e62afa45 G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/index-generated.mld new file mode 100644 index 00000000..88259e26 --- /dev/null +++ b/2.1/containers.top/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.top} +This library exposes the following toplevel modules: {!modules:Containers_top}. \ No newline at end of file diff --git a/2.1/containers.top/index.html b/2.1/containers.top/index.html new file mode 100644 index 00000000..64b90375 --- /dev/null +++ b/2.1/containers.top/index.html @@ -0,0 +1,3 @@ + +index (containers.top.index)

Library containers.top

+This library exposes the following toplevel modules:

Containers_top

.

\ No newline at end of file diff --git a/2.1/containers.top/page-index.odoc b/2.1/containers.top/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9084745bdbdf122c2c703bae48e1b4f83b7d9e15 GIT binary patch literal 256 zcmc~#$xqfb)HBjEXqmcf9|Hq}1`x9Xu?P_JZ_rE5&nrpH%u6jQ)+@;`n4p@Omy%jx z5c=4r?~#$LjfTws#d0O}oKU^XfO@2XI2nk8HY_AoHw)8*1q-%2IxLuA=98IJlvq@$ zfNCvJhSQ8IBqOs}AqT1;wW1)uIJH=zBqLQJEk7qGzdSQ9T>751)YqVBd0k!ZwAQE%e4y-u9jb(1(Wq0KsO9u{d_?6_%)%4)nb>m59v zS?12hae=7N@}r?C<2<3^F-?;QMW}foD6J5&R1j1mEg*!1K+yi61d3>Bg-F8>_|CmE z`*4$n5-IY|opbLw=R4}_jXICDc=Tc$01 z4~HnpAPk=wD17q|#Do0I(~m8DX7tSDUAMlxWvZSD#37q{N~ z!iJ@Xx*mSI{lVWJhpi(fui1W( zU!&ZA=)(GaTV7IczjXegOK*i?=UAzt!;4+^5dYx!o>xD+<=Nl(d;j^%Fw78oL0(2WE+xY^?Wniu^es#H3N|Wf+ z@QHx3X(PpZP`44a2?m^}bjRRy=Hav7QT8o2c}cIDMd*TXkkU4ZXQnf$opG00J}c=C z8#igSV%j#-y@}eC>G)cqAZ$=plYV8bH1ybt64Vu?JApDh2M-a*AcRMTTk}bDE36XF zK!cu#qi0G>LStI1dTz<&9G1}fG{ ztYOohU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QX;L=~uWkeIR&HpCVeoP79I6OY{Xkra${46wk~6+bL@C}FXmUeN+1k_i2uEX0 z@Wydf`FW>!6R65Vv$Hg#DXC0$!{>UaQ2XR2lmLayOdCy*F zWK_N+uRiU+mh&Ph>+giJu6Naz{Ml8tz2n+E?}n(rNV+*Bza_L0u?B_kYjdiq!P!@4 m4`I4EuBvMkD;&UACdC#5s(OcFDHY{D`7odqlnqJ_TmK7}98~52 literal 0 HcmV?d00001 diff --git a/2.1/containers.unix/CCUnix/.jbuilder-keep b/2.1/containers.unix/CCUnix/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers.unix/CCUnix/Infix/index.html b/2.1/containers.unix/CCUnix/Infix/index.html new file mode 100644 index 00000000..f990dc03 --- /dev/null +++ b/2.1/containers.unix/CCUnix/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.unix.CCUnix.Infix)

Module CCUnix.Infix

val (?|) : ('a, Buffer.t, unit, call_result) Pervasives.format4 ‑> 'a

Infix version of call.

  • Since: 0.11
val (?|&) : ('a, Buffer.t, unit, async_call_result) Pervasives.format4 ‑> 'a

Infix version of async_call.

  • Since: 0.11
\ No newline at end of file diff --git a/2.1/containers.unix/CCUnix/index.html b/2.1/containers.unix/CCUnix/index.html new file mode 100644 index 00000000..c901d5b9 --- /dev/null +++ b/2.1/containers.unix/CCUnix/index.html @@ -0,0 +1,18 @@ + +CCUnix (containers.unix.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.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 ‑> ('a, Buffer.t, unit, call_result) Pervasives.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.

  • 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.
val call : ?⁠bufsize:int ‑> ?⁠stdin:[ `Gen of string gen | `Str of string ] ‑> ?⁠env:string array ‑> ('a, Buffer.t, unit, string * string * int) Pervasives.format4 ‑> 'a

call cmd is similar to call_full cmd 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 ‑> ('a, Buffer.t, unit, string) Pervasives.format4 ‑> 'a
type line = string
type async_call_result = < stdout : line gen; stderr : line gen; stdin : line ‑> unit; close_in : unit; close_err : unit; close_out : unit; 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 ‑> ('a, Buffer.t, unit, async_call_result) Pervasives.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 ‑> string ‑> f:(Pervasives.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 ‑> string ‑> f:(Pervasives.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
val with_process_in : string ‑> f:(Pervasives.in_channel ‑> 'a) ‑> 'a

Open 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:(Pervasives.out_channel ‑> 'a) ‑> 'a

Open a subprocess and obtain a handle to its stdin.

  • Since: 0.16
type process_full = < stdin : Pervasives.out_channel; stdout : Pervasives.in_channel; stderr : Pervasives.in_channel; close : Unix.process_status; >

Handle to a subprocess.

  • Since: 0.16
val with_process_full : ?⁠env:string array ‑> string ‑> 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 with_connection : Unix.sockaddr ‑> f:(Pervasives.in_channel ‑> Pervasives.out_channel ‑> 'a) ‑> 'a

Wrap Unix.open_connection with a handler.

  • Since: 0.16
exception ExitServer
val establish_server : Unix.sockaddr ‑> f:(Pervasives.in_channel ‑> Pervasives.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
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, Buffer.t, unit, call_result) Pervasives.format4 ‑> 'a

Infix version of call.

  • Since: 0.11
val (?|&) : ('a, Buffer.t, unit, async_call_result) Pervasives.format4 ‑> 'a

Infix version of async_call.

  • Since: 0.11
\ No newline at end of file diff --git a/2.1/containers.unix/index-generated.mld b/2.1/containers.unix/index-generated.mld new file mode 100644 index 00000000..adee15d3 --- /dev/null +++ b/2.1/containers.unix/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.unix} +This library exposes the following toplevel modules: {!modules:CCUnix}. \ No newline at end of file diff --git a/2.1/containers.unix/index.html b/2.1/containers.unix/index.html new file mode 100644 index 00000000..39b33277 --- /dev/null +++ b/2.1/containers.unix/index.html @@ -0,0 +1,3 @@ + +index (containers.unix.index)

Library containers.unix

+This library exposes the following toplevel modules:

CCUnix

.

\ No newline at end of file diff --git a/2.1/containers.unix/page-index.odoc b/2.1/containers.unix/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..f267064f09f27102037cc16029d0b93c3460c668 GIT binary patch literal 251 zcmc~#$xqfb)HBjEXqmcf9|Hq}CJ?g%u?P_JZ_rQ9&nrpH%u6jQ)+^1+teBvhnU|7U zVel)g;rZ33X)kt9IME@y_4Z__<^@1a(m&piO;Xfza9|My0O6fqYaqk|So}O|XeWj2;`&IY;d#*p@b5AaR#M*uO-+B2<-~UDsY@gQaHPiA8 z$I@#vwo})=3v|~kyMBJ<;hRo<;=orIKJV^>24PlDog}$d%9N z)33kpE2}{;v`6>MMFZ6R{3m-l`@a6%S6}o0_r1#xU3bN;K`^|}a2CPJq5)p+&|Z7> zwx6Gt{oq9A^Z)*dm+k>C`*o{g*Zurcweg3$fBbUd>o+{s_b(T||2Lp`d3j!kKCY&B>S)@^Ha$#xdphF&%> zF0}1vvD7qcmC=e()tfahKlxz!pTGM=;enfGot{mvzVhc&1wZ)w@uS*o#x<^O8dllx zgF@kW5coYhtmHphc(j1WBffuYf73F(0-m%4e&JcA^g_*aJzqO3K7)q5w{SQp1dsIX zF>5gXBmL91B7j@*0is&;SsfTw## zk4MT;%J}JE!(lx7+U;v6tZIKZRAqz$tu2LWcM`QP`s5%Nz(EGsLC7~qxjZm2mjjgNgPt(?-4FtzZ>DnZ9h^5d125U{*BdSKt$Rt+paqS;DhLu-bd* z5Z1^QNVA|csP*%b0WX+SYNZ8l{39Fo6}ly7o8F4>419nz!l)T_!}45OlBv15loSE4 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8m(rQtyLSzd8OCOJx&37qi6L6$!AF=5TS`lvqX?5IsXNKvZtbUe z{F%+)ZTDwJMp#?BQ1svml0yCkd}#?epj>OB1rn_p#{Jae?7yjxbGT1Et@e}Mf0o9A zSM!R=zSxpz4lmPM#J^+C&3p1*l-e_movXYf_5JYSdAa_gT>qtT{UZain(`CfSIVf- z5gh^JDlW@V}nCqyyQB%0%emVDOeD3q%ElET}%(_v|>ONgD z*%56$JD!!(kE`iXAux84fjh`(?aipG7JLD6_4tuQ_pgU9*}G?NacckmsVlJj!~QB? z`%Ly3H4pEPA4dfN!Rh+yX}Bwy=zdy#!PZ?nGrTR7=>8`2byPcBJGDRx=-$V&YiYiF zm*{?;f5(rC|Ep=#QEjU>EXSS8SGN+~Ka=A`IIbZdwD-tWe~#<2QmLm*%kwQ1WF#8L z)2k1lUCPmtF(gk9=?)yW-ZmACuzbeQan6ZqyS#uh9JjwP-fqsJ-zjjVn8J>ZMt-U; z0fK8p)L6n8Y8SbTw+E(0#<)1K&TAIOUHuBMAI^3#>!>kKdp@YD2~PE%Xzj UGyP$e9m5hlhTcxW!CT?~0Iynv@&Et; literal 0 HcmV?d00001 diff --git a/2.1/containers/CCArray/.jbuilder-keep b/2.1/containers/CCArray/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCArray/index.html b/2.1/containers/CCArray/index.html new file mode 100644 index 00000000..fa4be80e --- /dev/null +++ b/2.1/containers/CCArray/index.html @@ -0,0 +1,53 @@ + +CCArray (containers.CCArray)

Module CCArray

Array utils

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a random_gen = Random.State.t ‑> 'a
type 'a printer = Format.formatter ‑> 'a ‑> unit

Arrays

type 'a t = 'a array
val empty : 'a t

The empty array, physically equal to ||.

val equal : 'a equal ‑> 'a t equal

Hoist an equality test for elements to arrays. +Arrays are only equal if their lengths are the same and +corresponding elements test equal.

val compare : 'a ord ‑> 'a t ord
val swap : 'a t ‑> int ‑> int ‑> unit

swap arr i j swaps elements at indices i and j.

  • Since: 1.4
val get : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to (length a - 1).

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 set : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to length a - 1.

val length : _ t ‑> int

Return the length (number of elements) of the given array.

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

fold f x a computes f (... (f (f x a.(0)) a.(1)) ...) a.(n-1), +where n is the length of the array a.

val foldi : ('a ‑> int ‑> 'b ‑> 'a) ‑> 'a ‑> 'b t ‑> 'a

Fold left on array, with index.

val fold_while : ('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> 'a ‑> 'b t ‑> 'a

Fold left on array 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 acc a is a fold_left-like function, but it also maps the +array to another array.

  • Since: 1.2
val scan_left : ('acc ‑> 'a ‑> 'acc) ‑> 'acc ‑> 'a t ‑> 'acc t

scan_left f acc a returns the array + [|acc; f acc x0; f (f acc a.(0)) a.(1); …|] .

  • Since: 1.2
val iter : ('a ‑> unit) ‑> 'a 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 ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like Array.iter, but the function is applied to the index of the +element as first argument, and the element itself as second argument.

val blit : 'a t ‑> int ‑> 'a t ‑> int ‑> int ‑> unit

blit v1 o1 v2 o2 len copies len elements +from array v1, starting at element number o1, to array v2, +starting at element number o2. It works correctly even if +v1 and v2 are the same array, and the source and +destination chunks overlap.

Raise Invalid_argument "Array.blit" if o1 and len do not +designate a valid subarray of v1, or if o2 and len do not +designate a valid subarray of v2.

val reverse_in_place : 'a t ‑> unit

Reverse the array in place.

val sorted : ('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a array

sorted cmp a makes a copy of a and sorts it with cmp.

  • Since: 1.0
val sort_indices : ('a ‑> 'a ‑> int) ‑> 'a t ‑> int array

sort_indices cmp 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 cmp a +appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices cmp a) = sorted cmp 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 cmp a returns a new array b, with the same length as a, +such that b.(i) is the index at which the i-the element of a appears +in sorted cmp a. a is not modified.

In other words, map (fun i -> (sorted cmp a).(i)) (sort_ranking cmp 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 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, else it returns None.

  • Since: 1.3
val find : ('a ‑> 'b option) ‑> 'a t ‑> 'b option

Alias to find_map.

  • Deprecated since 1.3
val find_map_i : (int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Like find_map, but also pass the index to the predicate function.

  • Since: 1.3
val findi : (int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Alias to find_map_i.

  • Since: 0.3.4
  • Deprecated since 1.3
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.

  • Since: 0.3.4
val lookup : cmp:'a ord ‑> 'a ‑> 'a t ‑> int option

Lookup the index of some value in a sorted array. +Undefined behavior if the array is not sorted wrt cmp. +Complexity: O(log (n)) (dichotomic search).

  • Returns None if the key is not present, or +Some i (i the index of the key) otherwise.
val lookup_exn : cmp:'a ord ‑> 'a ‑> 'a t ‑> int

Like lookup, but

  • Raises Not_found: if the 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 x arr finds the index of the object x in the array arr, +provided arr is sorted using cmp. If the array is not sorted, +the result is not specified (may

  • Raises Invalid_argument: ).

    Complexity: O(log n) where n is the length of the array +(dichotomic search).

  • Returns

    • `At i if cmp arr.(i) x = 0 (for some i).
    • `All_lower if all elements of arr are lower than x.
    • `All_bigger if all elements of arr are bigger than x.
    • `Just_after i if arr.(i) < x < arr.(i+1).
    • `Empty if the array is empty.
  • Raises Invalid_argument: if the array is found to be unsorted w.r.t cmp.
  • Since: 0.13
val for_all : ('a ‑> bool) ‑> 'a t ‑> bool

for_all p [|a1; ...; an|] checks if all elements of the array +satisfy the predicate p. That is, it returns +(p a1) && (p a2) && ... && (p an).

val for_all2 : ('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Forall on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val exists : ('a ‑> bool) ‑> 'a t ‑> bool

exists p [|a1; ...; an|] checks if at least one element of +the array satisfies the predicate p. That is, it returns +(p a1) || (p a2) || ... || (p an).

val exists2 : ('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Exists on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val fold2 : ('acc ‑> 'a ‑> 'b ‑> 'acc) ‑> 'acc ‑> 'a t ‑> 'b t ‑> 'acc

Fold on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val iter2 : ('a ‑> 'b ‑> unit) ‑> 'a t ‑> 'b t ‑> unit

Iterate on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val shuffle : 'a t ‑> unit

Shuffle randomly the array, in place.

val shuffle_with : Random.State.t ‑> 'a t ‑> unit

Like shuffle but using a specialized random state.

val random_choose : 'a t ‑> 'a random_gen

Choose an element randomly.

  • Raises Not_found: if the array/slice is empty.
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of an array. +The input array is shared with the sequence and modifications of it will result +in modification of the sequence.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of an array.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of an array.

IO

val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print an array of items with printing function.

val pp_i : ?⁠sep:string ‑> (int ‑> 'a printer) ‑> 'a t printer

Print an array, giving the printing function both index and item.

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

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 map2 : ('a ‑> 'b ‑> 'c) ‑> 'a t ‑> 'b t ‑> 'c t

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 they have distinct lengths.
  • Since: 0.20
val rev : 'a t ‑> 'a t

Copy + reverse in place.

  • Since: 0.20
val filter : ('a ‑> bool) ‑> 'a t ‑> 'a t

Filter elements out of the array. Only the elements satisfying +the given predicate will be kept.

val filter_map : ('a ‑> 'b option) ‑> 'a t ‑> 'b t

Map each element into another value, or discard it.

val flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b array

Transform each element into an array, then flatten.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Infix version of flat_map.

val (>>|) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Infix version of map.

  • Since: 0.8
val (>|=) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Infix version of map.

  • Since: 0.8
val except_idx : 'a t ‑> int ‑> 'a list

Remove given index, obtaining the list of the other elements.

val (--) : int ‑> int ‑> int t

Range array. Bounds included.

val (--^) : int ‑> int ‑> int t

Range array, excluding right bound.

  • Since: 0.17
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) ‑> 'arr ‑> unit

Sort the array, without allocating (eats stack space though). Performance +might be lower than Array.sort.

  • Since: 0.14
\ No newline at end of file diff --git a/2.1/containers/CCArray/module-type-MONO_ARRAY/index.html b/2.1/containers/CCArray/module-type-MONO_ARRAY/index.html new file mode 100644 index 00000000..81b820cf --- /dev/null +++ b/2.1/containers/CCArray/module-type-MONO_ARRAY/index.html @@ -0,0 +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 diff --git a/2.1/containers/CCArrayLabels.odoc b/2.1/containers/CCArrayLabels.odoc new file mode 100644 index 0000000000000000000000000000000000000000..2c30aee55631086430e2add89d8415d5379283ac GIT binary patch literal 12065 zcmc&)Ymgk(b>2shc4t=QfMbkJ47vN5*_qYs?Ch=t(n>345fTW41QOUG6pVUidUo5} zGd*;o&r_)#P&C+>v^0yv>dNfPBc9e)ajB zO)u{Ir|ZA{`o4XyW`Y3hU1rzqn(Z{^%(9>V`Q;Ce-F5JZH2wD+>mA zxl4QPrQ2UQEqnIX^ez8&!}mT9UJmK?ie2;bPgoNV^u7FI?5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|AHb!!_^msKtf+2(LEMiV`wzMk$GZFCbKi0CG! z+UOokrg!h2&X7IE_t&fDk|4vj_wKcP0pn?PwrnCSbEDl&f}Bx;Ceh}MeM_|T(KlK; z)_IX!8|ONFNkCGVWmeVYMJ!FqO1N!I2Uz*&8!{d1v^QG$GaIdZSKG?}JYp=B0iB}k zrup&dLq-k9gz63o$7R^NMAvb{7*3ZcL)gj_moWRbly;vYOrrF?o5Z|ri01KYiGWvz z(xaoSt!Y#wxG|+%-~zs5g_KaXnrLD~Yxbp;Mf$Q*ZO;U}`lQ+f_Wd%61+U{3qRbnF!#r5E;U}&+(+fy-)o^BteEV2x;6b- zIsIHUy;T>CUu57CHClE1)b$U(ueoyacx-cR@+(w(V)S+8NtCsotO#*Uk(tH^nwjF<&RNbF_CA*c{(r*|j8J6^w1Zn7`wr z;{SOXbwZoeM&!8j_@-HG^B>A_A{_T4`JnwSue$jf-0oFMeOw-_p*|zgIIv!K80}9E zn~WiOY)M!4uvxazCMV0M4IO8!D22=OsF8754dd2sP91pYk*)*=1Jzo0$p!nJiu=o6v|{UMcYPGJci K!@ur?-v1vMY0+;0 literal 0 HcmV?d00001 diff --git a/2.1/containers/CCArrayLabels/.jbuilder-keep b/2.1/containers/CCArrayLabels/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCArrayLabels/index.html b/2.1/containers/CCArrayLabels/index.html new file mode 100644 index 00000000..96a30518 --- /dev/null +++ b/2.1/containers/CCArrayLabels/index.html @@ -0,0 +1,52 @@ + +CCArrayLabels (containers.CCArrayLabels)

Module CCArrayLabels

Array utils

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a random_gen = Random.State.t ‑> 'a
type 'a printer = Format.formatter ‑> 'a ‑> unit

Arrays

type 'a t = 'a array
val empty : 'a t

The empty array, physically equal to ||.

val equal : 'a equal ‑> 'a t equal

Hoist an equality test for elements to arrays. +Arrays are only equal if their lengths are the same and +corresponding elements test equal.

val compare : 'a ord ‑> 'a t ord
val swap : 'a t ‑> int ‑> int ‑> unit

swap arr i j swaps elements at indices i and j.

  • Since: 1.4
val get : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to (length a - 1).

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 set : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to length a - 1.

val length : _ t ‑> int

Return the length (number of elements) of the given array.

val fold : f:('a ‑> 'b ‑> 'a) ‑> init:'a ‑> 'b t ‑> 'a

fold f x a computes f (... (f (f x a.(0)) a.(1)) ...) a.(n-1), +where n is the length of the array a.

val foldi : f:('a ‑> int ‑> 'b ‑> 'a) ‑> init:'a ‑> 'b t ‑> 'a

Fold left on array, with index.

val fold_while : f:('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> init:'a ‑> 'b t ‑> 'a

Fold left on array 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 acc a is a fold_left-like function, but it also maps the +array to another array.

  • Since: 2.1
val scan_left : f:('acc ‑> 'a ‑> 'acc) ‑> init:'acc ‑> 'a t ‑> 'acc t

scan_left f acc a returns the array + [|acc; f acc x0; f (f acc a.(0)) a.(1); …|] .

  • Since: 2.1
val iter : f:('a ‑> unit) ‑> 'a 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 ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like Array.iter, but the function is applied to the index of the +element as first argument, and the element itself as second argument.

val blit : 'a t ‑> int ‑> 'a t ‑> int ‑> int ‑> unit

blit v1 o1 v2 o2 len copies len elements +from array v1, starting at element number o1, to array v2, +starting at element number o2. It works correctly even if +v1 and v2 are the same array, and the source and +destination chunks overlap.

Raise Invalid_argument "Array.blit" if o1 and len do not +designate a valid subarray of v1, or if o2 and len do not +designate a valid subarray of v2.

val reverse_in_place : 'a t ‑> unit

Reverse the array in place.

val sorted : f:('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a array

sorted cmp a makes a copy of a and sorts it with cmp.

  • Since: 1.0
val sort_indices : f:('a ‑> 'a ‑> int) ‑> 'a t ‑> int array

sort_indices cmp 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 cmp a +appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices cmp a) = sorted cmp 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 cmp a returns a new array b, with the same length as a, +such that b.(i) is the index at which the i-the element of a appears +in sorted cmp a. a is not modified.

In other words, map (fun i -> (sorted cmp a).(i)) (sort_ranking cmp 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 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, else it returns None.

  • Since: 2.1
val find : f:('a ‑> 'b option) ‑> 'a t ‑> 'b option

find f a returns Some y if there is an element x such +that f x = Some y, else it returns None.

  • Deprecated since 2.1
val find_map_i : f:(int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Like find_map, but also pass the index to the predicate function.

  • Since: 2.1
val findi : f:(int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Like find, but also pass the index to the predicate function.

  • Since: 0.3.4
  • Deprecated since 2.1
val find_idx : f:('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.

  • Since: 0.3.4
val lookup : cmp:'a ord ‑> key:'a ‑> 'a t ‑> int option

Lookup the index of some value in a sorted array. +Undefined behavior if the array is not sorted wrt cmp. +Complexity: O(log (n)) (dichotomic search).

  • Returns None if the 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

Like lookup, but

  • Raises Not_found: if the 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 arr finds the index of the object key in the array arr, +provided arr 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 +(dichotomic search).

  • Returns

    • `At i if cmp arr.(i) key = 0 (for some i).
    • `All_lower if all elements of arr are lower than key.
    • `All_bigger if all elements of arr are bigger than key.
    • `Just_after i if arr.(i) < key < arr.(i+1).
    • `Empty if the array is empty.
  • Raises Invalid_argument: if the array is found to be unsorted w.r.t cmp.
  • Since: 0.13
val for_all : f:('a ‑> bool) ‑> 'a t ‑> bool

for_all p [|a1; ...; an|] checks if all elements of the array +satisfy the predicate p. That is, it returns +(p a1) && (p a2) && ... && (p an).

val for_all2 : f:('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Forall on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val exists : f:('a ‑> bool) ‑> 'a t ‑> bool

exists p [|a1; ...; an|] checks if at least one element of +the array satisfies the predicate p. That is, it returns +(p a1) || (p a2) || ... || (p an).

val exists2 : f:('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Exists on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val fold2 : f:('acc ‑> 'a ‑> 'b ‑> 'acc) ‑> init:'acc ‑> 'a t ‑> 'b t ‑> 'acc

Fold on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val iter2 : f:('a ‑> 'b ‑> unit) ‑> 'a t ‑> 'b t ‑> unit

Iterate on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val shuffle : 'a t ‑> unit

Shuffle randomly the array, in place.

val shuffle_with : Random.State.t ‑> 'a t ‑> unit

Like shuffle but using a specialized random state.

val random_choose : 'a t ‑> 'a random_gen

Choose an element randomly.

  • Raises Not_found: if the array/slice is empty.
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of an array.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of an array.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of an array.

IO

val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print an array of items with printing function.

val pp_i : ?⁠sep:string ‑> (int ‑> 'a printer) ‑> 'a t printer

Print an array, giving the printing function both index and item.

val map : f:('a ‑> 'b) ‑> 'a t ‑> 'b t

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 map2 : f:('a ‑> 'b ‑> 'c) ‑> 'a t ‑> 'b t ‑> 'c t

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 they have distinct lengths.
  • Since: 0.20
val rev : 'a t ‑> 'a t

Copy + reverse in place.

  • Since: 0.20
val filter : f:('a ‑> bool) ‑> 'a t ‑> 'a t

Filter elements out of the array. Only the elements satisfying +the given predicate will be kept.

val filter_map : f:('a ‑> 'b option) ‑> 'a t ‑> 'b t

Map each element into another value, or discard it.

val flat_map : f:('a ‑> 'b t) ‑> 'a t ‑> 'b array

Transform each element into an array, then flatten.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Infix version of flat_map.

val (>>|) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Infix version of map.

  • Since: 0.8
val (>|=) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Infix version of map.

  • Since: 0.8
val except_idx : 'a t ‑> int ‑> 'a list

Remove given index, obtaining the list of the other elements.

val (--) : int ‑> int ‑> int t

Range array. Bounds included.

val (--^) : int ‑> int ‑> int t

Range array, excluding right bound.

  • Since: 0.17
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) ‑> 'arr ‑> unit

Sort the array, without allocating (eats stack space though). Performance +might be lower than Array.sort.

  • Since: 0.14
\ No newline at end of file diff --git a/2.1/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html b/2.1/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html new file mode 100644 index 00000000..132c122c --- /dev/null +++ b/2.1/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html @@ -0,0 +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 diff --git a/2.1/containers/CCArray_slice.odoc b/2.1/containers/CCArray_slice.odoc new file mode 100644 index 0000000000000000000000000000000000000000..b95b668c585c0bb6da860a397cbdb3b7e8102fa3 GIT binary patch literal 9619 zcmc&)Yiu0Xb>?H2ajE{xe8>-7VQ*D(5z;6XUVB% zXVx>bq-Yz4TNrR#xaiQX0oHopbNZ4k@a&0|faYaUS<^9^X0VyJyyJ+KtKS@=UpM*Qt+xsjshZ691C;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}l= z+(#(bg*d;`fbFUUH))vc{4fk!`SjJea(}<+1Rv!{3XYm-2yyc zWt&u5F8_cJk)OF1{vSJdB&>I-2gW)bQYAHY1N}CF+$3`(%!ICO+m-Di{^11iy55Ng zwR#;Nhlnko&b#;wiyj0c12%giIr6no0QtLw +CCArray_slice (containers.CCArray_slice)

Module CCArray_slice

Array Slice

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a random_gen = Random.State.t ‑> 'a
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a t

Array slice, containing elements of type 'a.

val empty : 'a t

The empty array slice.

val equal : 'a equal ‑> 'a t equal
val compare : 'a ord ‑> 'a t ord
val get : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to (length a - 1).

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 make : 'a array ‑> int ‑> len:int ‑> 'a t

Create a slice from given offset and length.

  • Raises Invalid_argument: if the slice isn't valid.
val of_slice : ('a array * int * int) ‑> 'a t

Make a sub-array from a triple (arr, i, len) where arr is the array, +i the offset in arr, and len the number of elements of the slice.

  • Raises Invalid_argument: if the slice isn't valid (See make).
val to_slice : 'a t ‑> 'a array * int * int

Convert into a triple (arr, i, len) where len is the length of +the sub-array of arr starting at offset i.

val to_list : 'a t ‑> 'a list

Convert directly to a list.

  • Since: 1.0
val full : 'a array ‑> 'a t

Slice that covers the full array.

val underlying : 'a t ‑> 'a array

Underlying array (shared). Modifying this array will modify the slice.

val copy : 'a t ‑> 'a array

Copy into a new array.

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

Sub-slice.

val set : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to length a - 1.

val length : _ t ‑> int

Return the length (number of elements) of the given array.

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

fold f x a computes f (... (f (f x a.(0)) a.(1)) ...) a.(n-1), +where n is the length of the array a.

val foldi : ('a ‑> int ‑> 'b ‑> 'a) ‑> 'a ‑> 'b t ‑> 'a

Fold left on array, with index.

val fold_while : ('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> 'a ‑> 'b t ‑> 'a

Fold left on array until a stop condition via ('a, `Stop) is +indicated by the accumulator.

  • Since: 0.8
val iter : ('a ‑> unit) ‑> 'a 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 ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like Array.iter, but the +function is applied with the index of the element as first argument, +and the element itself as second argument.

val blit : 'a t ‑> int ‑> 'a t ‑> int ‑> int ‑> unit

blit v1 o1 v2 o2 len copies len elements +from array v1, starting at element number o1, to array v2, +starting at element number o2. It works correctly even if +v1 and v2 are the same array, and the source and +destination chunks overlap.

Raise Invalid_argument "Array.blit" if o1 and len do not +designate a valid subarray of v1, or if o2 and len do not +designate a valid subarray of v2.

val reverse_in_place : 'a t ‑> unit

Reverse the array in place.

val sorted : ('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a array

sorted cmp a makes a copy of a and sorts it with cmp.

  • Since: 1.0
val sort_indices : ('a ‑> 'a ‑> int) ‑> 'a t ‑> int array

sort_indices cmp 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 cmp a +appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices cmp a) = sorted cmp 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 cmp a returns a new array b, with the same length as a, +such that b.(i) is the index at which the i-the element of a appears +in sorted cmp a. a is not modified.

In other words, map (fun i -> (sorted cmp a).(i)) (sort_ranking cmp 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 find : ('a ‑> 'b option) ‑> 'a t ‑> 'b option

find f a returns Some y if there is an element x such +that f x = Some y, else it returns None.

val findi : (int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Like find, but also pass the index to the predicate function.

  • Since: 0.3.4
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.

  • Since: 0.3.4
val lookup : cmp:'a ord ‑> 'a ‑> 'a t ‑> int option

Lookup the index of some value in a sorted array.

  • Returns None if the key is not present, or +Some i (i the index of the key) otherwise.
val lookup_exn : cmp:'a ord ‑> 'a ‑> 'a t ‑> int

Like lookup, but

  • Raises Not_found: if the 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 x arr finds the index of the object x in the array arr, +provided arr 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 +(dichotomic search).

  • Returns

    • `At i if cmp arr.(i) x = 0 (for some i).
    • `All_lower if all elements of arr are lower than x.
    • `All_bigger if all elements of arr are bigger than x.
    • `Just_after i if arr.(i) < x < arr.(i+1).
    • `Empty if the array is empty.
  • Raises Invalid_argument: if the array is found to be unsorted w.r.t cmp.
  • Since: 0.13
val for_all : ('a ‑> bool) ‑> 'a t ‑> bool

for_all p [|a1; ...; an|] checks if all elements of the array +satisfy the predicate p. That is, it returns +(p a1) && (p a2) && ... && (p an).

val for_all2 : ('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Forall on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val exists : ('a ‑> bool) ‑> 'a t ‑> bool

exists p [|a1; ...; an|] checks if at least one element of +the array satisfies the predicate p. That is, it returns +(p a1) || (p a2) || ... || (p an).

val exists2 : ('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Exists on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val fold2 : ('acc ‑> 'a ‑> 'b ‑> 'acc) ‑> 'acc ‑> 'a t ‑> 'b t ‑> 'acc

Fold on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val iter2 : ('a ‑> 'b ‑> unit) ‑> 'a t ‑> 'b t ‑> unit

Iterate on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val shuffle : 'a t ‑> unit

Shuffle randomly the array, in place.

val shuffle_with : Random.State.t ‑> 'a t ‑> unit

Like shuffle but using a specialized random state.

val random_choose : 'a t ‑> 'a random_gen

Choose an element randomly.

  • Raises Not_found: if the array/slice is empty.
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of a slice.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of a slice.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of a slice.

IO

val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print an array of items with printing function.

val pp_i : ?⁠sep:string ‑> (int ‑> 'a printer) ‑> 'a t printer

Print an array, giving the printing function both index and item.

\ No newline at end of file diff --git a/2.1/containers/CCBool.odoc b/2.1/containers/CCBool.odoc new file mode 100644 index 0000000000000000000000000000000000000000..5d765f7e98795da9c46ee007587b8a222574b81e GIT binary patch literal 866 zcma)4O-NKx6dvpjXhOIU(jt8R%{Zd-p7}#T(bcJu7L}q!uH^dWj`Q%%z2kdtMl5jE zqD8^gP$?s>meC?|C`611LqY;A`av*S1ktKMH?|3)^WHSzvc-YRJ>NO!`@VB{jO&d} z;iF;g+T_ERKA$fD;fE-ND9P6AoH@i`)Usy-kw^#UCf3&1`^z_eNBx`S>Q+LKTe-@8 z`=J6l6!bwHF7)|oeDeS5QGt+hsU1tv(m`xPSKKj5Jk4~+;LOGtqe3YI9qD+ST0*-! z({}vB$&u*m;f1s+7kfBxxGV zp%x=%lv_#Sc%y8gjXt??V5w(e=yb)`-b-uK#V{!c5Za-GJ-2J3lifSP&hDO19~Y&p z@1j-)IA$nR&Y+)ProWdo9BHYW*uJtgCuQwLJwbqCpLy0UTU_;D?Ofh;#&+Lhk!`ju zUDdfo)trrC;8Uck37({?Z6rBUN4Pa)r-)7gmN#APA4nT!OpVbvNt=%LYvBb?d@Hnz z|J;1_Zo6ru9Sb?JGLKp-9U(DZ!B{*HVyb4qT@=Q0GW!@sf;vy8h(*C=Q55Xu4lxyO z#i(VlL4`BL1yjQ81_g*1Cb1NUEAo+;o82Q9=exj~D#I8*#V}|dT}IWpC-S==Q`KN{ zZY-^(!)am)q%yuY=<>{jn9+y+t^YBhE1&+Xp z2t-%Fs!9S53Lt-f99<8^y`zCF$bgjRa+(>?IH%-URVpRWm}kl|s*tY8I3)33k$+iD literal 0 HcmV?d00001 diff --git a/2.1/containers/CCBool/.jbuilder-keep b/2.1/containers/CCBool/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCBool/index.html b/2.1/containers/CCBool/index.html new file mode 100644 index 00000000..fb335818 --- /dev/null +++ b/2.1/containers/CCBool/index.html @@ -0,0 +1,2 @@ + +CCBool (containers.CCBool)

Module CCBool

Basic Bool functions

type t = bool
val compare : t ‑> t ‑> int

Total ordering on booleans, similar to Pervasives.compare.

val equal : t ‑> t ‑> bool
val negate : t ‑> t

Negation on booleans (functional version of not).

  • Deprecated since 1.3, simply use not instead.
type 'a printer = Format.formatter ‑> 'a ‑> unit
val pp : t printer
\ No newline at end of file diff --git a/2.1/containers/CCChar.odoc b/2.1/containers/CCCh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DjE0s?JD<) zOw3*KHcGIuI`o*yg`@_{N9OC;jy+gjTXzCl0VN*teZg1iFm@K! z;Xj9X^4}RrC9gJz)gk*sm6DD;0*?y#VQNkSuH6Z()rZ#t7W$5WKV`w9;GqUDiGfo| LWsBNU@Y%ls>Fa6` literal 0 HcmV?d00001 diff --git a/2.1/containers/CCChar/.jbuilder-keep b/2.1/containers/CCChar/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCChar/index.html b/2.1/containers/CCChar/index.html new file mode 100644 index 00000000..34ab697a --- /dev/null +++ b/2.1/containers/CCChar/index.html @@ -0,0 +1,9 @@ + +CCChar (containers.CCChar)

Module CCChar

Utils around char

  • Since: 0.14
include module type of sig ... end
external code : char ‑> int = "%identity"
val chr : int ‑> char
val escaped : char ‑> string
val lowercase : char ‑> char
  • Deprecated Use Char.lowercase_ascii instead.
val uppercase : char ‑> char
  • Deprecated Use Char.uppercase_ascii instead.
val lowercase_ascii : char ‑> char
val uppercase_ascii : char ‑> char
type t = char
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external unsafe_chr : int ‑> char = "%identity"
val equal : t ‑> t ‑> bool

The equal function for chars.

val compare : t ‑> t ‑> int

The comparison function for characters, with the same specification as +Pervasives.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 lowercase_ascii : t ‑> t

Convert the given character to its equivalent lowercase character, +using the US-ASCII character set.

  • Since: 0.20
val uppercase_ascii : t ‑> t

Convert the given character to its equivalent uppercase character, +using the US-ASCII character set.

  • Since: 0.20
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 pp_buf : Buffer.t ‑> t ‑> unit

Renamed from pp since 2.0.

val pp : Format.formatter ‑> t ‑> unit

Renamed from print since 2.0.

\ No newline at end of file diff --git a/2.1/containers/CCEqual.odoc b/2.1/containers/CCEqual.odoc new file mode 100644 index 0000000000000000000000000000000000000000..b15c5d5959502faa4807c47d5380c3cd2a2db8cb GIT binary patch literal 1602 zcma)6L17~YL@@Gad6_qx z?vv`NAZib@4YAmwOskb1M3*221U1k@=|w&0L8%~$hp3t5SRvpM^~qt&877&_UyXYTzIba z^VeLxc{Ovpvc8-^b9LBlPPA@JrY=BQmLIqTgiqgK}C$3%x}>E3&tbc zwygt79d0&Huz>lDhaKw3`rju9wJXnj7T@Mew|;o{tD8za*2KO?13`Fzy=BIIERN!c zI+3i$A6igc|9tuTYqlIT zBJR{2#z`%`con$EYqbvZNiCv23uUyDNQ5Xif$Q|+ZzmwN45o4B~^iTcr3e_U>S zJ2AFP?pr!D5Wg?lQeBo(*=lnVgtyhj-RoAhAV2{*ZV#{Tb^}LH7F5xRZX{5PAi;4E zQ33r{P!#(<5u7>|go8HX#PvuIB30Yo1)c&1$>g>ThWYotly4PVjCtTzTZ0d+W5tkp zu`ao=B7gz&HqxF{TSWArVG6(p*z4AcRWhswe7YQVVo()(nqYoJkb3u_;f}Ccn!`Fc zBJd|+MxcQ47nJT!d(z%snTp_M!K$<-G_G#qsV_~rU@jxALptF}onW0xLvNQ{k6|IL ziuOKjz=5 zYQOnzddp=CQy^sM5ovvrWPi60dBumlnKORM0AHWPn)f3~@w+RKL(uvSbz(>{!XUNK zQJGX%tEm&i&coYmBbO4dJ!43rl_2jhKg68q##ls9$`67^=qwc-V0&0MKUd8!^{@}( z9LcNxoVgV|GuT2UA4fxy4eWJ+i@8X|Ap!7g8B)+Jn#MCq9zm^G3qX0^r5xZI#{v=v zcsJYd2lIgO7>#q;c_TQiQZBm)CQhZjTq-Y|dtydErN*(qr9CYtg~C9i3#%Ivw(mt7 zAcoZtoHkse62=KCX;%5ywOsbglHr0{r}};KYRB)X&g=iK^V)yaF?$BTB=8dh=O0kz Bdk+8r literal 0 HcmV?d00001 diff --git a/2.1/containers/CCEqual/.jbuilder-keep b/2.1/containers/CCEqual/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCEqual/Infix/index.html b/2.1/containers/CCEqual/Infix/index.html new file mode 100644 index 00000000..a69ba8ed --- /dev/null +++ b/2.1/containers/CCEqual/Infix/index.html @@ -0,0 +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 diff --git a/2.1/containers/CCEqual/index.html b/2.1/containers/CCEqual/index.html new file mode 100644 index 00000000..77d10d54 --- /dev/null +++ b/2.1/containers/CCEqual/index.html @@ -0,0 +1,7 @@ + +CCEqual (containers.CCEqual)

Module CCEqual

Equality Combinators

  • Since: 1.2
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 (>|=) : 'b t ‑> ('a ‑> 'b) ‑> 'a t

Infix equivalent of map.

module Infix : sig ... end
\ No newline at end of file diff --git a/2.1/containers/CCFloat.odoc b/2.1/containers/CCFloat.odoc new file mode 100644 index 0000000000000000000000000000000000000000..a374701f1c3a58d8a4ccc3c717492b7a50386b2c GIT binary patch literal 4264 zcma)9e~c7Y9pBx16FE>yjIESfeaGzH&fe|q?j0wk2z21!D7L+${4fF2oO83Yw^L?k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BW$d3wZMB*hLW)DvAsKl4UI zxS$TX9ru}*C6t3M3XK+^+&$FjIM!H`YffWmrg83?sZGr!n8EzyYS7oPW{)@eb)!s& zEbvyS(N*pP7x3no8Qcf$6UT@cjxsZQMP3+qCX(z-wri$Uap4x42ENoa2o+dX;G4{=Fs}2wLhHF= zdxX%tQ&)su>(}cETu%a+_-x&PySF8cDLx0MnqfgiQmieAof?GEJr)7}~D$;+Q#} z51eV3U&QR0#&q0FgPZsmMT-rZ5LRr*rzWtMO6p2J)*!0XcBy8YRCA|FHp7fd2IqmJ zvx|U1Kkj7D9*4hepo28u24|N5{4_i)01!wuJ=H3kR%>Ntb_%9!)@cC8)3By7{K#_i z_cHU*m*dK;Ib*=ZbR*Tw=kUWEK226;je%YsGGD>b!yJ95tc=C`{t#_*^glTIK2T*W z%^wco-(~Qc8V+~k%AB#_>q7X?I9$xjYhyrM}O}|HaAwDl1uT>U^`8)z&Ce(KtbfKFbKv4RF1{M52;SLlSx_ zkkGfP>!8%PN$44vzQ|liNGXbFdP(R7*pZ?U^bubUp-bo@dXFy-qqoqTXqYdKpcCjg zI>HyPpx>ew&>&y@3GGI|LOb~46ugx-qqThT23mu@k5===S>z!X-Om?qBOP_4m3;9I M>O>vzz);oy0prVcNdN!< literal 0 HcmV?d00001 diff --git a/2.1/containers/CCFloat/.jbuilder-keep b/2.1/containers/CCFloat/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCFloat/Infix/index.html b/2.1/containers/CCFloat/Infix/index.html new file mode 100644 index 00000000..6d8c0861 --- /dev/null +++ b/2.1/containers/CCFloat/Infix/index.html @@ -0,0 +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 diff --git a/2.1/containers/CCFloat/index.html b/2.1/containers/CCFloat/index.html new file mode 100644 index 00000000..8b74ab5b --- /dev/null +++ b/2.1/containers/CCFloat/index.html @@ -0,0 +1,8 @@ + +CCFloat (containers.CCFloat)

Module CCFloat

Basic operations on floating-point numbers

  • Since: 0.6.1
type t = float
type fpclass = Pervasives.fpclass =
| FP_normal
| FP_subnormal
| FP_zero
| FP_infinite
| FP_nan
val nan : t

Equal to Pervasives.nan.

val max_value : t

Positive infinity. Equal to Pervasives.infinity.

val min_value : t

Negative infinity. Equal to Pervasives.neg_infinity.

val max_finite_value : t

Equal to Pervasives.max_float.

val epsilon : t

The smallest positive float x such that 1.0 +. x <> 1.0. +Equal to Pervasives.epsilon_float.

val is_nan : t ‑> bool

is_nan f returns true if f is NaN, false otherwise.

val add : t ‑> t ‑> t

Equal to (+.).

val sub : t ‑> t ‑> t

Equal to (-.).

val neg : t ‑> t

Equal to (~-.).

val abs : t ‑> t

The absolute value of a floating-point number. +Equal to Pervasives.abs_float.

val scale : t ‑> t ‑> t

Equal to ( *. ).

val min : t ‑> t ‑> t
val max : t ‑> t ‑> t
val equal : t ‑> t ‑> bool
val compare : t ‑> t ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = 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 f returns the closest integer value, either above or below.

  • 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 : string ‑> t

Alias to float_of_string.

  • Deprecated since 1.2, use of_string_exn instead.
  • Raises Failure: in case of failure.
val equal_precision : epsilon:t ‑> t ‑> t ‑> bool

Equality with allowed error up to a non negative epsilon value.

val classify : t ‑> fpclass

Return the class of the given floating-point number: +normal, subnormal, zero, infinite or nan (not a number).

Infix Operators

  • Since: 0.17
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 diff --git a/2.1/containers/CCFormat.odoc b/2.1/containers/CCFormat.odoc new file mode 100644 index 0000000000000000000000000000000000000000..993e0ef84dd433166efeeb9b21d5e467bdfd4906 GIT binary patch literal 18641 zcmcIs3wRsVv9{!0$x@t$V^dxqbS>Mm<=C?0I3bDiP!jSguRsF1B_w7ot!!ag5?U#a z385ECfj%f}5<-C%#3O`K3L%tIxCK%urL?p>OKuBXD22X&0Jk^oEwuE`oSCz`vJ(jX zZrjgjwdbEXb7tnu%y}r;L^j?&J=z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&#;IRWN z=CQPfMfbsr>m^H0ghD&oG96Crw64z1$U$}m4#G$raB5Vnx8NBXW;NK9$fhF^86`Ds z-T6?&!|5DuI%r)m5?qI_@6p!bU$^~2JAb_>8X-wQG$~o{-lW#PB{U5Va~J>n7y-QQ zQhVPXurcoS!9R}y1`GK48&*-u(R9s3t$hO8b}04A5oFCrsb*9nbhD&(FEqm)NMY%3 za@#EXVoB}m*nBiKS8($ZzE@KF9yW>tN)^0UqJ z8y8a}T%i;qpTidc)Vd?El};Y32Do*Y&-~T8CTu-R&{l2W){C7(drPhBLPUxXYZx)g zC*ySsMTAs_g|-m5MF6XJkotrux5)$WI{GoW@>LtXjo4PW&<}^{coupdBId*knSV>b z{o7se7x2&1pDpd)ViAq{i2KVH9<-5{{YY8)Kq!L z;UeBqE#^6v4^8Wy6a?^(T{xUn&jg2+>cN9T`GXVBk?@6%M?Ie|=PVkS`>AlSBmP|) zweBCx|2Sx;-3!nB5{9_L>KTL$LPvG2ay{c2Y9s5=4osP{D;(DC(8r|?0H&O?HRQRNI|UiBv$_n32-6Mz{txk_4sQSe literal 0 HcmV?d00001 diff --git a/2.1/containers/CCFormat/.jbuilder-keep b/2.1/containers/CCFormat/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCFormat/Dump/index.html b/2.1/containers/CCFormat/Dump/index.html new file mode 100644 index 00000000..b488489f --- /dev/null +++ b/2.1/containers/CCFormat/Dump/index.html @@ -0,0 +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.result t
val result' : 'a t ‑> 'e t ‑> ('a'e) Result.result t
val to_string : 'a t ‑> 'a ‑> string
\ No newline at end of file diff --git a/2.1/containers/CCFormat/index.html b/2.1/containers/CCFormat/index.html new file mode 100644 index 00000000..cdb21fb0 --- /dev/null +++ b/2.1/containers/CCFormat/index.html @@ -0,0 +1,44 @@ + +CCFormat (containers.CCFormat)

Module CCFormat

Helpers for Format

  • Since: 0.8
type 'a sequence = ('a ‑> unit) ‑> unit
include module type of sig ... end
type formatter = Format.formatter
val pp_open_box : formatter ‑> int ‑> unit
val open_box : int ‑> unit
val pp_close_box : formatter ‑> unit ‑> unit
val close_box : unit ‑> unit
val pp_open_hbox : formatter ‑> unit ‑> unit
val open_hbox : unit ‑> unit
val pp_open_vbox : formatter ‑> int ‑> unit
val open_vbox : int ‑> unit
val pp_open_hvbox : formatter ‑> int ‑> unit
val open_hvbox : int ‑> unit
val pp_open_hovbox : formatter ‑> int ‑> unit
val open_hovbox : int ‑> unit
val pp_print_string : formatter ‑> string ‑> unit
val print_string : string ‑> unit
val pp_print_as : formatter ‑> int ‑> string ‑> unit
val print_as : int ‑> string ‑> unit
val pp_print_int : formatter ‑> int ‑> unit
val print_int : int ‑> unit
val pp_print_float : formatter ‑> float ‑> unit
val print_float : float ‑> unit
val pp_print_char : formatter ‑> char ‑> unit
val print_char : char ‑> unit
val pp_print_bool : formatter ‑> bool ‑> unit
val print_bool : bool ‑> unit
val pp_print_space : formatter ‑> unit ‑> unit
val print_space : unit ‑> unit
val pp_print_cut : formatter ‑> unit ‑> unit
val print_cut : unit ‑> unit
val pp_print_break : formatter ‑> int ‑> int ‑> unit
val print_break : int ‑> int ‑> unit
val pp_force_newline : formatter ‑> unit ‑> unit
val force_newline : unit ‑> unit
val pp_print_if_newline : formatter ‑> unit ‑> unit
val print_if_newline : unit ‑> unit
val pp_print_flush : formatter ‑> unit ‑> unit
val print_flush : unit ‑> unit
val pp_print_newline : formatter ‑> unit ‑> unit
val print_newline : unit ‑> unit
val pp_set_margin : formatter ‑> int ‑> unit
val set_margin : int ‑> unit
val pp_get_margin : formatter ‑> unit ‑> int
val get_margin : unit ‑> int
val pp_set_max_indent : formatter ‑> int ‑> unit
val set_max_indent : int ‑> unit
val pp_get_max_indent : formatter ‑> unit ‑> int
val get_max_indent : unit ‑> int
val pp_set_max_boxes : formatter ‑> int ‑> unit
val set_max_boxes : int ‑> unit
val pp_get_max_boxes : formatter ‑> unit ‑> int
val get_max_boxes : unit ‑> int
val pp_over_max_boxes : formatter ‑> unit ‑> bool
val over_max_boxes : unit ‑> bool
val pp_open_tbox : formatter ‑> unit ‑> unit
val open_tbox : unit ‑> unit
val pp_close_tbox : formatter ‑> unit ‑> unit
val close_tbox : unit ‑> unit
val pp_set_tab : formatter ‑> unit ‑> unit
val set_tab : unit ‑> unit
val pp_print_tab : formatter ‑> unit ‑> unit
val print_tab : unit ‑> unit
val pp_print_tbreak : formatter ‑> int ‑> int ‑> unit
val print_tbreak : int ‑> int ‑> unit
val pp_set_ellipsis_text : formatter ‑> string ‑> unit
val set_ellipsis_text : string ‑> unit
val pp_get_ellipsis_text : formatter ‑> unit ‑> string
val get_ellipsis_text : unit ‑> string
type tag = string
val pp_open_tag : formatter ‑> string ‑> unit
val open_tag : tag ‑> unit
val pp_close_tag : formatter ‑> unit ‑> unit
val close_tag : unit ‑> unit
val pp_set_tags : formatter ‑> bool ‑> unit
val set_tags : bool ‑> unit
val pp_set_print_tags : formatter ‑> bool ‑> unit
val set_print_tags : bool ‑> unit
val pp_set_mark_tags : formatter ‑> bool ‑> unit
val set_mark_tags : bool ‑> unit
val pp_get_print_tags : formatter ‑> unit ‑> bool
val get_print_tags : unit ‑> bool
val pp_get_mark_tags : formatter ‑> unit ‑> bool
val get_mark_tags : unit ‑> bool
val pp_set_formatter_out_channel : formatter ‑> Pervasives.out_channel ‑> unit
val set_formatter_out_channel : Pervasives.out_channel ‑> unit
val pp_set_formatter_output_functions : formatter ‑> (string ‑> int ‑> int ‑> unit) ‑> (unit ‑> unit) ‑> unit
val set_formatter_output_functions : (string ‑> int ‑> int ‑> unit) ‑> (unit ‑> unit) ‑> unit
val pp_get_formatter_output_functions : formatter ‑> unit ‑> (string ‑> int ‑> int ‑> unit) * (unit ‑> unit)
val get_formatter_output_functions : unit ‑> (string ‑> int ‑> int ‑> unit) * (unit ‑> unit)
type formatter_out_functions = Format.formatter_out_functions = {
out_string : string ‑> int ‑> int ‑> unit;
out_flush : unit ‑> unit;
out_newline : unit ‑> unit;
out_spaces : int ‑> unit;
out_indent : int ‑> unit;
}
val pp_set_formatter_out_functions : formatter ‑> formatter_out_functions ‑> unit
val set_formatter_out_functions : formatter_out_functions ‑> unit
val pp_get_formatter_out_functions : formatter ‑> unit ‑> formatter_out_functions
val get_formatter_out_functions : unit ‑> formatter_out_functions
type formatter_tag_functions = Format.formatter_tag_functions = {
mark_open_tag : tag ‑> string;
mark_close_tag : tag ‑> string;
print_open_tag : tag ‑> unit;
print_close_tag : tag ‑> unit;
}
val pp_set_formatter_tag_functions : formatter ‑> formatter_tag_functions ‑> unit
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
val formatter_of_out_channel : Pervasives.out_channel ‑> formatter
val std_formatter : formatter
val err_formatter : formatter
val formatter_of_buffer : Buffer.t ‑> formatter
val stdbuf : Buffer.t
val str_formatter : formatter
val flush_str_formatter : unit ‑> string
val make_formatter : (string ‑> int ‑> int ‑> unit) ‑> (unit ‑> unit) ‑> formatter
val formatter_of_out_functions : formatter_out_functions ‑> formatter
type symbolic_output_item = Format.symbolic_output_item =
| Output_flush
| Output_newline
| Output_string of string
| Output_spaces of int
| Output_indent of int
type symbolic_output_buffer = Format.symbolic_output_buffer
val make_symbolic_output_buffer : unit ‑> symbolic_output_buffer
val clear_symbolic_output_buffer : symbolic_output_buffer ‑> unit
val get_symbolic_output_buffer : symbolic_output_buffer ‑> symbolic_output_item list
val flush_symbolic_output_buffer : symbolic_output_buffer ‑> symbolic_output_item list
val add_symbolic_output_item : symbolic_output_buffer ‑> symbolic_output_item ‑> unit
val formatter_of_symbolic_output_buffer : symbolic_output_buffer ‑> formatter
val pp_print_list : ?⁠pp_sep:(formatter ‑> unit ‑> unit) ‑> (formatter ‑> 'a ‑> unit) ‑> formatter ‑> 'a list ‑> unit
val pp_print_text : formatter ‑> string ‑> unit
val fprintf : formatter ‑> ('aformatter, unit) Pervasives.format ‑> 'a
val printf : ('aformatter, unit) Pervasives.format ‑> 'a
val eprintf : ('aformatter, unit) Pervasives.format ‑> 'a
val sprintf : ('a, unit, string) Pervasives.format ‑> 'a
val asprintf : ('aformatter, unit, string) Pervasives.format4 ‑> 'a
val ifprintf : formatter ‑> ('aformatter, unit) Pervasives.format ‑> 'a
val kfprintf : (formatter ‑> 'a) ‑> formatter ‑> ('bformatter, unit, 'a) Pervasives.format4 ‑> 'b
val ikfprintf : (formatter ‑> 'a) ‑> formatter ‑> ('bformatter, unit, 'a) Pervasives.format4 ‑> 'b
val ksprintf : (string ‑> 'a) ‑> ('b, unit, string, 'a) Pervasives.format4 ‑> 'b
val kasprintf : (string ‑> 'a) ‑> ('bformatter, unit, 'a) Pervasives.format4 ‑> 'b
val bprintf : Buffer.t ‑> ('aformatter, unit) Pervasives.format ‑> 'a
val kprintf : (string ‑> 'a) ‑> ('b, unit, string, 'a) Pervasives.format4 ‑> 'b
  • Deprecated Use Format.ksprintf instead.
val set_all_formatter_output_functions : out:(string ‑> int ‑> int ‑> unit) ‑> flush:(unit ‑> unit) ‑> newline:(unit ‑> unit) ‑> spaces:(int ‑> unit) ‑> unit
  • Deprecated Use Format.set_formatter_out_functions instead.
val get_all_formatter_output_functions : unit ‑> (string ‑> int ‑> int ‑> unit) * (unit ‑> unit) * (unit ‑> unit) * (int ‑> unit)
  • Deprecated Use Format.get_formatter_out_functions instead.
val pp_set_all_formatter_output_functions : formatter ‑> out:(string ‑> int ‑> int ‑> unit) ‑> flush:(unit ‑> unit) ‑> newline:(unit ‑> unit) ‑> spaces:(int ‑> unit) ‑> unit
  • Deprecated Use Format.pp_set_formatter_out_functions instead.
val pp_get_all_formatter_output_functions : formatter ‑> unit ‑> (string ‑> int ‑> int ‑> unit) * (unit ‑> unit) * (unit ‑> unit) * (int ‑> unit)
  • Deprecated Use Format.pp_get_formatter_out_functions instead.
type t = Format.formatter
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 newline : unit printer

Force newline (see Format.pp_force_newline).

  • Since: 1.2
val substring : (string * int * int) printer

Print 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 char : char printer
  • Since: 0.14
val int32 : int32 printer
  • Since: 0.14
  • Since: 0.14
val int64 : int64 printer
  • Since: 0.14
  • Since: 0.14
val nativeint : nativeint printer
  • Since: 0.14
  • 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 sequence 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 ‑> 'a printer ‑> 'b printer ‑> 'c printer ‑> 'd printer ‑> ('a * 'b * 'c * 'd) printer
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) Pervasives.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 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;;
+
+      Format.printf
+        "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 ‑> ('at, unit, unit) Pervasives.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 ‑> ('at, unit, string) Pervasives.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 ‑> ('at, unit, 'b) Pervasives.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

IO

val output : t ‑> 'a printer ‑> 'a ‑> unit
val to_string : 'a printer ‑> 'a ‑> string
val of_chan : Pervasives.out_channel ‑> t

Alias to Format.formatter_of_out_channel.

  • Since: 1.2
val with_out_chan : Pervasives.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 : ('at, unit, string) Pervasives.format4 ‑> 'a

Print into a string any format string that would usually be compatible +with fprintf. Like Format.asprintf.

val sprintf_no_color : ('at, unit, string) Pervasives.format4 ‑> 'a

Like sprintf but never prints colors.

  • Since: 0.16
val sprintf_dyn_color : colors:bool ‑> ('at, unit, string) Pervasives.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 ‑> ('at, unit) Pervasives.format ‑> 'a

Alias to Format.fprintf.

  • Since: 0.14
val fprintf_dyn_color : colors:bool ‑> t ‑> ('at, unit) Pervasives.format ‑> 'a

Like fprintf but enable/disable colors depending on colors.

  • Since: 0.21
val ksprintf : ?⁠margin:int ‑> f:(string ‑> 'b) ‑> ('a, Format.formatter, unit, 'b) Pervasives.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 ‑> ('at, unit, unit) Pervasives.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
\ No newline at end of file diff --git a/2.1/containers/CCFun.odoc b/2.1/containers/CCFun.odoc new file mode 100644 index 0000000000000000000000000000000000000000..81786fc98eed8a0406fca7389d2a13bc72ae21c9 GIT binary patch literal 3536 zcmbtXU1%KF6<*1s)GIf}4=pJH)4S2GcGuR<{x~U$6^l_eacW42Y28q0UH59{j`r5G zGut~emNqyc4~4$;VdRhm8feE((&nMKLVhp=QrxCAX+( zv(kzrxKwDhckaD&&iT&y?su*NC$L*xvuAdG^wKYWQ!15e_{`z+C47$UoUj8w;?fr? zyk6_~&&Iyh>3=-?roa2&!$1D+Z~t`YzL~eP7w;XHN{3!6m5$s~DwY3zxKyf^(z|-y zm`&33_L`L@?MHbiZ3ZWHBm+OREXz2YrmcSeslX40ff@~@opk4nN}+kp~ojn{xuZ+cNQD?zOC>{mMWa;+e7Q4F2+%)Mh8M0^~SjdNh@epeZF560zifLK9R#M@+ z*;i6o$FDa2MBNUCqaYMyztz`cNtqLX&B6`!?c~x z*xH3(n7Onr{a^$~+uhu7Hbdqo#+TjLXIpH{TB~rX{m|brysen?k8kne$P=tF;wqBd zV}WvnYM!1?x69|Alwo9sfr?n;fc-FH{r)*WGHISG(PZE0F0n|(VukgVn9IEoBTVVh zMGY){aiL>=4GB8{j~*u&r+{9sHfmX+nrog!{-c1hmB(_I+4^0zVOdn|?M0Va7Nz|& z>$<$e*5imNxiN@ZJPZR{@(3g~Egk$rQ^BMBMbZEMfOM$dy>pK6BN>eulCIBBK@@D( zwfm?BzJ?KPE(S(EKx8;{rzV&qqeC{}*RWE3)2D$H=T5f5SCL~%d?n9+4T zLy(%x4HV=47zwJ3i_~a_>g;Oob2G=Pt|y5xN%^5~h$~POp$V?5&H{Jh13t+f1H-sF z07utof7L)#oeWLSxtWtSJ639}y{z{GA8ru*9>z^5$bfO%79(KeY{aFS_6->cKKqSm z6N`B+LQ2L-?GLO6%_qFCyR5ObL^RJ%>#p@8h8&-DM4O$c0tA(2ZstNAMVmzK+(qP5 zk+9E?`crUH?CsnqqR+$4MWL3%DWc!2C1Rg~l12aALd3Ne)bUNZNRyLHT;X2KBe5r4 zk1R1qhBj9YQ442wAp8l}z#Y6+UNqUaLgB{Vy!5F)P)I1dz-b02BzVVtTR}C(mEDveJH3cj3YF=tym! z%*Sj%Evn7{+@tbV0S&myUxx}flZujhC=sF^n(Um5iZjJ!C_-KMdEM8<79B(iAI(Uw zIxDC$OJBFrWC4i3XZ*dyjfw`;`ff=5>ERb5Q zCJ$uA87cG|A9OtH@!`6IexQOOi$m#e6gw~0!+BiZBv?XpB(({^%%OaiHc3#p;pQ*H z2TGN%>N>Zj50RpcBXn+3uBYin%2v;?2hGl@W>LoFX)T$(Q;vE^p4)t z4r*yQ2sq`7OH4$zzLxaNE)d~(&CS#cMag@GK3P9a0POaoIK(yF;JIU^7?xKi7ksuU zBXncjF}84)onVOnG|*lJ!!?^zlkn+8p+nn2wg@##lMipq9Xg&FOj66*zLD(QGRkX} zZ*Qm9?z~}qp%Nv=(L4C(0Y8bAO@4(Y@4J(x2#=;I>Nk^H#^RcByb_TTz%pIXTZ`G{ z2Z1LI9W?$U!Tl|p#p}hb3aH;OETf?<>Q|qrHCC^lX(q+ZGuK?dZb}qPmLEWLs`}*bhIqt literal 0 HcmV?d00001 diff --git a/2.1/containers/CCFun/.jbuilder-keep b/2.1/containers/CCFun/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCFun/Monad/argument-1-X/index.html b/2.1/containers/CCFun/Monad/argument-1-X/index.html new file mode 100644 index 00000000..2aecaebc --- /dev/null +++ b/2.1/containers/CCFun/Monad/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.CCFun.Monad.1-X)

Parameter CCFun.Monad.1-X

type t
\ No newline at end of file diff --git a/2.1/containers/CCFun/Monad/index.html b/2.1/containers/CCFun/Monad/index.html new file mode 100644 index 00000000..67350d69 --- /dev/null +++ b/2.1/containers/CCFun/Monad/index.html @@ -0,0 +1,2 @@ + +Monad (containers.CCFun.Monad)

Module CCFun.Monad

Parameters

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 diff --git a/2.1/containers/CCFun/index.html b/2.1/containers/CCFun/index.html new file mode 100644 index 00000000..744a839b --- /dev/null +++ b/2.1/containers/CCFun/index.html @@ -0,0 +1,18 @@ + +CCFun (containers.CCFun)

Module CCFun

Basic Functions

val (|>) : 'a ‑> ('a ‑> 'b) ‑> 'b

A 'pipe' operator. x |> f is the same as f x.

val compose : ('a ‑> 'b) ‑> ('b ‑> 'c) ‑> 'a ‑> 'c

Composition. compose f g x is g (f x).

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 (%>) : ('a ‑> 'b) ‑> ('b ‑> 'c) ‑> 'a ‑> 'c

Alias to compose.

val (@@) : ('a ‑> 'b) ‑> 'a ‑> 'b

f @@ x is the same as f x, but right-associative.

  • Since: 0.5
val id : 'a ‑> 'a

Identity function.

val const : 'a ‑> 'b ‑> 'a

Produce a function that just returns its first argument. +const x y = x for any y.

val flip : ('a ‑> 'b ‑> 'c) ‑> 'b ‑> 'a ‑> 'c

Reverse the order of arguments for a binary function.

val curry : (('a * 'b) ‑> 'c) ‑> 'a ‑> 'b ‑> 'c

Convert a function which accepts a pair of arguments into a function which accepts two arguments. +curry f x y is f (x,y).

val uncurry : ('a ‑> 'b ‑> 'c) ‑> ('a * 'b) ‑> 'c

Convert a function which accepts a two arguments into a function which accepts a pair of arguments. +uncurry f (x,y) is f x y.

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 Pervasives.compare
val (%) : ('b ‑> 'c) ‑> ('a ‑> 'b) ‑> 'a ‑> 'c

Mathematical composition. (%) f g x is f (g x).

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.

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.

  • 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.

  • 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

Monad

Functions with a fixed domain are monads in their codomain.

module Monad : functor (X : sig ... end) -> sig ... end
\ No newline at end of file diff --git a/2.1/containers/CCHash.odoc b/2.1/containers/CCHash.odoc new file mode 100644 index 0000000000000000000000000000000000000000..d9dad901437ff604c534f8fc1420c7d2f2ebe897 GIT binary patch literal 2950 zcmb_eYm5{{5Z=eE!jh0PDnXOeK6Y>K!QJfM6A(z|I8ZS164XQzpl`SDc5<^b>&)!I z5;QS^A0+%3ARG#jjJ#rq!a-tC@q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NVb=pT7_#o9v<5DkpJD!XT(m#@~yn8 z|7(o(7~>+H^x;wX--3*3<3YxfB1j^GoVXNw;La9Z_O3^O*w#I8_2AP055RAt7-Nl` zL=K*S6%m(LBDP#+f4o_OI)g;)UTOH8T)NmgzN4}A()g@0?gHbP(zvLMEhUr%%9E(8 z3e^p$c8PjX8NaNA?Mm1o;5#M!rh@mtNqSB;xa$J*Zx0!<~?bjn=**)K-k9 zEAY-iHZ6hA2@YGG8e%pePShgMdPCHPv>s|4=8ZfNyKuMtY-2Ah+NsnE(}EY| zsdPWSr({ +CCHash (containers.CCHash)

Module CCHash

Hash combinators

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 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 if_ : bool ‑> 'a t ‑> 'a t ‑> 'a t

Decide which hash function to use depending on the boolean.

val poly : 'a t

The regular polymorphic hash function. +poly x is Hashtbl.hash x.

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 sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
val seq : 'a t ‑> 'a sequence t
val gen : 'a t ‑> 'a gen t
val klist : 'a t ‑> 'a klist t
\ No newline at end of file diff --git a/2.1/containers/CCHashtbl.odoc b/2.1/containers/CCHashtbl.odoc new file mode 100644 index 0000000000000000000000000000000000000000..3e67b9d29e8c50fcfb06533154f253ed7958e821 GIT binary patch literal 9687 zcmeHN4Uk+_m7dpq?@YSIz*-BzpU9g`&tEdr(-UGsh*>&}PKX%Aoh+;+Fudu0oq108 zd(C^VXBgKF?k=lVEvv6p1`!uueuzrJCSqk%DvPtED8K@hAW`v;Qg_S3-7Kt2x%}^U z&V8@DCrsF^MujR;c~kf2+;h+WIrq#sMW--0oL!yGU31;uJKNgY`teD8r{nvh{VNNO z?HiVDy57$Ik&z1wZ_=MA=X3Var`o&M5B~CkgIE0bub%z+57goA54N?X545$N<+QcE z=|@Z2+A?k738N5+APf&~%7;O!^X*sprtMjdt^1DdPnx>t8+Orfi+W5!KKx`?F1sc# zUK55r=hsRl(+zT;y>adO!y9Kt@4oVZ$45th*&l|3BO_ZK+o?Eibln2GVI0SZ@^n{=@74^|XQIYx+L%pC9=Ct}yKWv%;hS^50wD;+=Wmko=3yUpeCM zc=Ew~uz#)R7KRFrYYsJpp9Q(8p`l5qVh(v$#j%HG9CymA8U+)Ov9^ZBCu&x?I8-!C zMy>4UuKD<-H>B2`df^N5&UZb!?_(El$_L>m=5H1o`#kf?nrRozAk63I!!YPH^7(vl zd;a!3hI@iwE>p8DKaY`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8 zqZdnmKP@&;kUU6|`U7>?I-ZW%N6(sMqJ+J#>2+fLtF5(@-dZEIx2rg#`e|f}$&@Mu zWa`X@d8X70n7cv@vz!%_`jYYjvG3KsS|qe2+J~@Tk`(%rEGsLIm8R%inzDDxHbh_J3LB17HO+VIUh30zl(#Sytknv`AxOAlUMS2DZfU46e80*GFy!)v_;aJ>brvd zUlvO?b^duvvt=dy4&N+po2{Dp-RQXOk!id@-Wu-Q8RV(`GLNp@9&CJBoV7_T>%?Ej b@K&ea=)hpRrKP8C6KC+R+vzWN)W81)MCDeZ literal 0 HcmV?d00001 diff --git a/2.1/containers/CCHashtbl/.jbuilder-keep b/2.1/containers/CCHashtbl/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCHashtbl/Poly/index.html b/2.1/containers/CCHashtbl/Poly/index.html new file mode 100644 index 00000000..a3321b61 --- /dev/null +++ b/2.1/containers/CCHashtbl/Poly/index.html @@ -0,0 +1,21 @@ + +Poly (containers.CCHashtbl.Poly)

Module CCHashtbl.Poly

val get : ('a'b) Hashtbl.t ‑> 'a ‑> 'b option

Safe version of Hashtbl.find.

val get_or : ('a'b) 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) Hashtbl.t ‑> 'a sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : ('a'b) Hashtbl.t ‑> 'b sequence

Iterate on values in the table.

val keys_list : ('a'b) Hashtbl.t ‑> 'a list

keys_list t is the list of keys in t. +If the key is in the Hashtable multiple times, all occurrences will be returned.

  • Since: 0.8
val values_list : ('a'b) Hashtbl.t ‑> 'b list

values_list t is the list of values in t.

  • Since: 0.8
val map_list : ('a ‑> 'b ‑> 'c) ‑> ('a'b) Hashtbl.t ‑> 'c list

Map on a hashtable's items, collect into a list.

val incr : ?⁠by:int ‑> ('a, int) 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) Hashtbl.t ‑> 'a ‑> unit

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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) sequence

Iterate on bindings in the table.

val add_list : ('a'b list) 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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val of_seq : ('a * 'b) sequence ‑> ('a'b) Hashtbl.t

From the given bindings, added in order.

val add_seq_count : ('a, int) Hashtbl.t ‑> 'a sequence ‑> 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.

  • Since: 0.16
val of_seq_count : 'a sequence ‑> ('a, int) Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : ('a'b) Hashtbl.t ‑> ('a * 'b) list

List of bindings (order unspecified).

val of_list : ('a * 'b) list ‑> ('a'b) Hashtbl.t

Build a table from the given list 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 update : ('a'b) 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) 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 : 'a printer ‑> 'b printer ‑> ('a'b) Hashtbl.t printer
\ No newline at end of file diff --git a/2.1/containers/CCHashtbl/index.html b/2.1/containers/CCHashtbl/index.html new file mode 100644 index 00000000..8ebc49c4 --- /dev/null +++ b/2.1/containers/CCHashtbl/index.html @@ -0,0 +1,21 @@ + +CCHashtbl (containers.CCHashtbl)

Module CCHashtbl

Extension to the standard Hashtbl

  • Since: 0.4
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a eq = 'a ‑> 'a ‑> bool
type 'a hash = 'a ‑> int
type 'a printer = 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) Hashtbl.t ‑> 'a ‑> 'b option

Safe version of Hashtbl.find.

val get_or : ('a'b) 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) Hashtbl.t ‑> 'a sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : ('a'b) Hashtbl.t ‑> 'b sequence

Iterate on values in the table.

val keys_list : ('a'b) Hashtbl.t ‑> 'a list

keys_list t is the list of keys in t. +If the key is in the Hashtable multiple times, all occurrences will be returned.

  • Since: 0.8
val values_list : ('a'b) Hashtbl.t ‑> 'b list

values_list t is the list of values in t.

  • Since: 0.8
val map_list : ('a ‑> 'b ‑> 'c) ‑> ('a'b) Hashtbl.t ‑> 'c list

Map on a hashtable's items, collect into a list.

val incr : ?⁠by:int ‑> ('a, int) 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) Hashtbl.t ‑> 'a ‑> unit

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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) sequence

Iterate on bindings in the table.

val add_list : ('a'b list) 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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val of_seq : ('a * 'b) sequence ‑> ('a'b) Hashtbl.t

From the given bindings, added in order.

val add_seq_count : ('a, int) Hashtbl.t ‑> 'a sequence ‑> 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.

  • Since: 0.16
val of_seq_count : 'a sequence ‑> ('a, int) Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : ('a'b) Hashtbl.t ‑> ('a * 'b) list

List of bindings (order unspecified).

val of_list : ('a * 'b) list ‑> ('a'b) Hashtbl.t

Build a table from the given list 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 update : ('a'b) 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) 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 : 'a printer ‑> 'b printer ‑> ('a'b) Hashtbl.t printer

Functor

module type S : sig ... end
module Make : functor (X : Hashtbl.HashedType) -> S with type Make.key = X.t and type 'a Make.t = 'a Hashtbl.Make(X).t
\ No newline at end of file diff --git a/2.1/containers/CCHashtbl/module-type-S/index.html b/2.1/containers/CCHashtbl/module-type-S/index.html new file mode 100644 index 00000000..54d7a5df --- /dev/null +++ b/2.1/containers/CCHashtbl/module-type-S/index.html @@ -0,0 +1,21 @@ + +S (containers.CCHashtbl.S)

Module type CCHashtbl.S

include Hashtbl.S
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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> Hashtbl.statistics
val get : 'a t ‑> key ‑> 'a option

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

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 sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : 'a t ‑> 'a sequence

Iterate on values in the table.

val keys_list : _ t ‑> key list

keys_list t is the list of keys in t. +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_seq : 'a t ‑> (key * 'a) sequence

Iterate on values in the table.

val of_seq : (key * 'a) sequence ‑> 'a t

From the given bindings, added in order.

val add_seq : 'a t ‑> (key * 'a) sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val add_seq_count : int t ‑> key sequence ‑> 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.

  • Since: 0.16
val of_seq_count : key sequence ‑> int t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : 'a t ‑> (key * 'a) list

List of bindings (order unspecified).

val of_list : (key * 'a) list ‑> 'a t

Build a table from the given list 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 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 : key printer ‑> 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/2.1/containers/CCHeap.odoc b/2.1/containers/CCHeap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..bc90042105d0282027e0115a26a3f5584882d912 GIT binary patch literal 6505 zcmbVQ3vd(rvHqvGo(KdUtYH(}6{Y zPc}83sPg^VDN|-zrj@bmY=@EX>b{=S8(%;Bp@Ya6cpEO0wqz%*6ZBt7( zS$0Nq8#TvBI9^@%b3eae_x$HOr;hr#<;H^#Q%_vLtGn!y`Hw`K*33OwF@5g*-yM0u z_p9gV_F`0AtfS_7^7juPK0dtWigA^zzF7MHCf_f+A<>~B#GBL2&d3+`!=2Ojyyq_a z`W@Bl9qZVMc*3&vI43oRc!tE|9act14Hpj$%Ow;;n5tBb|&V^^}%N zyLIal`~I;iK6LBfKJ^pHVRtk%sGh&7uZK*kbo50z-Aw47ud02%?-gsRs(L%r9V$L< z@w~OsoN2f!J`un#OlxjwyKZ{q(t+|+;36uvw%p3PhGhyD@+#m!|ban8Eo9{8g4H-M$x7oDMCWR&3qP*{0&>qpqFP zeXmS0QYoAkFY&zzis2}j+PbY+wu14}(u!-*k7%GcrXnInRUN6|j~FQ$h-jN-r7@T) z1qtDy#q&LKG{9D>rxD#p0v*kT;S}y?;su3!NtvF>y4?ua8$FFaDIK`k&>!)jixkYG~Fl~)%-&>wC(wHFBz>oz^?3sgbY81;% zchewag`^dVGGv)LrAl)ZN5fK<>Sk}Vww^Q+nybf(W?(hdY{fM)x`I+^U2|Nv1{QBJ zjyZosK&&Vi7GGa>V*PMhO= zH|lDgEZ{?0rY&)8E#WE}VimiAvczELG6C!w_MLt(^)8-dm0gD0VddN+w}X1)%d0}l zZMvOiA}7N$&0?&OL-j zRwr>4uHK5!Su$NcmCb3!C{`kovu#?j6)V-BpY$CrZuWBMOgYlyfWSC05kT3KM>*Q<9cqT9^j>;Gqgw zuj**{O$w+`)u>n^=c?N$aeot}wZx_@5@LvdD%ilM$WPxxh-~|gN<0US5 zp#`*`7w0r$25kQUWKfN>kwIm?MaKAnWZ*J0-kVT909o6+8m zM+h3^oD>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=Z{s+O;}DM5aU8^P0LOkDuiegz%3+eiGy-s5rOmjTegy;@{ z=K|3eL7ofpoIrFhKrdwrCQGc~gkCLj(_D zzN}7&EEK>kklqC8P~gIah(Xc3CbX79WO0CI8AyE~y&8!A6e3Hg=nF#h0f^iih^_=_ uSH2G$XzZnT<1 +1-E (containers.CCHeap.Make.1-E)

Parameter CCHeap.Make.1-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 diff --git a/2.1/containers/CCHeap/Make/index.html b/2.1/containers/CCHeap/Make/index.html new file mode 100644 index 00000000..31a9e3c1 --- /dev/null +++ b/2.1/containers/CCHeap/Make/index.html @@ -0,0 +1,13 @@ + +Make (containers.CCHeap.Make)

Module CCHeap.Make

Parameters

Signature

type elt = E.t
type t
val empty : t

Empty heap.

val is_empty : t ‑> bool

Is the heap empty?

exception Empty
val merge : t ‑> t ‑> t

Merge two heaps.

val insert : elt ‑> t ‑> t

Insert a value in the heap.

val add : t ‑> elt ‑> t

Synonym to insert.

val filter : (elt ‑> bool) ‑> t ‑> t

Filter values, only retaining the ones that satisfy the predicate. +Linear time at least.

val find_min : t ‑> elt option

Find minimal element.

val find_min_exn : t ‑> elt

Like find_min but can fail.

  • Raises Empty: if the heap is empty.
val take : t ‑> (t * elt) option

Extract and return the minimum element, and the new heap (without +this element), or None if the heap is empty.

val take_exn : t ‑> t * elt

Like take, but can fail.

  • Raises Empty: if the heap is empty.
val delete_one : (elt ‑> elt ‑> bool) ‑> elt ‑> t ‑> t

Delete one occurrence of a value if it exist in the heap. +delete_one eq x h, use eq to find one x in 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 occurrences of a value in the heap. +delete_all eq x h, use 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

Iterate on elements.

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

Fold on all values.

val size : t ‑> int

Number of elements (linear complexity).

Conversions

The interface of of_gen, of_seq, of_klist +has changed since 0.16 (the old signatures +are now add_seq, add_gen, add_klist).

val to_list : t ‑> elt list

Return the elements of the heap, in no particular order.

val to_list_sorted : t ‑> elt list

Return the elements in increasing order.

  • Since: 1.1
val add_list : t ‑> elt list ‑> t

Add the elements of the list to the heap. 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_seq : t ‑> elt sequence ‑> t
  • Since: 0.16
val of_seq : elt sequence ‑> t

Build a heap from a given sequence. Complexity: O(n log n).

val to_seq : t ‑> elt sequence

Return a sequence of the elements of the heap.

val to_seq_sorted : t ‑> elt sequence

Iterate on the elements, in increasing order.

  • Since: 1.1
val add_klist : t ‑> elt klist ‑> t
  • Since: 0.16
val of_klist : elt klist ‑> t

Build a heap from a given klist. Complexity: O(n log n).

val to_klist : t ‑> elt klist

Return a klist of the elements of the heap.

val add_gen : t ‑> elt gen ‑> t
  • Since: 0.16
val of_gen : elt gen ‑> t

Build a heap from a given gen. Complexity: O(n log n).

val to_gen : t ‑> elt gen

Return a gen of the elements of the heap.

val to_tree : t ‑> elt ktree

Return a ktree of the elements of the heap.

val pp : ?⁠sep:string ‑> elt printer ‑> t printer
\ No newline at end of file diff --git a/2.1/containers/CCHeap/index.html b/2.1/containers/CCHeap/index.html new file mode 100644 index 00000000..1d0591ff --- /dev/null +++ b/2.1/containers/CCHeap/index.html @@ -0,0 +1,2 @@ + +CCHeap (containers.CCHeap)

Module CCHeap

Leftist Heaps

following Okasaki

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a ktree = unit ‑> [ `Nil | `Node of 'a * 'a ktree list ]
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type PARTIAL_ORD : sig ... end
module type S : sig ... end
module Make : functor (E : PARTIAL_ORD) -> S with type elt = E.t
\ No newline at end of file diff --git a/2.1/containers/CCHeap/module-type-PARTIAL_ORD/index.html b/2.1/containers/CCHeap/module-type-PARTIAL_ORD/index.html new file mode 100644 index 00000000..b5e693f3 --- /dev/null +++ b/2.1/containers/CCHeap/module-type-PARTIAL_ORD/index.html @@ -0,0 +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 diff --git a/2.1/containers/CCHeap/module-type-S/index.html b/2.1/containers/CCHeap/module-type-S/index.html new file mode 100644 index 00000000..43577598 --- /dev/null +++ b/2.1/containers/CCHeap/module-type-S/index.html @@ -0,0 +1,13 @@ + +S (containers.CCHeap.S)

Module type CCHeap.S

type elt
type t
val empty : t

Empty heap.

val is_empty : t ‑> bool

Is the heap empty?

exception Empty
val merge : t ‑> t ‑> t

Merge two heaps.

val insert : elt ‑> t ‑> t

Insert a value in the heap.

val add : t ‑> elt ‑> t

Synonym to insert.

val filter : (elt ‑> bool) ‑> t ‑> t

Filter values, only retaining the ones that satisfy the predicate. +Linear time at least.

val find_min : t ‑> elt option

Find minimal element.

val find_min_exn : t ‑> elt

Like find_min but can fail.

  • Raises Empty: if the heap is empty.
val take : t ‑> (t * elt) option

Extract and return the minimum element, and the new heap (without +this element), or None if the heap is empty.

val take_exn : t ‑> t * elt

Like take, but can fail.

  • Raises Empty: if the heap is empty.
val delete_one : (elt ‑> elt ‑> bool) ‑> elt ‑> t ‑> t

Delete one occurrence of a value if it exist in the heap. +delete_one eq x h, use eq to find one x in 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 occurrences of a value in the heap. +delete_all eq x h, use 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

Iterate on elements.

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

Fold on all values.

val size : t ‑> int

Number of elements (linear complexity).

Conversions

The interface of of_gen, of_seq, of_klist +has changed since 0.16 (the old signatures +are now add_seq, add_gen, add_klist).

val to_list : t ‑> elt list

Return the elements of the heap, in no particular order.

val to_list_sorted : t ‑> elt list

Return the elements in increasing order.

  • Since: 1.1
val add_list : t ‑> elt list ‑> t

Add the elements of the list to the heap. 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_seq : t ‑> elt sequence ‑> t
  • Since: 0.16
val of_seq : elt sequence ‑> t

Build a heap from a given sequence. Complexity: O(n log n).

val to_seq : t ‑> elt sequence

Return a sequence of the elements of the heap.

val to_seq_sorted : t ‑> elt sequence

Iterate on the elements, in increasing order.

  • Since: 1.1
val add_klist : t ‑> elt klist ‑> t
  • Since: 0.16
val of_klist : elt klist ‑> t

Build a heap from a given klist. Complexity: O(n log n).

val to_klist : t ‑> elt klist

Return a klist of the elements of the heap.

val add_gen : t ‑> elt gen ‑> t
  • Since: 0.16
val of_gen : elt gen ‑> t

Build a heap from a given gen. Complexity: O(n log n).

val to_gen : t ‑> elt gen

Return a gen of the elements of the heap.

val to_tree : t ‑> elt ktree

Return a ktree of the elements of the heap.

val pp : ?⁠sep:string ‑> elt printer ‑> t printer
\ No newline at end of file diff --git a/2.1/containers/CCIO.odoc b/2.1/containers/CCIO.odoc new file mode 100644 index 0000000000000000000000000000000000000000..76c3dd6acff3fc99461f5e79684c8563c0ab4ccd GIT binary patch literal 7528 zcmcIpdyE`)9lzbqM0OD=4-quTuebNuy~o}iebDyWvb}?14Yh^x5TS17c7J;}-t5eF zX7=_Lu@FN7AvKw6Z81P}=t~2NZDSzv2R3R%jIS8q8s!hM7)>M^{6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p10~ z3ky8+UAc)N&Y zitmQZ;R!W4XeTg_u&rzd$1lhzHOQRG$Sssz9@2TTmGdRZ3jiwY6~naZE;UY_yaT1u z*OW?U)Svkh0I-(lIk#wGTTTN^2{hZc zfU=;rUSRP;ZMdw~{3f*y(x?(jsM~Af#4y??X#udPu_U49!SDzY=C8j{6cp&IX%lVpxMHB;mun<$E z&^Q`}$Sca8CGw+&3c$nvTgt2|;DglW)+`m{8_Y;nQk97eI>b8`wQZpdt7y4$sTD3* z!q-I-on?u%9E*Y}uZO%!p_Iz}cR46ps2_-l{ga4kkCAq|wpFR8Cq@QTgC3=HklL~} zYS>#!Mco;%A(yIJbKtBg6gG-nY<1qLihAN2rK_&prHk;%-LZ6smHrB$^u!~*T(w#K!R3o|j`p)L z{pX0j_HU*ACb96#ismoAA5m! zOdZD5wm{6(JzOE8tt~J7@Zu*+wvcE&P#k@%AEhx3+mN-YR0z{PwSx>l-2DPiEyJB| zqdBmVp!Hy8EFb4b;ulK3<0PN9Dv~XEaei_473lg}RZ|D~d3`{|L-Ohz4@4;BH3Y@N zc2S&Wn8>_G9=&uRe&ELs$sXLYoQ)uB2A0H*=JD)Jm&YTDEMYiK0V$c;(=% z<&pt}7m-K9#00Ss%FtrgfkrZ^ebJ>JNv(`Y5im?&^QFD4``iFOvN$7rjZ##=ag zZN&W+uR+u-r@afF=*y?0w*^O@&Ta$LlbD4Z3qVncM`*fZ)aBJ(OEyX!U1Aao`jjd7 bg2fk +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.
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

Like read_dir (with recurse=true), this function walks +a directory recursively and yields either files or directories. +Is a file anything that doesn't satisfy is_directory (including +symlinks, etc.)

  • Raises Sys_error: in case of error (e.g. permission denied) during iteration.
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 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 diff --git a/2.1/containers/CCIO/index.html b/2.1/containers/CCIO/index.html new file mode 100644 index 00000000..d71a58b9 --- /dev/null +++ b/2.1/containers/CCIO/index.html @@ -0,0 +1,23 @@ + +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);;
  • transfer one file into another:
      # CCIO.(
+          with_in "/tmp/input"
+            (fun ic ->
+               let chunks = read_chunks ic in
+               with_out ~flags:[Open_binary] ~mode:0o644 "/tmp/output"
+                 (fun oc ->
+                    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.result
type 'a gen = unit ‑> 'a option

See Gen in the gen library.

Input

val with_in : ?⁠mode:int ‑> ?⁠flags:Pervasives.open_flag list ‑> string ‑> (Pervasives.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 : ?⁠size:int ‑> Pervasives.in_channel ‑> string gen

Read the channel's content into chunks of size size.

val read_line : Pervasives.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 : Pervasives.in_channel ‑> string gen

Read all lines. The generator should be traversed only once.

val read_lines_l : Pervasives.in_channel ‑> string list

Read all lines into a list.

val read_all : ?⁠size:int ‑> Pervasives.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 ‑> Pervasives.in_channel ‑> 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:Pervasives.open_flag list ‑> string ‑> (Pervasives.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:Pervasives.open_flag list ‑> string ‑> (Pervasives.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 : Pervasives.out_channel ‑> string ‑> unit

Write the given string on the channel, followed by "\n".

val write_gen : ?⁠sep:string ‑> Pervasives.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_lines : Pervasives.out_channel ‑> string gen ‑> unit

Write every string on the output, followed by "\n".

val write_lines_l : Pervasives.out_channel ‑> string list ‑> unit

Both

val with_in_out : ?⁠mode:int ‑> ?⁠flags:Pervasives.open_flag list ‑> string ‑> (Pervasives.in_channel ‑> Pervasives.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

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.

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 diff --git a/2.1/containers/CCInt.odoc b/2.1/containers/CCInt.odoc new file mode 100644 index 0000000000000000000000000000000000000000..85ae23be03c1585526fea1d6451d43e8edaa7dbf GIT binary patch literal 4526 zcmbtX3vg6d8P3_9BP5+7b+kna_JrL{cJtW1oABx+z(OE2V=0gDD1$WK-MyP!*u8hT z_ii?kPO8ETPN&wp)dVRW=kgLNNGTYxwPHF@DT-x~$F#I{I$9ZPkpg3NbVU8nIroO3 z3DX&e+3fxI{NMk7=YQQFJ*6k>Vv+iYw7Kv5$4W{{g76{m`7C_KAF593nkB26VwgLE z&CRWv6_<8BwC@ zQ`g+QNZ0hNZsa=Eq%D2CXrfj2MZ?L1dl6{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u6SD>XW#7sZXdIfza%c)ayL;m{7k@sBZ~`>gs?xtSNIdDhxZ;tvvaE zflvH9r{2>Zwt2*sB&Sss)$3xV4p`49tYl zfsN8QmBi=Puj?KPYfbF78|4u=`HHM?8ni1aO55+y_8Sw?_Ba zA@tX|`ac7LW@dEt$2~uMZVK!yOU+o^x>@1w-8I+6(KMkQWp54T821 zR1k6-Y`p|^5R?$|Dp*lr)rB=w$ZH6iN6=i@Wrf^MP>djnpei9J37SOE{m>FZ21{cI z`V_t?#P#?FzK;JW1RcMN-@)gEVB**DNqkHQ1$+b_#?K33Bi@O3;O`3I3H(j`6y79+ MO}HBuum-{X58?f +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 sequence

Alias to range.

  • Since: 1.2
val (--^) : t ‑> t ‑> t sequence

Alias to range'.

  • Since: 1.2
val (+) : t ‑> t ‑> t
  • Since: 2.1
val (-) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (~-) : t ‑> t
  • Since: 2.1
  • Since: 2.1
val (*) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (/) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (mod) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (land) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lor) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lxor) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lnot) : t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lsl) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
val (lsr) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
val (asr) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
\ No newline at end of file diff --git a/2.1/containers/CCInt/index.html b/2.1/containers/CCInt/index.html new file mode 100644 index 00000000..a36547a3 --- /dev/null +++ b/2.1/containers/CCInt/index.html @@ -0,0 +1,10 @@ + +CCInt (containers.CCInt)

Module CCInt

Basic Int functions

type t = int
val compare : t ‑> t ‑> int

The comparison function for integers with the same specification as Pervasives.compare.

val equal : t ‑> t ‑> bool

Equality function for integers.

val hash : t ‑> int
val sign : t ‑> int

sign i is one of -1, 0, 1.

val neg : t ‑> t

Unary negation. neg i = - i.

  • Since: 0.5
val pow : t ‑> t ‑> t

pow base exponent returns base raised to the power of exponent. +pow a b = a^b for positive integers a and b. +Raises Invalid_argument if a = b = 0 or b < 0.

  • Since: 0.11
val floor_div : t ‑> t ‑> t

floor_div a n is integer division rounding towards negative infinity. +It satisfies a = m * floor_div a n + rem a n.

  • Since: 1.2
val rem : t ‑> t ‑> t

rem a n is the remainder of dividing a by n, with the same +sign as n.

  • Since: 1.2
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = Random.State.t ‑> 'a
type 'a sequence = ('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
val to_string : t ‑> string

Return the string representation of its argument, in signed decimal.

  • Since: 0.13
val of_string : string ‑> t option
  • Since: 0.13
val pp_binary : t printer

Print as "0b00101010".

  • Since: 0.20
val to_string_binary : t ‑> string
  • Since: 0.20
val min : t ‑> t ‑> t

The minimum of two integers.

  • Since: 0.17
val max : t ‑> t ‑> t

The maximum of two integers.

  • Since: 0.17
val range_by : step:t ‑> t ‑> t ‑> t sequence

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 sequence

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 sequence

Like range but the second bound is excluded. +For instance range' 0 5 = Sequence.of_list [0;1;2;3;4].

  • Since: 1.2

Infix Operators

  • Since: 0.17
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 sequence

Alias to range.

  • Since: 1.2
val (--^) : t ‑> t ‑> t sequence

Alias to range'.

  • Since: 1.2
val (+) : t ‑> t ‑> t
  • Since: 2.1
val (-) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (~-) : t ‑> t
  • Since: 2.1
  • Since: 2.1
val (*) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (/) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (mod) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (land) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lor) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lxor) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lnot) : t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lsl) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
val (lsr) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
val (asr) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
\ No newline at end of file diff --git a/2.1/containers/CCInt32.odoc b/2.1/containers/CCInt32.odoc new file mode 100644 index 0000000000000000000000000000000000000000..217219fb0a770d2e29037a80958b5c0b5c3a2c3e GIT binary patch literal 7236 zcmb_h3yfS<8Qz(_w|1wA6=ws-Db z?!D99K>-yLg+RDlN&ykP)ItOsYyfF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(!{bO*HcDi7i0ma~ijcR32ac)~B$5bnbR_|PDo+(vxkSESCpEQR zM4HYb;3IMytIBsIaB~PO6YwGe{#Mqys$4IDvgK1-FDD?HKI{tR<#=LM(pQz;5;hrz z@C}0PBG@~fiILSD_j8H+euxvDo*KPR;M7PMR;*ZpTFp5yi+za?w~n9>31kp=LA8lPsL{7V`-g@7*3U}ITRKacTjB(;Yi@mM zbi|BzC14b6s#$C60-;Rl$Ob>~p<~|~Z0p{&wuQMDr(7WcR<8?NEFNGF0WgO{pyRkC zt#CdRl9q&+@8OQY1Ae6}OY+MAgQ(d6-iq?8ESYBK*0j_{b3|{N2aPcteqs(sQ^xun zZUC;g75kWx*3-hX68hJa?SMM*! zwF|O!CFSqSaxv}?TUVqhIcgdpi-=n+u^gjH0DP@qvx-4W`c?NE)6H|s zL}!D@QWG|k%B)H`2htc`<*h~XG$Cyqs<*%&>uU`HZ`%%}V@LWir%kccvnrx5RxsQ= zZtF1hMcH(Kd84oLP@oR>3hs7D6Wz`vn=URs3`My$uLdZ*Uc@XM7a&$%D`LLLq#{%= zl@BF?myKQVTs{HjdN3y**V%okvsHAf`m!$SOPp$j!XMEfef23F{6m( z^l>l}qNBldN2US?PD=`$#Y)&iQVm4&9!dZTa)xLsNl#1~o~;L@PV^rg8MJ(oxOQZ6 zfuH6~7j2n`)5xrfX?!O?hC|~c=y^~nQzDMA!J4Reyq&|q9psq4f(XwiNjF86ph;SB zAzH1$-r7)^28l}tE)M+VX@|S-ylXNAi4! z`$Y#Wen{JV*9t0^U?9tK^hv-u(?bn-A&WOViHw{XOcu8C7{3 Tb{nD*lVVkQnY3NVY019 +Infix (containers.CCInt32.Infix)

Module CCInt32.Infix

val (+) : t ‑> t ‑> t
val (-) : t ‑> t ‑> t
val (~-) : t ‑> t
val (*) : t ‑> t ‑> t
val (/) : t ‑> t ‑> t
val (mod) : t ‑> t ‑> t
val (land) : t ‑> t ‑> t
val (lor) : t ‑> t ‑> t
val (lxor) : t ‑> t ‑> t
val (lnot) : t ‑> t
val (lsl) : t ‑> int ‑> t
val (lsr) : t ‑> int ‑> t
val (asr) : t ‑> int ‑> t
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 diff --git a/2.1/containers/CCInt32/index.html b/2.1/containers/CCInt32/index.html new file mode 100644 index 00000000..3bf31545 --- /dev/null +++ b/2.1/containers/CCInt32/index.html @@ -0,0 +1,39 @@ + +CCInt32 (containers.CCInt32)

Module CCInt32

Int32

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.

  • Since: 2.1
include module type of sig ... end
val zero : int32
val one : int32
val minus_one : int32
external neg : int32 ‑> int32 = "%int32_neg"
external add : int32 ‑> int32 ‑> int32 = "%int32_add"
external sub : int32 ‑> int32 ‑> int32 = "%int32_sub"
external mul : int32 ‑> int32 ‑> int32 = "%int32_mul"
external div : int32 ‑> int32 ‑> int32 = "%int32_div"
external rem : int32 ‑> int32 ‑> int32 = "%int32_mod"
val succ : int32 ‑> int32
val pred : int32 ‑> int32
val abs : int32 ‑> int32
val max_int : int32
val min_int : int32
external logand : int32 ‑> int32 ‑> int32 = "%int32_and"
external logor : int32 ‑> int32 ‑> int32 = "%int32_or"
external logxor : int32 ‑> int32 ‑> int32 = "%int32_xor"
val lognot : int32 ‑> int32
external shift_left : int32 ‑> int ‑> int32 = "%int32_lsl"
external shift_right : int32 ‑> int ‑> int32 = "%int32_asr"
external shift_right_logical : int32 ‑> int ‑> int32 = "%int32_lsr"
external of_int : int ‑> int32 = "%int32_of_int"
external to_int : int32 ‑> int = "%int32_to_int"
external of_float : float ‑> int32 = "caml_int32_of_float" "caml_int32_of_float_unboxed"
external to_float : int32 ‑> float = "caml_int32_to_float" "caml_int32_to_float_unboxed"
external of_string : string ‑> int32 = "caml_int32_of_string"
val of_string_opt : string ‑> int32 option
val to_string : int32 ‑> string
external bits_of_float : float ‑> int32 = "caml_int32_bits_of_float" "caml_int32_bits_of_float_unboxed"
external float_of_bits : int32 ‑> float = "caml_int32_float_of_bits" "caml_int32_float_of_bits_unboxed"
type t = int32
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external format : string ‑> int32 ‑> string = "caml_int32_format"
val (+) : t ‑> t ‑> t

Addition.

val (-) : t ‑> t ‑> t

Subtraction.

val (~-) : t ‑> t

Unary negation.

val (*) : t ‑> t ‑> t

Multiplication.

val (/) : 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 Pervasives.(/).

val (mod) : t ‑> t ‑> t

x mod y is the integer remainder. +If y <> zero, the result of x mod y satisfies the following property: +x = ((x / y) * y) + (x mod y). +If y = 0, x mod y raises Division_by_zero.

val (land) : t ‑> t ‑> t

Bitwise logical and.

val (lor) : t ‑> t ‑> t

Bitwise logical or.

val (lxor) : t ‑> t ‑> t

Bitwise logical exclusive or.

val (lnot) : t ‑> t

Bitwise logical negation.

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.

module Infix : sig ... end
val equal : t ‑> t ‑> bool

The equal function for 32-bit integers. +Like Pervasives.(=) x y).

val hash : t ‑> int

Like Pervasives.abs (to_int x).

Conversion

val to_int : t ‑> 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 of_int : int ‑> t

Alias to Int32.of_int.

val to_float : t ‑> float

Convert the given 32-bit integer to a floating-point number.

val of_float : float ‑> t

Alias to Int32.of_float. +Convert the given floating-point number to a 32-bit integer, +discarding the fractional part (truncate towards 0). +The result of the conversion is undefined if, after truncation, the number +is outside the range [CCInt32.min_int, CCInt32.max_int].

val to_string : t ‑> string

Return the string representation of its argument, in signed decimal.

val of_string_exn : string ‑> t

Alias to Int32.of_string. +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*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 of_string : string ‑> t option

Safe version of of_string_exn. +Like of_string_exn, but return None instead of raising.

val of_string_opt : string ‑> t option

Alias to of_string.

\ No newline at end of file diff --git a/2.1/containers/CCInt64.odoc b/2.1/containers/CCInt64.odoc new file mode 100644 index 0000000000000000000000000000000000000000..2e6334705c4a4f7b0ace515a665169a52d370dab GIT binary patch literal 8822 zcmcIq32+g}~6J{E2+XjwH*Lah#A4g#<`Cgk(rU3k;|$X=QJacE#>0 zv6-Pm2k1}+${I)@rG+I8=g<-YGqk0Jlp_=hEdzxfKw+Si4x|H=qc9ZO@BiPwI*c8T z(wR7scfWVP|GoD=#VT0&L|?K$nL2;V4fnLPv~=M|#m_AK9I&$|Z<(%Un7Zv;*R_24 zD$^Yt$fP#jp1FUFHmhmrdPbK@(8D)RpPb^=)+A^)O zWmiUwyq9`s?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0bCKHG5y-*Cu{RImwf_n1~h;hj%DssfjG4hQGK*BiYkq2GlYGLv7=Cxqowm-=F2bPpnb=+QK_jTJ4n`^LCmMA%{#Hr z7u~kCGQ6~0!!#*s$p3z1MSOcFuRIZ6dFu6nR}Xy@$E9{Ul(Xrq4oOqno0o`F2Db_J ze+lqfiosPlxVD$vcaSG4H+7(Cc2j;Tg=Fh{U>@YfpV%RIJ78j0hhm(lSO_XJ ztK}RPBSD!^_K=5vEoD@A3JQ{`t4|HWJ^NHL@^L*Tl_|Q@gt8Ei6bvViD_qbmigJsF zRT4IZE_#@aK?xT=P}BY>)!lTPk=MTFEW%DoFXHP>+=`0WH5KsIaN{EH$Pql} ztg7o61xP?P+L}46v(r%iy<0qW+INEO2u$VMBl*}17B<`inbRAp$ER%yllFqQDXHF* zvAC9Jig4w=6RI&DQzp}XvnbGqN#^%9tfhH2EooR{(YCr_^~4vB6L(qY!X_(Vg@WTyKHuP| zE9JN}?ezv4zKsX}rfw-1f1s-G6F2{IaTTSRU8TFCx|etwf~PX@F&^8mlQTfw4sdH5 zoh<34*TkV~Zhn-o@;wp`yFIbakltf4Y;@$e#Bsig30AP;tBOcYAI9CDrfGkCUaATO zmUauA$wp8xB^!|DU7Q;*$Qfd_Onf3z@I*e?D~W~Zyc8C{as@OmmGiwM6yy^>|E{Jq zmh@q9JMZX$@Wl)(N!<8_9W<;PW(8vppT|wUX2K4JpFKH;%EgU1S`mMI=rmjc`g>~M zrPKGP^ZQQsy#+~zg)Kja#1M-(UB}K?p1bKMG@iRIESUN6rK8VRLU28&Z59uSZTPPQ ztN7P$N%^fTn=b_eXuMFNtmI*_R;lQk z4co^ykLY4$MS4*D#Bv5}E_}U;Zfx!(w#_{VXL F`7guf`g8yQ literal 0 HcmV?d00001 diff --git a/2.1/containers/CCInt64/.jbuilder-keep b/2.1/containers/CCInt64/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCInt64/Infix/index.html b/2.1/containers/CCInt64/Infix/index.html new file mode 100644 index 00000000..f50f1a50 --- /dev/null +++ b/2.1/containers/CCInt64/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.CCInt64.Infix)

Module CCInt64.Infix

Infix operators

  • Since: 2.1
val (+) : t ‑> t ‑> t
val (-) : t ‑> t ‑> t
val (~-) : t ‑> t
val (*) : t ‑> t ‑> t
val (/) : t ‑> t ‑> t
val (mod) : t ‑> t ‑> t
val (land) : t ‑> t ‑> t
val (lor) : t ‑> t ‑> t
val (lxor) : t ‑> t ‑> t
val (lnot) : t ‑> t
val (lsl) : t ‑> int ‑> t
val (lsr) : t ‑> int ‑> t
val (asr) : t ‑> int ‑> t
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 diff --git a/2.1/containers/CCInt64/index.html b/2.1/containers/CCInt64/index.html new file mode 100644 index 00000000..ba969ec3 --- /dev/null +++ b/2.1/containers/CCInt64/index.html @@ -0,0 +1,46 @@ + +CCInt64 (containers.CCInt64)

Module CCInt64

Int64

Helpers for 64-bit integers

  • Since: 0.13
include module type of sig ... end
val zero : int64
val one : int64
val minus_one : int64
external neg : int64 ‑> int64 = "%int64_neg"
external add : int64 ‑> int64 ‑> int64 = "%int64_add"
external sub : int64 ‑> int64 ‑> int64 = "%int64_sub"
external mul : int64 ‑> int64 ‑> int64 = "%int64_mul"
external div : int64 ‑> int64 ‑> int64 = "%int64_div"
external rem : int64 ‑> int64 ‑> int64 = "%int64_mod"
val succ : int64 ‑> int64
val pred : int64 ‑> int64
val abs : int64 ‑> int64
val max_int : int64
val min_int : int64
external logand : int64 ‑> int64 ‑> int64 = "%int64_and"
external logor : int64 ‑> int64 ‑> int64 = "%int64_or"
external logxor : int64 ‑> int64 ‑> int64 = "%int64_xor"
val lognot : int64 ‑> int64
external shift_left : int64 ‑> int ‑> int64 = "%int64_lsl"
external shift_right : int64 ‑> int ‑> int64 = "%int64_asr"
external shift_right_logical : int64 ‑> int ‑> int64 = "%int64_lsr"
external of_int : int ‑> int64 = "%int64_of_int"
external to_int : int64 ‑> int = "%int64_to_int"
external of_float : float ‑> int64 = "caml_int64_of_float" "caml_int64_of_float_unboxed"
external to_float : int64 ‑> float = "caml_int64_to_float" "caml_int64_to_float_unboxed"
external of_int32 : int32 ‑> int64 = "%int64_of_int32"
external to_int32 : int64 ‑> int32 = "%int64_to_int32"
external of_nativeint : nativeint ‑> int64 = "%int64_of_nativeint"
external to_nativeint : int64 ‑> nativeint = "%int64_to_nativeint"
external of_string : string ‑> int64 = "caml_int64_of_string"
val of_string_opt : string ‑> int64 option
val to_string : int64 ‑> string
external bits_of_float : float ‑> int64 = "caml_int64_bits_of_float" "caml_int64_bits_of_float_unboxed"
external float_of_bits : int64 ‑> float = "caml_int64_float_of_bits" "caml_int64_float_of_bits_unboxed"
type t = int64
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external format : string ‑> int64 ‑> string = "caml_int64_format"
val (+) : t ‑> t ‑> t

Addition.

val (-) : t ‑> t ‑> t

Subtraction.

val (~-) : t ‑> t

Unary negation.

val (*) : t ‑> t ‑> t

Multiplication.

val (/) : 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 Pervasives.(/).

val (mod) : t ‑> t ‑> t

Integer remainder. +If y = 0, x mod y raises Division_by_zero.

val abs : t ‑> t

Return the absolute value of its argument.

val max_int : t

The greatest representable 64-bit integer, 263 - 1 = 9_223_372_036_854_775_807.

val min_int : t

The smallest representable 64-bit integer, -263 = -9_223_372_036_854_775_808.

val (land) : t ‑> t ‑> t

Bitwise logical and.

val (lor) : t ‑> t ‑> t

Bitwise logical or.

val (lxor) : t ‑> t ‑> t

Bitwise logical exclusive or.

val (lnot) : t ‑> t

Bitwise logical negation.

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.

module Infix : sig ... end

Infix operators

val equal : t ‑> t ‑> bool

The equal function for 64-bit integers. +Like Pervasives.(=) x y).

val compare : t ‑> t ‑> int

The comparison function for 64-bit integers, with the same specification as +Pervasives.compare. Along with the type t, this function compare +allows the module CCInt64 to be passed as argument to the functors +Set.Make and Map.Make.

val hash : t ‑> int

Like Pervasives.abs (to_int x).

Conversion

val to_int : t ‑> 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 of_int : int ‑> t

Alias to Int64.of_int. +NOTE: used to return an option, but the function actually never fails.

val of_int_exn : int ‑> t

Alias to Int64.of_int.

  • Deprecated since 2.1
val to_int32 : t ‑> 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_int32 : int32 ‑> t

Alias to Int64.of_int32. +NOTE: use to return an option, but the function actually never fails.

val of_int32_exn : int32 ‑> t

Alias to Int64.of_int32.

  • Deprecated since 2.1
val to_nativeint : t ‑> 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_nativeint : nativeint ‑> t

Alias to Int64.of_nativeint. +NOTE: use to return an option, but the function actually never fails.

val of_nativeint_exn : nativeint ‑> t

Alias to Int64.of_nativeint.

  • Deprecated since 2.1
val to_float : t ‑> float

Convert the given 64-bit integer to a floating-point number.

val of_float : float ‑> t

Alias to Int64.of_float. +Convert the given floating-point number to a 64-bit integer, +discarding the fractional part (truncate towards 0). +The result of the conversion is undefined if, after truncation, +the number is outside the range [CCInt64.min_int, CCInt64.max_int]. +NOTE: used to return an option, but the function never fails.

val of_float_exn : float ‑> t

Alias to Int64.of_float.

  • Deprecated since 2.1
val to_string : t ‑> string

Return the string representation of its argument, in decimal.

val of_string : string ‑> t option

Safe version of of_string_exn.

val of_string_opt : string ‑> t option

Alias to of_string.

  • Since: 2.1
val of_string_exn : string ‑> t

Alias to Int64.of_string. +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*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.

\ No newline at end of file diff --git a/2.1/containers/CCList.odoc b/2.1/containers/CCList.odoc new file mode 100644 index 0000000000000000000000000000000000000000..6b54c2aeb5e64662642cedc84d489b8aa5810248 GIT binary patch literal 26812 zcmd6Q33wdUm98aKVRu`$B`=a~uqjzBsatNfHg8y7WXm>~u`$?&01gqYR!M5y>Xy4( zwnV@~65b<_WTwO#1}1411Ids8&dV_2%VL(7ZAf5VcqD;5CNBgC17S$WK7_pgoO5qg zbxQ)0;eFrmea2PQ_ndpqx#ynko+@YhGl`b=SVyew${X(b>WmpP8u7=(pN05Sb$@dr zlg`JJX*-*{t+A(PS2CCHZu|YMuO0dBH($9gb)@qTA9}8Lt3VF*&zN!QFJ{bm|LHSk zocrNfGiHQl6y6=YQSKB94{qr$IGsJ2;gOU*Y^U=%E1$7aG+%eOF{@B$+&VfiU}v4S zTW?u&+W*>kWXJzJ^qtpt?06+o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Q-I-HzKg@Gysh= z^s)(+9+F(wl4B$sF5#u!{18>XQCGt^_3^Jmun(|u2@C-!K0Js1!dnalIbHiFM}#UF(6^?PW{ zFSB^XSS@~?Zy33RYRtr5@9oD3V%7h|%a2Q{3LF3s-7@8prS6nVERUbd+;<-xA4g^2 zNR&ilQAjp>NVa=OZgYdWKjY2CCB2Nx_2tM;lZ=w2vLxeS|L1p86z#yv<5Z-jvwu~h z)rrOO8?~}eKsRp~HV0WJXq38K0nde@a=WCdU zHkB%`uSFD%c-$=b0)rJh_uv`(xKkfqF+wMu&c?IppGx69qw*AfgG*8w@#Q|QMu2I;2Hj*2i&1H$2V0%+cERh=gm{8R>P)R#THAXpBE(jKVyIHuK)l5 literal 0 HcmV?d00001 diff --git a/2.1/containers/CCList/.jbuilder-keep b/2.1/containers/CCList/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCList/Assoc/index.html b/2.1/containers/CCList/Assoc/index.html new file mode 100644 index 00000000..7c33af60 --- /dev/null +++ b/2.1/containers/CCList/Assoc/index.html @@ -0,0 +1,4 @@ + +Assoc (containers.CCList.Assoc)

Module CCList.Assoc

type ('a, 'b) t = ('a * 'b) list
val get : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a'bt ‑> 'b option

Find the element.

val get_exn : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a'bt ‑> 'b

Like get, but unsafe.

  • Raises Not_found: if the element is not present.
val set : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> 'b ‑> ('a'bt ‑> ('a'bt

Add the binding into the list (erase it if already present).

val mem : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a_t ‑> bool

mem x l returns true iff x is a key in l.

  • Since: 0.16
val update : eq:('a ‑> 'a ‑> bool) ‑> f:('b option ‑> 'b option) ‑> 'a ‑> ('a'bt ‑> ('a'bt

update k ~f l updates l on the key k, by calling f (get l 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'bt ‑> ('a'bt

remove x l removes the first occurrence of k from l.

  • Since: 0.17
\ No newline at end of file diff --git a/2.1/containers/CCList/Infix/index.html b/2.1/containers/CCList/Infix/index.html new file mode 100644 index 00000000..4ede567e --- /dev/null +++ b/2.1/containers/CCList/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.CCList.Infix)

Module CCList.Infix

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

Infix version of map with reversed arguments.

val (@) : 'a t ‑> 'a t ‑> 'a t

As append. Concatenate two lists.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

fun <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a ‑> 'b) ‑> 'a t ‑> 'b t

As map.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

l >>= f is flat_map f l.

val (--) : int ‑> int ‑> int t

Infix alias for range. Bounds included.

val (--^) : int ‑> int ‑> int t

Infix alias for range'. Second bound excluded.

  • Since: 0.17
\ No newline at end of file diff --git a/2.1/containers/CCList/Ref/index.html b/2.1/containers/CCList/Ref/index.html new file mode 100644 index 00000000..56413548 --- /dev/null +++ b/2.1/containers/CCList/Ref/index.html @@ -0,0 +1,3 @@ + +Ref (containers.CCList.Ref)

Module CCList.Ref

type 'a t = 'a list Pervasives.ref
val push : 'a t ‑> 'a ‑> unit
val pop : 'a t ‑> 'a option
val pop_exn : 'a t ‑> 'a

Unsafe version of pop.

  • Raises Failure: if the list is empty.
val create : unit ‑> 'a t

Create a new list reference.

val clear : _ t ‑> unit

Remove all elements.

val lift : ('a list ‑> 'b) ‑> 'a t ‑> 'b

Apply a list function to the content.

val push_list : 'a t ‑> 'a list ‑> unit

Add elements of the list at the beginning of the list ref. Elements +at the end of the list will be at the beginning of the list ref.

\ No newline at end of file diff --git a/2.1/containers/CCList/Traverse/argument-1-M/index.html b/2.1/containers/CCList/Traverse/argument-1-M/index.html new file mode 100644 index 00000000..07caa0b7 --- /dev/null +++ b/2.1/containers/CCList/Traverse/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (containers.CCList.Traverse.1-M)

Parameter CCList.Traverse.1-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 diff --git a/2.1/containers/CCList/Traverse/index.html b/2.1/containers/CCList/Traverse/index.html new file mode 100644 index 00000000..5b32801a --- /dev/null +++ b/2.1/containers/CCList/Traverse/index.html @@ -0,0 +1,4 @@ + +Traverse (containers.CCList.Traverse)

Module CCList.Traverse

Parameters

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
val map_m_par : ('a ‑> 'b M.t) ‑> 'a t ‑> 'b t M.t

Like map_m but map_m_par f (x::l) evaluates f x and +f l "in parallel" before combining their result (for instance +in Lwt).

\ No newline at end of file diff --git a/2.1/containers/CCList/index.html b/2.1/containers/CCList/index.html new file mode 100644 index 00000000..92938bf2 --- /dev/null +++ b/2.1/containers/CCList/index.html @@ -0,0 +1,96 @@ + +CCList (containers.CCList)

Module CCList

Complements to list

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = Random.State.t ‑> 'a
include module type of List
val length : 'a list ‑> int
val compare_lengths : 'a list ‑> 'b list ‑> int
val compare_length_with : 'a list ‑> int ‑> int
val cons : 'a ‑> 'a list ‑> 'a list
val hd : 'a list ‑> 'a
val tl : 'a list ‑> 'a list
val nth : 'a list ‑> int ‑> 'a
val nth_opt : 'a list ‑> int ‑> 'a option
val rev : 'a list ‑> 'a list
val init : int ‑> (int ‑> 'a) ‑> 'a list
val append : 'a list ‑> 'a list ‑> 'a list
val rev_append : 'a list ‑> 'a list ‑> 'a list
val concat : 'a list list ‑> 'a list
val flatten : 'a list list ‑> 'a list
val iter : ('a ‑> unit) ‑> 'a list ‑> unit
val iteri : (int ‑> 'a ‑> unit) ‑> 'a list ‑> unit
val map : ('a ‑> 'b) ‑> 'a list ‑> 'b list
val mapi : (int ‑> 'a ‑> 'b) ‑> 'a list ‑> 'b list
val rev_map : ('a ‑> 'b) ‑> 'a list ‑> 'b list
val fold_left : ('a ‑> 'b ‑> 'a) ‑> 'a ‑> 'b list ‑> 'a
val fold_right : ('a ‑> 'b ‑> 'b) ‑> 'a list ‑> 'b ‑> 'b
val iter2 : ('a ‑> 'b ‑> unit) ‑> 'a list ‑> 'b list ‑> unit
val map2 : ('a ‑> 'b ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c list
val rev_map2 : ('a ‑> 'b ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c list
val fold_left2 : ('a ‑> 'b ‑> 'c ‑> 'a) ‑> 'a ‑> 'b list ‑> 'c list ‑> 'a
val fold_right2 : ('a ‑> 'b ‑> 'c ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c ‑> 'c
val for_all : ('a ‑> bool) ‑> 'a list ‑> bool
val exists : ('a ‑> bool) ‑> 'a list ‑> bool
val for_all2 : ('a ‑> 'b ‑> bool) ‑> 'a list ‑> 'b list ‑> bool
val exists2 : ('a ‑> 'b ‑> bool) ‑> 'a list ‑> 'b list ‑> bool
val mem : 'a ‑> 'a list ‑> bool
val memq : 'a ‑> 'a list ‑> bool
val find : ('a ‑> bool) ‑> 'a list ‑> 'a
val find_opt : ('a ‑> bool) ‑> 'a list ‑> 'a option
val filter : ('a ‑> bool) ‑> 'a list ‑> 'a list
val find_all : ('a ‑> bool) ‑> 'a list ‑> 'a list
val partition : ('a ‑> bool) ‑> 'a list ‑> 'a list * 'a list
val assoc : 'a ‑> ('a * 'b) list ‑> 'b
val assoc_opt : 'a ‑> ('a * 'b) list ‑> 'b option
val assq : 'a ‑> ('a * 'b) list ‑> 'b
val assq_opt : 'a ‑> ('a * 'b) list ‑> 'b option
val mem_assoc : 'a ‑> ('a * 'b) list ‑> bool
val mem_assq : 'a ‑> ('a * 'b) list ‑> bool
val remove_assoc : 'a ‑> ('a * 'b) list ‑> ('a * 'b) list
val remove_assq : 'a ‑> ('a * 'b) list ‑> ('a * 'b) list
val split : ('a * 'b) list ‑> 'a list * 'b list
val combine : 'a list ‑> 'b list ‑> ('a * 'b) list
val sort : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val stable_sort : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val fast_sort : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val sort_uniq : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val merge : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list
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 : ('a ‑> 'b) ‑> 'a t ‑> 'b t

Safe version of List.map.

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

Infix version of map with reversed arguments.

  • Since: 0.5
val cons : 'a ‑> 'a t ‑> 'a t

cons x l is x::l.

  • Since: 0.12
val append : 'a t ‑> 'a t ‑> 'a t

Safe version of List.append. +Concatenate two lists.

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 (@) : 'a t ‑> 'a t ‑> 'a t

Like append. +Concatenate two lists.

val filter : ('a ‑> bool) ‑> 'a t ‑> 'a t

Safe version of List.filter. +filter p l returns all the elements of the list l +that satisfy the predicate p. The order of the elements +in the input list is preserved.

val fold_right : ('a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b

Safe version of fold_right. +fold_right f [a1; ...; an] b is +f a1 (f a2 (... (f an b) ...)). Not tail-recursive.

val fold_while : ('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> 'a ‑> 'b t ‑> 'a

Fold 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 acc l is a fold_left-like function, but it also maps the +list to another list.

  • Since: 0.14
val scan_left : ('acc ‑> 'a ‑> 'acc) ‑> 'acc ‑> 'a list ‑> 'acc list

scan_left f acc l returns the list [acc; f acc x0; f (f acc x0) x1; ...] +where x0, x1, etc. are the elements of l.

  • Since: 1.2
val fold_map2 : ('acc ‑> 'a ‑> 'b ‑> 'acc * 'c) ‑> 'acc ‑> 'a list ‑> 'b list ‑> 'acc * 'c list

fold_map2 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 ‑> 'acc * 'b list

fold_filter_map f acc 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_flat_map : ('acc ‑> 'a ‑> 'acc * 'b list) ‑> 'acc ‑> 'a list ‑> 'acc * 'b list

fold_flat_map f acc 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 count : ('a ‑> bool) ‑> 'a list ‑> int

count f l counts how much elements of l comply with the function f.

  • Since: 1.5
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

Like List.combine but tail-recursive. +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 lists have distinct lengths.
  • Since: 1.2
val combine_gen : 'a list ‑> 'b list ‑> ('a * 'b) gen

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
val split : ('a * 'b) t ‑> 'a t * 'b t

A tail-recursive version of List.split. +Transform a list of pairs into a pair of lists: +split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]).

val compare : ('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a t ‑> int
val compare_lengths : 'a t ‑> 'b t ‑> int

Equivalent to compare (length l1) (length l2) but more efficient. +Compare the lengths of two lists.

  • Since: 1.5
val compare_length_with : 'a t ‑> int ‑> int

Equivalent to compare (length l) x but more efficient. +Compare the length of a list to an integer.

  • Since: 1.5
val equal : ('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> bool
val flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b t

Map and flatten at the same time (safe). Evaluation order is not guaranteed.

val flatten : 'a t t ‑> 'a t

Safe flatten. Concatenate a list of lists.

val product : ('a ‑> 'b ‑> 'c) ‑> 'a t ‑> 'b t ‑> 'c t

Cartesian product of the two lists, with the given combinator.

val fold_product : ('c ‑> 'a ‑> 'b ‑> 'c) ‑> 'c ‑> 'a t ‑> 'b t ‑> 'c

Fold on the cartesian product.

val cartesian_product : 'a t t ‑> 'a t t

Produce 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
val map_product_l : ('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
val diagonal : 'a t ‑> ('a * 'a) t

All pairs of distinct positions of the list. list_diagonal l will +return the list of List.nth i l, List.nth j l if i < j.

val partition_map : ('a ‑> [< `Left of 'b | `Right of 'c | `Drop ]) ‑> 'a list ‑> 'b list * 'c list

partition_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 sublists_of_len : ?⁠last:('a list ‑> 'a list option) ‑> ?⁠offset:int ‑> int ‑> 'a list ‑> 'a list list

sublists_of_len 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:CCOpt.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 = CCOpt.return, it will simply keep the last group. +By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.
  • Raises Invalid_argument: if offset <= 0 or n <= 0.
  • Since: 1.0
val intersperse : 'a ‑> 'a list ‑> 'a list

Insert the first argument between every element of the list

  • Since: 2.1
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
val pure : 'a ‑> 'a t

pure is return.

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

(<$>) = map.

val return : 'a ‑> 'a t

return x is x.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

l >>= f is flat_map f l.

val take : int ‑> 'a t ‑> 'a t

Take the n first elements, drop the rest.

val drop : int ‑> 'a t ‑> 'a t

Drop the n first elements, keep the rest.

val hd_tl : 'a t ‑> 'a * 'a t

hd_tl (x :: l) returns hd, 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
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

First element.

  • Since: 0.20
val tail_opt : 'a t ‑> 'a t option

Return the given list without its first element.

  • Since: 2.0
val last_opt : 'a t ‑> 'a option

Last element.

  • 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

Safe version of find.

  • Since: 1.5
val find_pred_exn : ('a ‑> bool) ‑> 'a t ‑> 'a

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

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) ‑> x:'a ‑> 'a t ‑> 'a t

remove ~x l removes every instance of x 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
val keep_ok : ('a_) Result.result t ‑> 'a t

keep_ok l retains only elements of the form Ok x.

  • Since: 1.3
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
val all_ok : ('a'err) Result.result t ‑> ('a t'err) Result.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
val sorted_merge : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list

Merge elements from both sorted list.

val sort_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list

Sort the list and remove duplicate elements.

val sorted_merge_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list

sorted_merge_uniq l1 l2 merges the sorted lists l1 and l2 and +removes duplicates.

  • Since: 0.10
val is_sorted : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> bool

is_sorted l returns true iff l is sorted (according to given order).

  • Parameter cmp: the comparison function (default Pervasives.compare).
  • Since: 0.17
val sorted_insert : cmp:('a ‑> 'a ‑> int) ‑> ?⁠uniq:bool ‑> 'a ‑> 'a list ‑> 'a list

sorted_insert 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 uniq_succ : eq:('a ‑> 'a ‑> bool) ‑> 'a list ‑> 'a list

uniq_succ 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 : (int ‑> 'a ‑> 'b) ‑> 'a t ‑> 'b t

Like 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.

val iteri : (int ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like 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.

val iteri2 : (int ‑> 'a ‑> 'b ‑> unit) ‑> 'a t ‑> 'b t ‑> unit

Iter on two lists.

  • Raises Invalid_argument: when lists do not have the same length.
  • Since: 2.0
val foldi : ('b ‑> int ‑> 'a ‑> 'b) ‑> 'b ‑> 'a t ‑> 'b

Like fold but it also passes in the index of each element to the folded function. Tail-recursive.

val foldi2 : ('c ‑> int ‑> 'a ‑> 'b ‑> 'c) ‑> 'c ‑> 'a t ‑> 'b t ‑> 'c

Fold on two lists, with index.

  • Raises Invalid_argument: when lists do not have the same length.
  • Since: 2.0
val get_at_idx : int ‑> 'a t ‑> 'a option

Get by index in the list. +If the index is negative, it will get element starting from the end +of the list.

val nth_opt : 'a t ‑> int ‑> 'a option

Safe version of nth.

  • Raises Invalid_argument: if the int is negative.
  • Since: 1.5
val get_at_idx_exn : int ‑> 'a t ‑> 'a

Get the i-th element, or

  • Raises Not_found: if the index is invalid. +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 i-th element (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 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 element at given index. 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 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 x set removes one occurrence of x from set. Linear time.

  • Since: 0.11
val mem : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> 'a t ‑> bool

Membership to the list. Linear time.

val subset : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> bool

Test for inclusion.

val uniq : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t

Remove duplicates w.r.t the equality predicate. +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

List union. Complexity is product of length of inputs.

val inter : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> 'a t

List intersection. 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

Like range but the second bound is excluded. +For instance range' 0 5 = [0;1;2;3;4].

val (--) : int ‑> int ‑> int t

Infix alias for range.

val (--^) : int ‑> int ‑> int t

Infix alias for range'.

  • Since: 0.17
val replicate : int ‑> 'a ‑> 'a t

Replicate the given element n times.

val repeat : int ‑> 'a t ‑> 'a t

Concatenate the list with itself n times.

Association Lists

module Assoc : sig ... end
val assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> 'b

Like Assoc.get_exn.

  • Since: 2.0
val assoc_opt : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> 'b option

Like Assoc.get.

  • Since: 1.5
val assq_opt : 'a ‑> ('a * 'b) t ‑> 'b option

Safe version of assq.

  • Since: 1.5
val mem_assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * _) t ‑> bool

Like Assoc.mem.

  • Since: 2.0
val remove_assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> ('a * 'b) t

Like Assoc.remove.

  • Since: 2.0

References on Lists

  • Since: 0.3.3
module Ref : sig ... end
module type MONAD : sig ... end

Monadic Operations

module Traverse : functor (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

Randomly choose an element in the list.

  • Raises Not_found: if the list is empty.
val random_sequence : 'a random_gen t ‑> 'a t random_gen
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of the list.

val of_seq : 'a sequence ‑> 'a t

Build a list from a given sequence. +In the result, elements appear in the same order as they did in the source sequence.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of the list.

val of_gen : 'a gen ‑> 'a t

Build a list from a given gen. +In the result, elements appear in the same order as they did in the source gen.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of the list.

val of_klist : 'a klist ‑> 'a t

Build a list from a given klist. +In the result, elements appear in the same order as they did in the source klist.

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

IO

val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print the contents of a list.

\ No newline at end of file diff --git a/2.1/containers/CCList/module-type-MONAD/index.html b/2.1/containers/CCList/module-type-MONAD/index.html new file mode 100644 index 00000000..732eec61 --- /dev/null +++ b/2.1/containers/CCList/module-type-MONAD/index.html @@ -0,0 +1,2 @@ + +MONAD (containers.CCList.MONAD)

Module type CCList.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 diff --git a/2.1/containers/CCListLabels.odoc b/2.1/containers/CCListLabels.odoc new file mode 100644 index 0000000000000000000000000000000000000000..ab3408b07129e867473243012999ab82af955d4b GIT binary patch literal 21796 zcmd6Pd3;>eb-zb?&(@4&OSUZAGQ@e3W~3QQ8f~_*EiYpm3?ep*4KzTE7-`-}gGV!B zW@JlF;w1cNlaMY?5KIY>42!{S6T%Wg!l$LqO4BCvS4wD`tt3tJgM_v~n=Uj>e&2J> zz3;t|WN^BCKK;Y;TkbjcZ1-&UzR9QZquqV+{&?@rw?FvwqD70k@Xy4*Rrt63k@chb zTq&8!*@fc0U3>QI%M?rdk|TDunCLyW+h~8=JD*$kwbM&O7k&QyKN0vVzPf19xf>TP zy7bmXi!S~^&7wu&Mde=xi&5p2%TMk~l%0V+`H9J_Jz?icMXQvzvY0!ONEkKca{KP7 zblNUBy?5WWY0GolkM8}-jo)~6@7|xp%H{4od-msZ`H6gCay&EY^#1g+M|$qM^r@Mz z6)t$@TOWV+OXc$BJ;{k|CRefxxny>4zA%w2?M@amqeZ88=HXvo_T<4&A3p!>FJ5ug zGk4TtCK=%Lu3dfb&hXybFMqY;!pjdn|L0GX%aNg6X`tWf{r2f-)h*9|^Ny?keBy=E zGnr<2vuT6V``TBl9*sZL_Q17IC-=Oz>UU<#<@KHbo!)RVM>~zqOQgj7b@hVw{BR28>uNBc5%`(X=|XePYOWUo%=y|ZZi-H zXL1=}eflwv(N86C(~=gjClcU~DE^`ks=YlqIcevhk8jDSXMNOs69YvI-*Ra&13T7( zm|+d}x`6%22ljU^*y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EslR1CYFqq3*Dy2DyrU8UVYoJOu!LyRQX&zE zeVWampbD0L*UM}^D2gzfA2iNoPC==$gy=OJ|43LTwVBON_NuAy;eh&j-fYINKG1ma zI&`&8AphDA`K%@q{V~jVldSaS95^D70e9Lh0{n&__~mXj?dW(OeRK{V9S4|t#3y-( z<)Nbql_I*_om<46;V`w3VXov{n<=`631GI@F78qDd$!g5lyI;zO!OMaqDiuJc_TBh z66a-HS+8wrFXe{;Oq9nC$RX7vmbPoGWoNq%feVF19j(okLyQ*loHW;NHUq1CRPMxA z5PFiWyXgni+|W(O%aUq4rD9eIHbl0oK69mbS7H5KL^&DO9Lj0MoHfxm`-m=@fk7Y9 z$B1Z!|4oUO2^XaIln>t>QP3;Pa}LF_XwRBv*{*_Q%)o9R{?9}~uZ#apDb^FZG@Ajg zkH|{Ql|K-qUPHAT|5-nNVV{pTn5<|@6gaEHJ#W?%312Wnh1j;sst~f z0XUFBr?zPcWVjI~`%c)63em4ZP^%n`IPxbdP*}xL3;`%Uv&NBs-OJnrj7SpJ{zULQ z=2}X@Dbff3i@!mkmRpnVHnVR=>?FxFAvIBDmeHkuDxqx`A|dzln|}tXHdlVR=zdw~ zu9GGV!t#?f+H@h`F!KE(c4Fdy_uWnm$?crac6REXew5z5`FA@_V`a^Op7KU-%A>ec zxy5_j&vqOiN1r2NRUQqhFCmpHTzT}r`|BHFoT>m+TBI@>R!2+V6n6*l~h zozy<08)r7cJH?RK3AFub>Ci*8`t$SyOZbUB+@YDrHw{ADN%Pzev+6S}c^V@jb(Q#V HknsNjtX#y^ literal 0 HcmV?d00001 diff --git a/2.1/containers/CCListLabels/.jbuilder-keep b/2.1/containers/CCListLabels/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCListLabels/Assoc/index.html b/2.1/containers/CCListLabels/Assoc/index.html new file mode 100644 index 00000000..03850fd6 --- /dev/null +++ b/2.1/containers/CCListLabels/Assoc/index.html @@ -0,0 +1,4 @@ + +Assoc (containers.CCListLabels.Assoc)

Module CCListLabels.Assoc

type ('a, 'b) t = ('a * 'b) list
val get : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a'bt ‑> 'b option

Find the element.

val get_exn : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a'bt ‑> 'b

Like get, but unsafe.

  • Raises Not_found: if the element is not present.
val set : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> 'b ‑> ('a'bt ‑> ('a'bt

Add the binding into the list (erase it if already present).

val mem : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a_t ‑> bool

mem x l returns true iff x is a key in l.

  • Since: 0.16
val update : eq:('a ‑> 'a ‑> bool) ‑> f:('b option ‑> 'b option) ‑> 'a ‑> ('a'bt ‑> ('a'bt

update k ~f l updates l on the key k, by calling f (get l 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'bt ‑> ('a'bt

remove x l removes the first occurrence of k from l.

  • Since: 0.17
\ No newline at end of file diff --git a/2.1/containers/CCListLabels/Infix/index.html b/2.1/containers/CCListLabels/Infix/index.html new file mode 100644 index 00000000..db928795 --- /dev/null +++ b/2.1/containers/CCListLabels/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.CCListLabels.Infix)

Module CCListLabels.Infix

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

Infix version of map with reversed arguments.

val (@) : 'a t ‑> 'a t ‑> 'a t

As append. Concatenate two lists.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

fun <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a ‑> 'b) ‑> 'a t ‑> 'b t

As map.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

l >>= f is flat_map f l.

val (--) : int ‑> int ‑> int t

Infix alias for range. Bounds included.

val (--^) : int ‑> int ‑> int t

Infix alias for range'. Second bound excluded.

  • Since: 0.17
\ No newline at end of file diff --git a/2.1/containers/CCListLabels/Ref/index.html b/2.1/containers/CCListLabels/Ref/index.html new file mode 100644 index 00000000..0d34dd03 --- /dev/null +++ b/2.1/containers/CCListLabels/Ref/index.html @@ -0,0 +1,3 @@ + +Ref (containers.CCListLabels.Ref)

Module CCListLabels.Ref

type 'a t = 'a list Pervasives.ref
val push : 'a t ‑> 'a ‑> unit
val pop : 'a t ‑> 'a option
val pop_exn : 'a t ‑> 'a

Unsafe version of pop.

  • Raises Failure: if the list is empty.
val create : unit ‑> 'a t

Create a new list reference.

val clear : _ t ‑> unit

Remove all elements.

val lift : ('a list ‑> 'b) ‑> 'a t ‑> 'b

Apply a list function to the content.

val push_list : 'a t ‑> 'a list ‑> unit

Add elements of the list at the beginning of the list ref. Elements +at the end of the list will be at the beginning of the list ref.

\ No newline at end of file diff --git a/2.1/containers/CCListLabels/Traverse/argument-1-M/index.html b/2.1/containers/CCListLabels/Traverse/argument-1-M/index.html new file mode 100644 index 00000000..4d3ab9eb --- /dev/null +++ b/2.1/containers/CCListLabels/Traverse/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (containers.CCListLabels.Traverse.1-M)

Parameter CCListLabels.Traverse.1-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 diff --git a/2.1/containers/CCListLabels/Traverse/index.html b/2.1/containers/CCListLabels/Traverse/index.html new file mode 100644 index 00000000..e8fbf9d2 --- /dev/null +++ b/2.1/containers/CCListLabels/Traverse/index.html @@ -0,0 +1,4 @@ + +Traverse (containers.CCListLabels.Traverse)

Module CCListLabels.Traverse

Parameters

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

Like map_m but map_m_par f (x::l) evaluates f x and +f l "in parallel" before combining their result (for instance +in Lwt).

\ No newline at end of file diff --git a/2.1/containers/CCListLabels/index.html b/2.1/containers/CCListLabels/index.html new file mode 100644 index 00000000..be35c37d --- /dev/null +++ b/2.1/containers/CCListLabels/index.html @@ -0,0 +1,60 @@ + +CCListLabels (containers.CCListLabels)

Module CCListLabels

Complements to list

include module type of ListLabels
val length : 'a list ‑> int
val hd : 'a list ‑> 'a
val compare_lengths : 'a list ‑> 'b list ‑> int
val compare_length_with : 'a list ‑> len:int ‑> int
val cons : 'a ‑> 'a list ‑> 'a list
val tl : 'a list ‑> 'a list
val nth : 'a list ‑> int ‑> 'a
val nth_opt : 'a list ‑> int ‑> 'a option
val rev : 'a list ‑> 'a list
val init : len:int ‑> f:(int ‑> 'a) ‑> 'a list
val append : 'a list ‑> 'a list ‑> 'a list
val rev_append : 'a list ‑> 'a list ‑> 'a list
val concat : 'a list list ‑> 'a list
val flatten : 'a list list ‑> 'a list
val iter : f:('a ‑> unit) ‑> 'a list ‑> unit
val iteri : f:(int ‑> 'a ‑> unit) ‑> 'a list ‑> unit
val map : f:('a ‑> 'b) ‑> 'a list ‑> 'b list
val mapi : f:(int ‑> 'a ‑> 'b) ‑> 'a list ‑> 'b list
val rev_map : f:('a ‑> 'b) ‑> 'a list ‑> 'b list
val fold_left : f:('a ‑> 'b ‑> 'a) ‑> init:'a ‑> 'b list ‑> 'a
val fold_right : f:('a ‑> 'b ‑> 'b) ‑> 'a list ‑> init:'b ‑> 'b
val iter2 : f:('a ‑> 'b ‑> unit) ‑> 'a list ‑> 'b list ‑> unit
val map2 : f:('a ‑> 'b ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c list
val rev_map2 : f:('a ‑> 'b ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c list
val fold_left2 : f:('a ‑> 'b ‑> 'c ‑> 'a) ‑> init:'a ‑> 'b list ‑> 'c list ‑> 'a
val fold_right2 : f:('a ‑> 'b ‑> 'c ‑> 'c) ‑> 'a list ‑> 'b list ‑> init:'c ‑> 'c
val for_all : f:('a ‑> bool) ‑> 'a list ‑> bool
val exists : f:('a ‑> bool) ‑> 'a list ‑> bool
val for_all2 : f:('a ‑> 'b ‑> bool) ‑> 'a list ‑> 'b list ‑> bool
val exists2 : f:('a ‑> 'b ‑> bool) ‑> 'a list ‑> 'b list ‑> bool
val mem : 'a ‑> set:'a list ‑> bool
val memq : 'a ‑> set:'a list ‑> bool
val find : f:('a ‑> bool) ‑> 'a list ‑> 'a
val find_opt : f:('a ‑> bool) ‑> 'a list ‑> 'a option
val filter : f:('a ‑> bool) ‑> 'a list ‑> 'a list
val find_all : f:('a ‑> bool) ‑> 'a list ‑> 'a list
val partition : f:('a ‑> bool) ‑> 'a list ‑> 'a list * 'a list
val assoc : 'a ‑> ('a * 'b) list ‑> 'b
val assoc_opt : 'a ‑> ('a * 'b) list ‑> 'b option
val assq : 'a ‑> ('a * 'b) list ‑> 'b
val assq_opt : 'a ‑> ('a * 'b) list ‑> 'b option
val mem_assoc : 'a ‑> map:('a * 'b) list ‑> bool
val mem_assq : 'a ‑> map:('a * 'b) list ‑> bool
val remove_assoc : 'a ‑> ('a * 'b) list ‑> ('a * 'b) list
val remove_assq : 'a ‑> ('a * 'b) list ‑> ('a * 'b) list
val split : ('a * 'b) list ‑> 'a list * 'b list
val combine : 'a list ‑> 'b list ‑> ('a * 'b) list
val sort : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val stable_sort : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val fast_sort : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val sort_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val merge : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list
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

Safe version of List.map.

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

Infix version of map with reversed arguments.

  • Since: 0.5
val cons : 'a ‑> 'a t ‑> 'a t

cons x l is x::l.

  • Since: 0.12
val append : 'a t ‑> 'a t ‑> 'a t

Safe version of List.append. +Concatenate two lists.

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 (@) : 'a t ‑> 'a t ‑> 'a t

Like append. +Concatenate two lists.

val filter : f:('a ‑> bool) ‑> 'a t ‑> 'a t

Safe version of List.filter. +filter p l returns all the elements of the list l +that satisfy the predicate p. The order of the elements +in the input list is preserved.

val fold_right : ('a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b

Safe version of fold_right. +fold_right f [a1; ...; an] b is +f a1 (f a2 (... (f an b) ...)). Not tail-recursive.

val fold_while : f:('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> init:'a ‑> 'b t ‑> 'a

Fold 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 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_map2 : f:('acc ‑> 'a ‑> 'b ‑> 'acc * 'c) ‑> init:'acc ‑> 'a list ‑> 'b list ‑> 'acc * 'c list

fold_map2 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_flat_map : f:('acc ‑> 'a ‑> 'acc * 'b list) ‑> init:'acc ‑> 'a list ‑> 'acc * 'b list

fold_flat_map f acc 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 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 compare : ('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a t ‑> int
val equal : ('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> bool
val flat_map : f:('a ‑> 'b t) ‑> 'a t ‑> 'b t

Map and flatten at the same time (safe). Evaluation order is not guaranteed.

val flatten : 'a t t ‑> 'a t

Safe flatten. Concatenate a list of lists.

val product : f:('a ‑> 'b ‑> 'c) ‑> 'a t ‑> 'b t ‑> 'c t

Cartesian product of the two lists, with the given combinator.

val fold_product : f:('c ‑> 'a ‑> 'b ‑> 'c) ‑> init:'c ‑> 'a t ‑> 'b t ‑> 'c

Fold on the cartesian product.

val diagonal : 'a t ‑> ('a * 'a) t

All pairs of distinct positions of the list. list_diagonal l will +return the list of List.nth i l, List.nth j l if i < j.

val partition_map : f:('a ‑> [< `Left of 'b | `Right of 'c | `Drop ]) ‑> 'a list ‑> 'b list * 'c list

partition_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 sublists_of_len : ?⁠last:('a list ‑> 'a list option) ‑> ?⁠offset:int ‑> len:int ‑> 'a list ‑> 'a list list

sublists_of_len 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].

See CCList.sublists_of_len for more details.

  • Since: 1.5
val pure : 'a ‑> 'a t

pure is return.

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

(<$>) is map.

val return : 'a ‑> 'a t

return x is x.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

l >>= f is flat_map f l.

val take : int ‑> 'a t ‑> 'a t

Take the n first elements, drop the rest.

val drop : int ‑> 'a t ‑> 'a t

Drop the n first elements, keep the rest.

val hd_tl : 'a t ‑> 'a * 'a t

hd_tl (x :: l) returns hd, 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 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

First element.

  • Since: 0.20
val tail_opt : 'a t ‑> 'a t option

Return the given list without its first element.

  • Since: 2.0
val last_opt : 'a t ‑> 'a option

Last element.

  • Since: 0.20
val find_pred : f:('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_pred_exn : f:('a ‑> bool) ‑> 'a t ‑> 'a

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

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 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 ~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 sorted_merge : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list

Merges elements from both sorted list.

val sort_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list

Sort the list and remove duplicate elements.

val sorted_merge_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list

sorted_merge_uniq l1 l2 merges the sorted lists l1 and l2 and +removes duplicates.

  • Since: 0.10
val is_sorted : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> bool

is_sorted l returns true iff l is sorted (according to given order).

  • Parameter cmp: the comparison function (default Pervasives.compare).
  • Since: 0.17
val sorted_insert : cmp:('a ‑> 'a ‑> int) ‑> ?⁠uniq:bool ‑> 'a ‑> 'a list ‑> 'a list

sorted_insert 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 uniq_succ : eq:('a ‑> 'a ‑> bool) ‑> 'a list ‑> 'a list

uniq_succ 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

Like 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.

val iteri : f:(int ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like 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.

val foldi : f:('b ‑> int ‑> 'a ‑> 'b) ‑> init:'b ‑> 'a t ‑> 'b

Like fold but it also passes in the index of each element to the folded function. Tail-recursive.

val get_at_idx : int ‑> 'a t ‑> 'a option

Get by index in the list. +If the index is negative, it will get element starting from the end +of the list.

val get_at_idx_exn : int ‑> 'a t ‑> 'a

Get the i-th element, or

  • Raises Not_found: if the index is invalid. +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 i-th element (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 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 element at given index. 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 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 x set removes one occurrence of x from set. Linear time.

  • Since: 0.11
val mem : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> 'a t ‑> bool

Membership to the list. Linear time.

val subset : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> bool

Test for inclusion.

val uniq : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t

Remove duplicates w.r.t the equality predicate. +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

List union. Complexity is product of length of inputs.

val inter : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> 'a t

List intersection. 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

Like range but the second bound is excluded. +For instance range' 0 5 = [0;1;2;3;4].

val (--) : int ‑> int ‑> int t

Infix alias for range.

val (--^) : int ‑> int ‑> int t

Infix alias for range'.

  • Since: 0.17
val replicate : int ‑> 'a ‑> 'a t

Replicate the given element n times.

val repeat : int ‑> 'a t ‑> 'a t

Concatenate the list with itself n times.

Association Lists

module Assoc : sig ... end
val assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> 'b

Like Assoc.get_exn.

  • Since: 2.0
val assoc_opt : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> 'b option

Like Assoc.get.

  • Since: 2.0
val assq_opt : 'a ‑> ('a * 'b) t ‑> 'b option

Safe version of assq.

  • Since: 2.0
val mem_assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * _) t ‑> bool

Like Assoc.mem.

  • Since: 2.0
val remove_assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> ('a * 'b) t

Like Assoc.remove.

  • Since: 2.0

References on Lists

  • Since: 0.3.3
module Ref : sig ... end
module type MONAD : sig ... end

Monadic Operations

module Traverse : functor (M : MONAD) -> sig ... end

Conversions

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = Random.State.t ‑> 'a
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

Randomly choose an element in the list.

  • Raises Not_found: if the list is empty.
val random_sequence : 'a random_gen t ‑> 'a t random_gen
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of the list.

val of_seq : 'a sequence ‑> 'a t

Build a list from a given sequence.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of the list.

val of_gen : 'a gen ‑> 'a t

Build a list from a given gen.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of the list.

val of_klist : 'a klist ‑> 'a t

Build a list from a given klist.

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

IO

val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print the contents of a list.

\ No newline at end of file diff --git a/2.1/containers/CCListLabels/module-type-MONAD/index.html b/2.1/containers/CCListLabels/module-type-MONAD/index.html new file mode 100644 index 00000000..c74a4bba --- /dev/null +++ b/2.1/containers/CCListLabels/module-type-MONAD/index.html @@ -0,0 +1,2 @@ + +MONAD (containers.CCListLabels.MONAD)

Module type CCListLabels.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 diff --git a/2.1/containers/CCMap.odoc b/2.1/containers/CCMap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..97fc4aea91ea55af86875b1a251e3ff053569a8b GIT binary patch literal 5454 zcma)A4R9P~8NS=yFKI%jU=6kf#65C9Nk}f&(o(2`*B`=EDQ!8*P!;3mZZBDLw|ngF zB@N6J9Z_KTnGH-^5yWkqAYzp^l>rej3?e@c_y+}%VLE`qC`xAl9Xg0U-{0M~1;)-~ z`t5!1`@Fy3`@Y}jl$>JU;_Q-a?&@uKJ{*h1QurhI>%iX$dwYtG?HiVDy57#z>ecIv zT0U2Q=BaBQ-+N&G`fURXfAPV*0%z>_cP!TWVk~yz?ckl66N@Ed;s3?1DM1+Cw=y3F zE6&^Eo3>{;wx>H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Map

Provide useful functions and iterators on Map.S

  • Since: 0.5
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type OrderedType = Map.OrderedType
module type S : sig ... end
module Make : functor (O : Map.OrderedType) -> S with type 'a Make.t = 'a Map.Make(O).t and type Make.key = O.t
\ No newline at end of file diff --git a/2.1/containers/CCMap/module-type-S/index.html b/2.1/containers/CCMap/module-type-S/index.html new file mode 100644 index 00000000..7b263117 --- /dev/null +++ b/2.1/containers/CCMap/module-type-S/index.html @@ -0,0 +1,10 @@ + +S (containers.CCMap.S)

Module type CCMap.S

include Map.S
type key
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 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 get : key ‑> 'a t ‑> 'a option

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 Nonek 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

Safe version of choose.

  • Since: 1.5
val min_binding_opt : 'a t ‑> (key * 'a) option

Safe version of min_binding.

  • Since: 1.5
val max_binding_opt : 'a t ‑> (key * 'a) option

Safe version of max_binding.

  • Since: 1.5
val find_opt : key ‑> 'a t ‑> 'a option

Safe version of find.

  • Since: 1.5
val find_first : (key ‑> bool) ‑> 'a t ‑> key * 'a

Find smallest binding satisfying the monotonic predicate. +See Map.S.find_first.

  • Since: 1.5
val find_first_opt : (key ‑> bool) ‑> 'a t ‑> (key * 'a) option

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 union : (key ‑> 'a ‑> 'a ‑> 'a option) ‑> 'a t ‑> 'a t ‑> 'a t

Union of both maps, using the function to combine bindings +that belong to both inputs.

  • Since: 1.4
val of_seq : (key * 'a) sequence ‑> 'a t

Like of_list.

val add_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
  • Since: 0.14
val to_seq : 'a t ‑> (key * 'a) sequence
val of_list : (key * 'a) list ‑> 'a t

Build a map from the given list 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 add_list : 'a t ‑> (key * 'a) list ‑> 'a t
  • Since: 0.14
val keys : _ t ‑> key sequence

Iterate on keys only.

  • Since: 0.15
val values : 'a t ‑> 'a sequence

Iterate on values only.

  • Since: 0.15
val to_list : 'a t ‑> (key * 'a) list
val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠arrow:string ‑> ?⁠sep:string ‑> key printer ‑> 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/2.1/containers/CCNativeint.odoc b/2.1/containers/CCNativeint.odoc new file mode 100644 index 0000000000000000000000000000000000000000..ce1416f954efa64f57c41ed29a8bf6aa2133e8d0 GIT binary patch literal 7521 zcmb_h3v3+48Me>6B)+ue9U(+u;yc@Sv3)+rCP^dPxnM{Mg#Zb(B^0c^yFK4Fd%Kt2 zJ;w(Hp%$d7qOj%>#G}zBJPH&_pwJ**4IrRxpcD#)A_OQDN@yrZ6(FGk{r;KRd)NjQ zwNf7T%=i7T`Df<;XYIV5>l;WdO{Fis`j$spT3UMWSH<7M@%P}JOLDg5X@;dc?)ILs zv2~hfOzMW^WzyU3-re=+&I>*o-n?_)eecY_MbH;1EiLnoZfRL~SWC;H@6K;&iMIq_ zL5LFZgJ9R{OyDQ$ssjAl-g%;KmSF`e*bXZ@c20L)+v&5oK@1k@6PV@D-ZP4Z%Sv{> zV(J8)H1fL3Y_I{gE&OOPuc$MxTGm-GofI-40%|^Hc7eIZgr(=%;L^UV;nieE6X40Q zvZ;A6q~s7J2m@^})onx6o{du@|$i744@X>ik; z!0#AbicoiwOLAb@5XC;t@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h@Z zsWC20*_H{e^C4r`aoE;N#%v2uQS>Gi7T)R`VRuFjb_;;V@3;xvxt4rJ41I&T*$;Wk zl5{m_Rx~W8LXdb7F{^*m`^XrE#diC=xHu z6^S|Z3X_`6?2YCPH-`&4T&#j@Xi(Loar2NG4mJg@bFf7zpH4PiQ}XS&zQ~jUXbKz@E30(2x%%RZxM_r&~^oNQJ&t1QD|w_gwD>!HuG=y)dRjAz9GR?s*L6E zncv-E1&%L6lrP~>`9eNk>@C$Dm8<<`yY4Ye; zN}5^I()O5Gwo$32($HAzQx@&*FV5k5ClAxxr{-EbX&LRl8A&SwFXwq_q4Atl}R(;A9aWFQgbya~{?o0 z9BS`I-%5!q(wK@@*%LII0Ilr2Cbkoc?0m`7@OEvYy_mc zeyL()3r6~SSr!T4h +Infix (containers.CCNativeint.Infix)

Module CCNativeint.Infix

val (+) : t ‑> t ‑> t
val (-) : t ‑> t ‑> t
val (~-) : t ‑> t
val (*) : t ‑> t ‑> t
val (/) : t ‑> t ‑> t
val (mod) : t ‑> t ‑> t
val (land) : t ‑> t ‑> t
val (lor) : t ‑> t ‑> t
val (lxor) : t ‑> t ‑> t
val (lnot) : t ‑> t
val (lsl) : t ‑> int ‑> t
val (lsr) : t ‑> int ‑> t
val (asr) : t ‑> int ‑> t
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 diff --git a/2.1/containers/CCNativeint/index.html b/2.1/containers/CCNativeint/index.html new file mode 100644 index 00000000..57ac31f8 --- /dev/null +++ b/2.1/containers/CCNativeint/index.html @@ -0,0 +1,40 @@ + +CCNativeint (containers.CCNativeint)

Module CCNativeint

Nativeint

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.

  • Since: 2.1
include module type of sig ... end
val zero : nativeint
val one : nativeint
val minus_one : nativeint
external neg : nativeint ‑> nativeint = "%nativeint_neg"
external add : nativeint ‑> nativeint ‑> nativeint = "%nativeint_add"
external sub : nativeint ‑> nativeint ‑> nativeint = "%nativeint_sub"
external mul : nativeint ‑> nativeint ‑> nativeint = "%nativeint_mul"
external div : nativeint ‑> nativeint ‑> nativeint = "%nativeint_div"
external rem : nativeint ‑> nativeint ‑> nativeint = "%nativeint_mod"
val succ : nativeint ‑> nativeint
val pred : nativeint ‑> nativeint
val abs : nativeint ‑> nativeint
val size : int
val max_int : nativeint
val min_int : nativeint
external logand : nativeint ‑> nativeint ‑> nativeint = "%nativeint_and"
external logor : nativeint ‑> nativeint ‑> nativeint = "%nativeint_or"
external logxor : nativeint ‑> nativeint ‑> nativeint = "%nativeint_xor"
val lognot : nativeint ‑> nativeint
external shift_left : nativeint ‑> int ‑> nativeint = "%nativeint_lsl"
external shift_right : nativeint ‑> int ‑> nativeint = "%nativeint_asr"
external shift_right_logical : nativeint ‑> int ‑> nativeint = "%nativeint_lsr"
external of_int : int ‑> nativeint = "%nativeint_of_int"
external to_int : nativeint ‑> int = "%nativeint_to_int"
external of_float : float ‑> nativeint = "caml_nativeint_of_float" "caml_nativeint_of_float_unboxed"
external to_float : nativeint ‑> float = "caml_nativeint_to_float" "caml_nativeint_to_float_unboxed"
external of_int32 : int32 ‑> nativeint = "%nativeint_of_int32"
external to_int32 : nativeint ‑> int32 = "%nativeint_to_int32"
external of_string : string ‑> nativeint = "caml_nativeint_of_string"
val of_string_opt : string ‑> nativeint option
val to_string : nativeint ‑> string
type t = nativeint
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external format : string ‑> nativeint ‑> string = "caml_nativeint_format"
val (+) : t ‑> t ‑> t

Addition.

val (-) : t ‑> t ‑> t

Subtraction.

val (~-) : t ‑> t

Unary negation.

val (*) : t ‑> t ‑> t

Multiplication.

val (/) : 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 Pervasives.(/).

val (mod) : t ‑> t ‑> t

x mod y is the integer remainder. +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 (land) : t ‑> t ‑> t

Bitwise logical and.

val (lor) : t ‑> t ‑> t

Bitwise logical or.

val (lxor) : t ‑> t ‑> t

Bitwise logical exclusive or.

val (lnot) : t ‑> t

Bitwise logical negation.

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.

module Infix : sig ... end
val equal : t ‑> t ‑> bool

The equal function for native integers. +Like Pervasives.(=) x y).

val hash : t ‑> int

Like Pervasives.abs (to_int x).

Conversion

val to_int : t ‑> int

Convert the given native integer (type nativeint) to an +integer (type int). The high-order bit is lost +during the conversion.

val of_int : int ‑> t

Alias to Nativeint.of_int. +Convert the given integer (type int) to a native integer (type nativeint).

val to_float : t ‑> float

Convert the given native integer to a floating-point number.

val of_float : float ‑> t

Alias to Nativeint.of_float. +Convert the given floating-point number to a native integer, +discarding the fractional part (truncate towards 0). +The result of the conversion is undefined if, after truncation, the number +is outside the range [CCNativeint.min_int, CCNativeint.max_int].

val to_string : t ‑> string

Return the string representation of its argument, in decimal.

val of_string_exn : string ‑> t

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 of_string : string ‑> t option

Safe version of of_string_exn. +Like of_string_exn, but return None instead of raising.

val of_string_opt : string ‑> t option

Alias to of_string.

\ No newline at end of file diff --git a/2.1/containers/CCOpt.odoc b/2.1/containers/CCOpt.odoc new file mode 100644 index 0000000000000000000000000000000000000000..a798bf4c286bb6d2233a0530af0bc7fc96315236 GIT binary patch literal 6412 zcmcgw3yfS<8Qz`VyDvnDya~wJ&U3fBGqYRhgFc+HvUH85g)J%%Gv1xK)4l1;y~DkC zc6W+4N(2nSaJRKvu}Uv*i3p{!Rxp7gK{OyfKvWQdL1Kv{v?0}~LHz!6&Ye3`wg@B| zQuf?4=luV7{^xg&RkR9&L+Rmk_NzPYex$9fEslRG{+*0}C+_JlSf;BPrfxg8#YaZg zSKVB8ZQJI*J@fX>FGs)hgID%n*Zmi<@$`LdZC#bNw$r}T)^^Ijy4u=eZT|b(u0%ZF z-@hj3dr62lEYr#5a!Qx)CoZU!O1kZ3zrAb8^53kQ9)05KUmO}8{cE4^4~~qivrMaE z+0{v-;AM|&*pu0{{^9!1?F*lL;nrs!_x)ufTBU55u5O!JdDOBintOrf7zM}6*6+XR zqx;7n*!;8Um>-&8dYpyY+L%Wx~rnfWt z*wYWZ;k|Rp%=fomKIi-W8+3aLP^NTX*`>Vk$DOa8IB@p4scmm=`NQqNa;at(t%{d@ zxIBFSaWB81K6b;t=<64r{x#NHf)-lf!(B$tQ}r4yqGA^F+_BFUAaq z`Lodyo8ccNeDqsv6&r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`M1$@%XEDtyb>f8^z)aX)zft4CV5E3e$&SSPJ}gipYg{{i+4wn_j1 literal 0 HcmV?d00001 diff --git a/2.1/containers/CCOpt/.jbuilder-keep b/2.1/containers/CCOpt/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCOpt/Infix/index.html b/2.1/containers/CCOpt/Infix/index.html new file mode 100644 index 00000000..ef52846b --- /dev/null +++ b/2.1/containers/CCOpt/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.CCOpt.Infix)

Module CCOpt.Infix

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

x >|= f is map f x.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Monadic bind.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

f <$> (Some x) returns Some (f x) and f <$> None returns None.

val (<$>) : ('a ‑> 'b) ‑> 'a t ‑> 'b t

Like map.

val (<+>) : 'a t ‑> 'a t ‑> 'a t

a <+> b is a if a is Some _, b otherwise.

\ No newline at end of file diff --git a/2.1/containers/CCOpt/index.html b/2.1/containers/CCOpt/index.html new file mode 100644 index 00000000..851cd7dc --- /dev/null +++ b/2.1/containers/CCOpt/index.html @@ -0,0 +1,10 @@ + +CCOpt (containers.CCOpt)

Module CCOpt

Options

type +'a t = 'a option
val map : ('a ‑> 'b) ‑> 'a t ‑> 'b t

Transform the element inside, 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 if f o 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 two options, using custom comparators for the value. +None is always assumed to be less than Some _.

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

Test for equality between option types using a custom equality predicat.

val return : 'a ‑> 'a t

Monadic return, that is return x = Some x.

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

Infix version of map.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Monadic bind.

val flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b t

Flip version of >>=.

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

Iterate on 0 or 1 element.

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

Fold on 0 or 1 element.

val filter : ('a ‑> bool) ‑> 'a t ‑> 'a t

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

Return true iff there exists an element for which the provided function evaluates to true.

  • Since: 0.17
val for_all : ('a ‑> bool) ‑> 'a t ‑> bool

Return true iff the provided function 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 = None.

  • Since: 0.18
val get_exn : 'a t ‑> 'a

Open the option, possibly failing if it is None.

  • Raises Invalid_argument: if the option is None.
val get_lazy : (unit ‑> 'a) ‑> 'a t ‑> 'a

get_lazy default_fn x unwraps x, but if x = 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 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 f x y is similar to wrap but for binary functions.

Applicative

val pure : 'a ‑> 'a t

Alias to return.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

f <$> (Some x) returns Some (f x) and f <$> None returns None.

val (<$>) : ('a ‑> 'b) ‑> 'a t ‑> 'b t

Like map.

Alternatives

val or_ : else_:'a t ‑> 'a t ‑> 'a t

or_ ~else_ a is a if a is Some _, else_ otherwise.

  • Since: 1.2
val or_lazy : else_:(unit ‑> 'a t) ‑> 'a t ‑> 'a t

or_lazy ~else_ a is a if a is Some _, else_ () otherwise.

  • Since: 1.2
val (<+>) : 'a t ‑> 'a t ‑> 'a t

a <+> b is a if a is Some _, b otherwise.

val choice : 'a t list ‑> 'a t

choice returns the first non-None element of the list, or None.

Infix Operators

  • Since: 0.16
module Infix : sig ... end

Conversion and IO

val to_list : 'a t ‑> 'a list
val of_list : 'a list ‑> 'a t

Head of list, or None.

val to_result : 'e ‑> 'a t ‑> ('a'e) Result.result
  • Since: 1.2
val to_result_lazy : (unit ‑> 'e) ‑> 'a t ‑> ('a'e) Result.result
  • Since: 1.2
val of_result : ('a_) Result.result ‑> 'a t
  • Since: 1.2
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = Random.State.t ‑> 'a
val random : 'a random_gen ‑> 'a t random_gen
val choice_seq : 'a t sequence ‑> 'a t

choice_seq s is similar to choice, but works on sequences. +It returns the first Some x occurring in s, or None otherwise.

  • Since: 0.13
val to_gen : 'a t ‑> 'a gen
val to_seq : 'a t ‑> 'a sequence
val pp : 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/2.1/containers/CCOrd.odoc b/2.1/containers/CCOrd.odoc new file mode 100644 index 0000000000000000000000000000000000000000..217c4ce1cc4b111a003175e4875e7cb57aa6dc42 GIT binary patch literal 2532 zcmdT_UuauZ7*FGkTcV7iJ}5FhZId=>(%@T^Hzz*$rxvuJC@pA5A4;#P47M5 z|L^<#zQfAQ85+)w7{EYzBy}) z)e)aNd53Y5*R|%rb3C7)V^xy(X_a~TMaGZ&HS7@3YBwf-v{a{VIbS9fTz7-Qm&fK$ z-Wps!*7zviSev=`&>maJr3>e+zU}}j74dzYGEq8U0d^7NWx}a9n?WTKEE3|OV38r> zk}B~6KZ}An93W1DI`@2pJp}dUZ2JOu>&DP2v1Y@I{&`b~m0l3TsXVp%jh1216-|-(I$cn9>4PS3*-8eyPM`xrh*m046wzgN5`YqY=pdBHK?GtSSIPB2<0jyw z3cHdlG3JIfzN88kQfF^XN|nk}ru{6IBUSliU`loGC(Gox}&dlJ?TrEo-BXN_nz zRdE>(gf*aK$F*^I1PZSSsBV4ImSWfAq(L1v%dr9}g7KE9hXcyI_7pCr(hp6HXTYE} z;tV5rM`@UO7B#Y{nUP}j`f%G-BkUvD>T!mpNJ6*T?`cGRC(5iBd`qz#1}}v`%_Uj$uXVCfsmhR82qLzP}tdU@ z8k}Fnu1mP0vj?qjg1B!6mJ2$nx^2tlWFa>^YGD4`^}v6Is12R#QmTg7T;wKDJ@!B`X>;srGV#jg;)YU80w-E-6|)kuOYnuVLeL#%X+IIx9)7=I(l zU^Y?X?7yV_2CQILfq45+n&f74<`4tL;btkL3MFniqnQWEcnL!$l^O#U8~>1#j}~b# z2U&!49?T^=RBVmv%KQLGv5Aqei`tC$+f?tcdO*`<0QF;7Ib*2QRNbIFQK1|hsXPFx z`es=J3<6*PK&I&%&|U+k%evF*Ziq$iOQpx3e^~7`v2(vyp$(+hK6b&4;)8r!0CAoL zS_8a8T*tb8(7rk$^!R@by^3GX#-hcP_60NlwAIp=Q2hV7KiefoA8qfISajSJ+F2~I f=rbDZ*5RA#=GQlLGy2@WbTjJeAaMKG0-nDBxT3q@ literal 0 HcmV?d00001 diff --git a/2.1/containers/CCOrd/.jbuilder-keep b/2.1/containers/CCOrd/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCOrd/Infix/index.html b/2.1/containers/CCOrd/Infix/index.html new file mode 100644 index 00000000..518312f2 --- /dev/null +++ b/2.1/containers/CCOrd/Infix/index.html @@ -0,0 +1,4 @@ + +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 diff --git a/2.1/containers/CCOrd/index.html b/2.1/containers/CCOrd/index.html new file mode 100644 index 00000000..bf28fcc5 --- /dev/null +++ b/2.1/containers/CCOrd/index.html @@ -0,0 +1,15 @@ + +CCOrd (containers.CCOrd)

Module CCOrd

Comparisons

type 'a t = 'a ‑> 'a ‑> int

Comparison (total ordering) between two elements, that returns an int.

val compare : 'a t

Polymorphic "magic" comparison.

val opp : 'a t ‑> 'a t

Opposite order.

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 diff --git a/2.1/containers/CCPair.odoc b/2.1/containers/CCPair.odoc new file mode 100644 index 0000000000000000000000000000000000000000..11ff9832860fe3caa4a85af63d25b088739c3253 GIT binary patch literal 2542 zcmb_eU2GIp6y9BS42#+jHPK*@yX=2yceVvlOj`yPOGs=iDfo-QyR&z8M`q>@^V4=Q zQDcZN`Y;OtLLlU#l=xt@At6K_OcOK>51RNB6Nx6i5Mv;L7oL3a+&i;$3y3xGVYc^9 z@BPlX-}%mWht{duKTsYlR}LOI`&BF!%flnV^B6oUXM0s@d04lIRYO(Q_EEpCAplj{8nGnh!a#!p4hnQhvBKwZ}xwCb9D4tiLw4_b&Oinq>kOx)u3`~ zd{#d3;>Ffw=lS_7r@p(y*t1n^8oK2X$HK-abxiDS#jdWpL8bNiM?DuNzSy^I&F{Nj znm_g+L<$!Kl~s>V9M6s(*?F_DedokaKb~i-cbqtruyK;W&J)S&zaG1~vTyZ<;-MP{ ze)*WO+-|jrA;njX9qtq7FG+82|MF+=om<~4!R&h1QDv1nL=G7&Lp~{4Zc>xTu5MCG zo}$h^*TyP=WgWidy)|Dq>T;cE*f+dN&r{Xcj;G!;(4+I$ubjNRXNwZBLvu69r_)}* z6lIRFAdMCNTLapH!+aV|*pb=Kl4DsD?<2r;kV=oi2w~(2wl#;ENcUW%Qq!guu{^h| zu*2C(d0?Y*P5~JHQ#%s`Gs!oT>u%!;)VBcD9styKKOZ0s6{q`9tHgp5a){?UmWx=s zSkzGTI$c%(RKNo0Ii-`QDn>OxR~3PLh$9bnkO%(}8E`cb@LtF&&sHGwQ7uHim;q!? z#JY)=MXi>JJc`(-!RbN~_4f9nlA^F+a~X|c8&M0@sMkcUUMDW1T8FjnQ>fv2YC*cb zaGu)jsP!=FA4Q0|*Ttr&LGA?|N&rEFAh`*`rJh4I-$SlVR2>`o0a8aAb&w4W=b|Yc zG9U&qd2M(SUXvh>guIqbx>M;QG(0vZG(5Hx?SbINw;03C88-F~jLl*~9{K-f_ z9bF#H`j+lNavd?%6i{pOVL`kUH?!_kSnyPO0!HG*3u5mOD!M_Cxd6jQoI+?Ual{XD z#i600k~rYnNFSU(gJ@7Z(8%3j|1NbYK9ehsjEsb^nJ!pIZ#0*NdoQ6&@vn155VXJ@ zj$r>EHB0e7bH#i<&!O7|4Z#pKSdc|JZ}$NZ5}HQ+BhZ=9o((h&dh08r9bDiBw;IkF zuYm7iVe|+Lny&DsC@9|H{D`SLYt5hkK|0^G(uw=+-<48WZgE_h^qrG-dBOyEAkEvbmq})jZz~jvDnOSm*hi>I=H(I{J(3$7EH_)cqOqz0Qkc@fis|^|BegSsFb)- zupRN40Js;U+Z4?0oO0%qwv_m-1a=Ic4q!ll52uBcr1)95X@x+RJ+RgmS4!%YagGAl z1h?+USFwet&2^3qpb~P&9(cPT9ht;y(#Y)jPA*-7)h0I*-YFg1=RytI8Q9JV%)1^e eZa^w9n~|2S3h(7`4xdci^f_rgY{APQ*S`U|sng>C literal 0 HcmV?d00001 diff --git a/2.1/containers/CCPair/.jbuilder-keep b/2.1/containers/CCPair/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCPair/index.html b/2.1/containers/CCPair/index.html new file mode 100644 index 00000000..e236b9aa --- /dev/null +++ b/2.1/containers/CCPair/index.html @@ -0,0 +1,4 @@ + +CCPair (containers.CCPair)

Module CCPair

Tuple Functions

type ('a, 'b) t = 'a * 'b
val make : 'a ‑> 'b ‑> ('a'bt

Make a tuple from its components.

  • Since: 0.16
val map1 : ('a ‑> 'b) ‑> ('a * 'c) ‑> 'b * 'c

map1 f (x, y) returns (f x, y).

val map2 : ('a ‑> 'b) ‑> ('c * 'a) ‑> 'c * 'b

map2 f (x, y) returns (x, f y).

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 map_fst : ('a ‑> 'b) ‑> ('a * _) ‑> 'b

Compose the given function with fst.

  • Since: 0.3.3
val map_snd : ('a ‑> 'b) ‑> (_ * 'a) ‑> 'b

Compose the given function with snd.

  • Since: 0.3.3
val iter : ('a ‑> 'b ‑> unit) ‑> ('a * 'b) ‑> unit
val swap : ('a * 'b) ‑> 'b * 'a

Swap the components of the tuple.

val (<<<) : ('a ‑> 'b) ‑> ('a * 'c) ‑> 'b * 'c

Map on the left side of the tuple.

val (>>>) : ('a ‑> 'b) ‑> ('c * 'a) ‑> 'c * 'b

Map on the right side of the tuple.

val (***) : ('a ‑> 'c) ‑> ('b ‑> 'd) ‑> ('a * 'b) ‑> 'c * 'd

Map on both sides of a tuple.

val (&&&) : ('a ‑> 'b) ‑> ('a ‑> 'c) ‑> 'a ‑> 'b * 'c

f &&& g is fun x -> f x, g x. It splits the computations into +two parts.

val merge : ('a ‑> 'b ‑> 'c) ‑> ('a * 'b) ‑> 'c

Uncurrying (merges the two components of a tuple).

val fold : ('a ‑> 'b ‑> 'c) ‑> ('a * 'b) ‑> 'c

Synonym to merge.

  • Since: 0.3.3
val dup : 'a ‑> 'a * 'a

dup x = (x,x) (duplicate the value).

  • Since: 0.3.3
val dup_map : ('a ‑> 'b) ‑> 'a ‑> 'a * 'b

dup_map f x = (x, f x). Duplicates the value and applies the function +to the second copy.

  • Since: 0.3.3
val equal : ('a ‑> 'a ‑> bool) ‑> ('b ‑> 'b ‑> bool) ‑> ('a * 'b) ‑> ('a * 'b) ‑> bool
val compare : ('a ‑> 'a ‑> int) ‑> ('b ‑> 'b ‑> int) ‑> ('a * 'b) ‑> ('a * 'b) ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit
val pp : ?⁠sep:string ‑> 'a printer ‑> 'b printer ‑> ('a * 'b) printer

Print a pair given an optional separator and a method for printing each of its elements.

\ No newline at end of file diff --git a/2.1/containers/CCParse.odoc b/2.1/containers/CCParse.odoc new file mode 100644 index 0000000000000000000000000000000000000000..154eba44dbd01b12546e91fc9d8ed02609357cee GIT binary patch literal 10061 zcmd^FeT*FES-(5a+}&>4G^hosRnxq;w|BdH-rGB$&&40Hv&q$I9P;7BcB_;`$L#LA zx09QlS!QPMZjDJmlopjXolR?}!hj|wp-D)BW2vMnQfep=5E7PvA|;Aws}__$N*a}d z5LCeLdEWUt+pPkBKoORFJNv%x^ZmTf*R0cWn)ADAOSQ$1p8oBZMn*hda}Ow!aeVJ`RvRagVEXA$>+cC98;jP-y0dpua1n|usAaE z-rFZfMv5chTSTCZ1!4H&&Gj%i^dadE#4)qmv!q~hu2^xp4bwJ!$Mx!AJ$y7jGBWy< z;D1g}+9KlXz=3>Tt@?wW6uv8^I4JHAPFt9^FHVWO=#iJ__#*|dq%XSbtClp{VvB*c zB2>|i?X)Cz2H3l+yj2}kVp6oJ5GF+AkS-u^w>oau0G#hc))nPV)9;uz zv{Dd-2MVH`GEjD<-*>T9tyc>b5)oDu)@9t3m>o7w?JC+%_(;JF&y%hXN(ZeHn6B5g z=`fsMS-I1(ov!2dI%YFi{HLSm7tY@OrNN)MhhKj6H~-=*VYqk2=vt&_*ETFA$SsCv zHoahR@cbvQeeu}uu7BW$uOI)=%a2_XhI2=yyMf&eiS4u6w_khg@2;y}zg&LwJ11W` z7lyO&s%_{%z9U!02r;=*d9Z(6N|mTVh9y?E~2m;dAY-~RlorDsn3;m0oR({HW^;iDIy z)NU<1?y7WM#|^@I{bCpfQ%1dB51#m~q4w@s_#A*~Eqo#f&djPih$ z-wm|)TqGzQnub#11Km>7vDAJk+SlG5Z*EnUff}x1H#>p0gcG!P`uwx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CParse/.jbuilder-keep b/2.1/containers/CCParse/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCParse/Infix/index.html b/2.1/containers/CCParse/Infix/index.html new file mode 100644 index 00000000..2db2c0dc --- /dev/null +++ b/2.1/containers/CCParse/Infix/index.html @@ -0,0 +1,13 @@ + +Infix (containers.CCParse.Infix)

Module CCParse.Infix

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

Map.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Monadic 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 +results of a is ignored.

val (<|>) : 'a t ‑> 'a t ‑> 'a t

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. +See try_ to ensure a does not consume anything (but it is best +to avoid wrapping large parsers with try_).

val (<?>) : 'a t ‑> string ‑> 'a t

a <?> msg behaves like a, but if a fails without +consuming any input, it fails with msg +instead. Useful as the last choice in a series of <|>: +a <|> b <|> c <?> "expected a|b|c".

\ No newline at end of file diff --git a/2.1/containers/CCParse/U/index.html b/2.1/containers/CCParse/U/index.html new file mode 100644 index 00000000..317eebba --- /dev/null +++ b/2.1/containers/CCParse/U/index.html @@ -0,0 +1,6 @@ + +U (containers.CCParse.U)

Module CCParse.U

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.

val word : string t

Non empty string of alpha num, start with alpha.

val pair : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a t ‑> 'b t ‑> ('a * 'b) t

Parse a pair using OCaml whitespace conventions. +The default is "(a, b)".

val triple : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a t ‑> 'b t ‑> 'c t ‑> ('a * 'b * 'c) t

Parse a triple using OCaml whitespace conventions. +The default is "(a, b, c)".

\ No newline at end of file diff --git a/2.1/containers/CCParse/index.html b/2.1/containers/CCParse/index.html new file mode 100644 index 00000000..83bcba9e --- /dev/null +++ b/2.1/containers/CCParse/index.html @@ -0,0 +1,51 @@ + +CCParse (containers.CCParse)

Module CCParse

Very Simple Parser Combinators

      open CCParse;;
+
+      type tree = L of int | N of tree * tree;;
+
+      let mk_leaf x = L x
+      let mk_node x y = N(x,y)
+
+      let ptree = fix @@ fun self ->
+        skip_space *>
+          ( (try_ (char '(') *> (pure mk_node <*> self <*> self) <* char ')')
+            <|>
+              (U.int >|= mk_leaf) )
+      ;;
+
+      parse_string_exn ptree "(1 (2 3))" ;;
+      parse_string_exn ptree "((1 2) (3 (4 5)))" ;;
+
Parse a list of words
      open Containers.Parse;;
+      let p = U.list ~sep:"," U.word;;
+      parse_string_exn p "[abc , de, hello ,world  ]";;
Stress Test

+This makes a list of 100_000 integers, prints it and parses it back.

      let p = CCParse.(U.list ~sep:"," U.int);;
+
+      let l = CCList.(1 -- 100_000);;
+      let l_printed =
+        CCFormat.(to_string (within "[" "]" (list ~sep:(return ",@,") int))) l;;
+
+      let l' = CCParse.parse_string_exn p l_printed;;
+
+      assert (l=l');;
type 'a or_error = ('a, string) Result.result
type line_num = int
type col_num = int
type parse_branch
val string_of_branch : parse_branch ‑> string
exception ParseError of parse_branch * unit ‑> string

parsing branch * message.

Input

type position
type state
val state_of_string : string ‑> state

Combinators

type 'a t = state ‑> ok:('a ‑> unit) ‑> err:(exn ‑> unit) ‑> unit

Takes the input and two continuations: +

  • ok to call with the result when it's done
  • err to call when the parser met an error
  • Raises ParseError: in case of failure.
val return : 'a ‑> 'a t

Always succeeds, without consuming its input.

val pure : 'a ‑> 'a t

Synonym to return.

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

Map.

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 (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Monadic 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 +results of a is ignored.

val fail : string ‑> 'a t

fail msg fails with the given message. It can trigger a backtrack.

val failf : ('a, unit, string, 'b t) Pervasives.format4 ‑> 'a

Format.sprintf version of fail.

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.

val eoi : unit t

Expect the end of input, fails otherwise.

val nop : unit t

Succeed with ().

val char : char ‑> char t

char c parses the character c and nothing else.

val char_if : (char ‑> bool) ‑> char t

char_if f parses a character c if f c = true.

val chars_if : (char ‑> bool) ‑> string t

chars_if f parses a string of chars that satisfy f.

val chars1_if : (char ‑> bool) ‑> string t

Like chars_if, but only non-empty strings.

val endline : char t

Parses '\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 (<|>) : 'a t ‑> 'a t ‑> 'a t

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. +See try_ to ensure a does not consume anything (but it is best +to avoid wrapping large parsers with try_).

val (<?>) : 'a t ‑> string ‑> 'a t

a <?> msg behaves like a, but if a fails without +consuming any input, it fails with msg +instead. Useful as the last choice in a series of <|>: +a <|> b <|> c <?> "expected a|b|c".

val try_ : 'a t ‑> 'a t

try_ p tries to parse like p, but backtracks if p fails. +Useful in combination with <|>.

val suspend : (unit ‑> 'a t) ‑> 'a t

suspend f is the same as f (), but evaluates f () only +when needed.

val string : string ‑> string t

string s parses exactly the string s, and nothing else.

val many : 'a t ‑> 'a list t

many p parses a list of p, eagerly (as long as possible).

val many1 : 'a t ‑> 'a list t

Parse a non-empty list.

val skip : _ t ‑> unit t

skip p parses zero or more times p and ignores its result.

val sep : by:_ t ‑> 'a t ‑> 'a list t

sep ~by p parses a list of p separated by by.

val sep1 : by:_ t ‑> 'a t ‑> 'a list t

sep1 ~by p parses a non empty list of p, separated by by.

val fix : ('a t ‑> 'a t) ‑> 'a t

Fixpoint combinator.

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.

This function is not thread-safe.

val fix_memo : ('a t ‑> 'a t) ‑> 'a t

Like fix, but the fixpoint is memoized.

val get_lnum : int t

Reflect the current line number.

val get_cnum : int t

Reflect the current column number.

val get_pos : (int * int) t

Reflect the current (line, column) numbers.

Parse

Those functions have a label ~p on the parser, since 0.14.

val parse : 'a t ‑> state ‑> 'a or_error

parse p st applies p on the input, and returns Ok x if +p succeeds with x, or Error s otherwise.

val parse_exn : 'a t ‑> state ‑> 'a

Unsafe version of parse.

  • Raises ParseError: if it fails.
val parse_string : 'a t ‑> string ‑> 'a or_error

Specialization of parse for string inputs.

val parse_string_exn : 'a t ‑> string ‑> 'a
  • Raises ParseError: if it fails.
val parse_file : 'a t ‑> string ‑> 'a or_error

parse_file p file parses file with p by opening the file +and reading it whole.

val parse_file_exn : 'a t ‑> string ‑> 'a
  • Raises ParseError: if it fails.

Infix

module Infix : sig ... end

Utils

This is useful to parse OCaml-like values in a simple way.

module U : sig ... end
\ No newline at end of file diff --git a/2.1/containers/CCRandom.odoc b/2.1/containers/CCRandom.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8dfbe0f7e7e41170d66b47bf6970b56b7b47e6b5 GIT binary patch literal 6138 zcmbVQ4U8OR8NS<_DcllKl!7%FzU$rI?cUGs-q9Y=pX-(@B_&cyX^BLW&D`#{cjL{@ zY-eV#cWA^$g4P(FZK1`I$j|~6g>s^%5riC3Ad37XfC>16#%M%HpehLoA^3dnJF~l- z)DSM&+|2jAKhOL7z27)xr!+E}9n0o#y7it%J32bj`04nq#P6KN!IES9hG|RJyE8pG zxzn)APPLH#x?GvPzkbGh`#b-*?dezlnPA@Y!;X#>U+U=iR2Ho6nH?Q{9pQ(Spe2GZ zJh{0L2BWM*Tp^*=@EzAH6bjmzVK_25d6i>3RmZK(n57{9){e#8?N>jv@N4(-Ctv>l zGrtVOOD2t~W!k=UZNu8?xK+cy%<#;T7vvXCeEaN^*FG@2<-$Mjy6(xtXN6&Eo9$mT z7UX}wlumr>g%=NB|9tg#OAF>I-WgvLCQploP@&Lwb%b}_-~&W{_L9cfj4e=>1Y`C zvtdF0A#3c!S$}$2f9xAS>wWd|Prq9T7T0=iDOYk_nTwsAg(cm&+>BF|InS&*c5biZ z&U!VYBtaMlC0CrPn^rkjmKCFJ`T58HlDznueJ93Wd*%qcZL2#%S=Fmf59m@qG*_El(Evv|M7cgDQa9v{|1dDcl zK{046nRq(mNvjeO=ZILlkO)>Yf!{Y}`d*-I;JsnmTf=+%l=?v1##E< z#{Gox5Wf;ooq;~rH|021pxs6U+BenSAzDK|zj;)9C3UTD_%hIr2ge%PNliyaGv_}t z)6y?`yt~NkAq)(HquRfL`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/.jbuilder-keep b/2.1/containers/CCRandom/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCRandom/index.html b/2.1/containers/CCRandom/index.html new file mode 100644 index 00000000..bd38ff55 --- /dev/null +++ b/2.1/containers/CCRandom/index.html @@ -0,0 +1,23 @@ + +CCRandom (containers.CCRandom)

Module CCRandom

Random Generators

include module type of sig ... end
val init : int ‑> unit
val full_init : int array ‑> unit
val self_init : unit ‑> unit
val bits : unit ‑> int
val int : int ‑> int
val int32 : Int32.t ‑> Int32.t
val nativeint : Nativeint.t ‑> Nativeint.t
val int64 : Int64.t ‑> Int64.t
val float : float ‑> float
val bool : unit ‑> bool
module State = Random.State
val get_state : unit ‑> State.t
val set_state : State.t ‑> unit
type state = Random.State.t
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_replacement : compare:('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: 0.15
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 ‑> 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
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 diff --git a/2.1/containers/CCRef.odoc b/2.1/containers/CCRef.odoc new file mode 100644 index 0000000000000000000000000000000000000000..6e9820976058bc3a4de298ab83c72ef6d042bfbd GIT binary patch literal 1662 zcma)5U1%It6y7N_YOsVB#Y#n--JR?<}wm{h1ty1G@+HtnW@FNVqN-R_XtnaQ1* zEKQ*(_$YEWH7OD;H%%i-TaATUtf+;m!3PV~pj7)HiccyAB>Es0&%Lv=NkpNrm%TsV zch2{nbH**ZW^X>%m(yOHdE=u*BGCa$f^{#fZA)FI>jZ}7Anea~6bgq>Mc2;1eBbL& zExdcP{e$1{8SZ~&e?+_^n@DWg3fvp8rtV54lmxvky10cM0;)S;oV>EsTV(;_+qtK{JE3T-a_GN*Kunu_Ntaiw6)k8;7Y35o&;7c#y|i_DNGEjq%Az=!^)PowsIFh3lq3yZ z*U1I_%tAv{IxE~TnAb1p@N|ZdStWF=05F_>DDC1h5qEB60}&L8Cb3(!;i^fT|`bGyA^(f zkkM4HD`a{WKrH)zq^0nDr0(xb=#`u5+6E5u{pLVfzm=nI1y%ld1SZpwV=3#YcsE&| zkyf5%o<|aP^jeOIM?tbPdISaFs-bSWkufDbGP^=GFyza$k%X(Zlx#R<8KWS?jxSsA z;GlZcg&q)NIpcs-y1N-4DoIZ$S}s4(^gBhFniZX!|E4MB(OwV`DPifjlub9cFU7UX z|CW-*-QEA8WS%SeD^hZ+sRSv0oex=~i*4i}F9&^;WMnVo1xP2^QGu#}$5fD~q=Q$3 zHsA$LtrtLX@9BK5ziEAiw;*c!cYF_}kc9os)TgqhTk{Nz;I0x)up}%>LMevA471w( z!Ou<7dmZqh88%Rk$CM8xVZGU$A_?sqIoGm*J8D~g0IXTgl7t81B(n;8;U_lolJH{& r(C|3}_-qrb#b8jkDhb{O^q(ou1LViCm|K$YS&WYKOTqzu0iXUq79Wzw literal 0 HcmV?d00001 diff --git a/2.1/containers/CCRef/.jbuilder-keep b/2.1/containers/CCRef/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCRef/index.html b/2.1/containers/CCRef/index.html new file mode 100644 index 00000000..f1787792 --- /dev/null +++ b/2.1/containers/CCRef/index.html @@ -0,0 +1,2 @@ + +CCRef (containers.CCRef)

Module CCRef

References

  • Since: 0.9
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a ord = 'a ‑> 'a ‑> int
type 'a eq = 'a ‑> 'a ‑> bool
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a t = 'a Pervasives.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 compare : 'a ord ‑> 'a t ord
val equal : 'a eq ‑> 'a t eq
val to_list : 'a t ‑> 'a list
val to_seq : 'a t ‑> 'a sequence
val pp : 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/2.1/containers/CCResult.odoc b/2.1/containers/CCResult.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8a11feb2b482ab52f6075c012ed75bd8458a1654 GIT binary patch literal 9191 zcmds7du$xXdFN3xBJb!Xu?;o01It75j(2<=DN2fD%M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_aAjaO7Qqub4T!@(MTgwUBaZh0Annr*qQqOPLU6B9XRraN6t zycE%1DG~05c~y@4VX89`24M|Hd$9@*nY{`wt5aU~um)oF9b_-vL26`h2f(S-2$s)3 zF0;=T4jy{f?i+v%f2Es>PVt9uSU@vlwfV9>%ItTRAN9{ZC3<)FAH+@e<1*JT>iAelA6PFD?-%bA?`5ACZxOeN zThAHdoh;!7F)I$Rcvp&Pv5%oWEjEg_*g+zQ?Yt^4j)`qNDv7%UzGG^IMxyVwGYh`V z^@MiW1g|{fKP8OaVtc<%AfX*FFD}6pD9P+J=@}b{s@hSVNQl;$);~%lXGD=HRXAbk zfS1|X6a^x^BV5D6eSp&((YiUt@{G7KCc`q^w~E61BHL#K zjJYKk=#024+W)61!u;mm=*^e;4RP--M-14#{6_-+toXKgF*MruWoA@nMr3AK+wF%k zlb4ynbB4@Z!KQdwX12)8ud}wV%FN|5b6IGAa9r7#YNtnAx3U0E&$?1eCg_Z=Y_xmfgR0A%j^LG)`2ik3DaG$oe?0Zr6 z9iTk~k?0B72+uPS9)2+1`08N0T_jUxM-J;haENQ!EH2+2+-Tx^PjbYeKYEF+pqK^o UWDzZ9H?G;y#|=`Q&V$B(0k?|a)&Kwi literal 0 HcmV?d00001 diff --git a/2.1/containers/CCResult/.jbuilder-keep b/2.1/containers/CCResult/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCResult/Infix/index.html b/2.1/containers/CCResult/Infix/index.html new file mode 100644 index 00000000..a6636cf7 --- /dev/null +++ b/2.1/containers/CCResult/Infix/index.html @@ -0,0 +1,5 @@ + +Infix (containers.CCResult.Infix)

Module CCResult.Infix

val (>|=) : ('a'errt ‑> ('a ‑> 'b) ‑> ('b'errt
val (>>=) : ('a'errt ‑> ('a ‑> ('b'errt) ‑> ('b'errt

Monadic composition. e >>= f proceeds as f x if e is Ok x +or returns e if e is an Error.

val (<*>) : ('a ‑> 'b'errt ‑> ('a'errt ‑> ('b'errt

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.

\ No newline at end of file diff --git a/2.1/containers/CCResult/Traverse/argument-1-M/index.html b/2.1/containers/CCResult/Traverse/argument-1-M/index.html new file mode 100644 index 00000000..63ae4079 --- /dev/null +++ b/2.1/containers/CCResult/Traverse/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (containers.CCResult.Traverse.1-M)

Parameter CCResult.Traverse.1-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 diff --git a/2.1/containers/CCResult/Traverse/index.html b/2.1/containers/CCResult/Traverse/index.html new file mode 100644 index 00000000..70819ccb --- /dev/null +++ b/2.1/containers/CCResult/Traverse/index.html @@ -0,0 +1,2 @@ + +Traverse (containers.CCResult.Traverse)

Module CCResult.Traverse

Parameters

Signature

val sequence_m : ('a M.t'errt ‑> ('a'errt M.t
val fold_m : ('b ‑> 'a ‑> 'b M.t) ‑> 'b ‑> ('a'errt ‑> 'b M.t
val map_m : ('a ‑> 'b M.t) ‑> ('a'errt ‑> ('b'errt M.t
val retry_m : int ‑> (unit ‑> ('a'errt M.t) ‑> ('a'err list) t M.t
\ No newline at end of file diff --git a/2.1/containers/CCResult/index.html b/2.1/containers/CCResult/index.html new file mode 100644 index 00000000..a1eecf7d --- /dev/null +++ b/2.1/containers/CCResult/index.html @@ -0,0 +1,27 @@ + +CCResult (containers.CCResult)

Module CCResult

Error Monad

Uses the new "result" type from OCaml 4.03.

  • Since: 0.16
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit

Basics

  • Since: 1.5
include module type of sig ... end
type ('a, 'b) result = ('a'b) Pervasives.result =
| Ok of 'a
| Error of 'b
type (+'good, +'bad) t = ('good'bad) Result.result =
| Ok of 'good
| Error of 'bad
val return : 'a ‑> ('a'errt

Successfully return a value.

val fail : 'err ‑> ('a'errt

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, Buffer.t, unit, ('b, string) t) Pervasives.format4 ‑> 'a

fail_printf format uses format to obtain an error message +and then returns Error msg.

val fail_fprintf : ('a, Format.formatter, unit, ('b, string) t) Pervasives.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, Format.formatter, unit, ('b, string) t ‑> ('b, string) t) Pervasives.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 map : ('a ‑> 'b) ‑> ('a'errt ‑> ('b'errt

Map on success.

val map_err : ('err1 ‑> 'err2) ‑> ('a'err1t ‑> ('a'err2t

Map on the error variant.

val map2 : ('a ‑> 'b) ‑> ('err1 ‑> 'err2) ‑> ('a'err1t ‑> ('b'err2t

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.

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 map_or : ('a ‑> 'b) ‑> ('a'ct ‑> default:'b ‑> 'b

map_or f e ~default returns f x if e = Ok x, default otherwise.

val catch : ('a'errt ‑> 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'errt) ‑> ('a'errt ‑> ('b'errt
val (>|=) : ('a'errt ‑> ('a ‑> 'b) ‑> ('b'errt
val (>>=) : ('a'errt ‑> ('a ‑> ('b'errt) ‑> ('b'errt

Monadic composition. e >>= f proceeds as f x if e is Ok x +or returns e if e is an Error.

val equal : err:'err equal ‑> 'a equal ‑> ('a'errt equal
val compare : err:'err ord ‑> 'a ord ‑> ('a'errt ord
val fold : ok:('a ‑> 'b) ‑> error:('err ‑> 'b) ‑> ('a'errt ‑> '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'errt ‑> bool

Return true if Ok.

  • Since: 1.0
val is_error : ('a'errt ‑> 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'errt

Synonym of return.

val (<*>) : ('a ‑> 'b'errt ‑> ('a'errt ‑> ('b'errt

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 join : (('a'errt'errt ‑> ('a'errt

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'errt ‑> ('b'errt ‑> ('a * 'b'errt

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

Collections

val map_l : ('a ‑> ('b'errt) ‑> 'a list ‑> ('b list, 'errt
val fold_l : ('b ‑> 'a ‑> ('b'errt) ‑> 'b ‑> 'a list ‑> ('b'errt
val fold_seq : ('b ‑> 'a ‑> ('b'errt) ‑> 'b ‑> 'a sequence ‑> ('b'errt

Misc

val choose : ('a'errt 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'errt) ‑> ('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

Monadic Operations

module Traverse : functor (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

Convert an option to a result.

val to_seq : ('a_t ‑> 'a sequence
type ('a, 'b) error = [
| `Ok of 'a
| `Error of 'b
]
val of_err : ('a'berror ‑> ('a'bt
  • Since: 0.17
val to_err : ('a'bt ‑> ('a'berror
  • Since: 0.17

IO

val pp : 'a printer ‑> ('a, string) t printer
val pp' : 'a printer ‑> 'e printer ‑> ('a'et printer

Printer that is generic on the error type.

\ No newline at end of file diff --git a/2.1/containers/CCResult/module-type-MONAD/index.html b/2.1/containers/CCResult/module-type-MONAD/index.html new file mode 100644 index 00000000..95d076f3 --- /dev/null +++ b/2.1/containers/CCResult/module-type-MONAD/index.html @@ -0,0 +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 diff --git a/2.1/containers/CCSet.odoc b/2.1/containers/CCSet.odoc new file mode 100644 index 0000000000000000000000000000000000000000..4336f5da16e2e93f254f5326d674d467c5dbd416 GIT binary patch literal 3841 zcmb7HZEO_B8NNNwR2YOyBA|p&dC&K0gYV8XX+Vf{Z3m-9!I)f{idL;z-|gXzcW*Dd zdw^S@iWKEXlb|^wj1p3`2Ad|NO)MgaN-MCErZhoGl#uizrAqqsBPKLRRiXw(ZQq%9 z)-f)!T1$K0*?FGl{g`*YoRU*)@5rvs<{vz8>`WvQNy0&CzZcPgwi|4azHL@TGQeCxj*>G9@$wOaV`_}rMJulz?+LfN3ORYiB z-rc>)sW`UdRtL=@%YWQAkvp{c^zbY0hI8*8e*L8&SktZBmRa!)x1w7;j%(|Fm+qNG zkL8D-eWdAy!gE7+G{1k(z2^>cO9){39u)iius2%{dgx$w^H&s?h^m%N? z5&mi1)~nEaTZld@#9ox(_eJY30!x*qMA@-QfW9k4zYRDjbw;A-$|tPIAn zDvJ>l4>`ADdyV82TVZT`)8_?2mC82w zpIIp({Z5s`K9Hh66rw5k2mzt&a435wZR@+F>}L}HBb0qe%AQ{-At)PdlrT{{L`A`a zq2R?-anNx*gVE@63H&+gjY+)^+7Kb-(h~J+jv}|C+{sYxYSOD(CPWimBXMWLLHlEv z{Xfg>|4#m&lH}-;MA@uBO-2in`)oMl>v8vBB|~0R5!%s3VY>y}3#6^S?B_gbao;p|DPof$_cq=pKMnXeM-!oGvsFk~ zy0HA?X?70Tw}dq+zH`>GT~4Ere}@x5*y@VfgOQ@WHfG?&rk`-n=8z z)QFgE8Y=7wu}@u7jj#dc3wqg5cfgSb%20L6YVZ`}<+~J)AhB$?V+qx98a+d!M}?xY zkQ;z6zoM{^$WUIrrY7eQU-sYP1P4UPa$OP&C8uVV1|MRMv zLr=Mm-nVcVNEvlqp=*S?*_o9G%8hM3P`xTle$%ems$5o7Pxno)JPf;|T7`pwS=4=F zMw&&U$xdORVZJo@5O0zPFv|^h&MwtC!nk=>7$|=T<-^TgEE!ZeCE|HHjK`f(&NIT% zcm4n2;8N4jE5mtJg!8ftXWy*)pCg)%>qhe)M&nBLzl)}FRYY?+jOJ7d<_H}A;B?K_ zb@9WZs;jU!t7X@*Re#V>x5FW}q6YQpBVxeX`FsfXgRF)I#wqEdgmQVRd;#Z|a)S)! ztu!2s&<;$UL_XVb3$m!vEd5)K%x1}Klgvvg-;oa1Gx)0da0^i3lnb-d_k@$&!d-LZg)c8Nv$1ME1ZtF26V?oV z#8qqjz$X`vhSzbRWa!aH(X3pIlpzcmPNY0pV&MvAXKOg*9z!l{jUwTARHI}=8ghix zpx!Fq=SG^Of0pCVao)5j- z`NxFkJ5`?WM&62hhG@vWXPnXqCCAakFGXBr9=0yPsh&aZt{kCsQDT!m1RFNFP(Q*Z zo+tA +CCSet (containers.CCSet)

Module CCSet

Wrapper around Set

  • Since: 0.9
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type OrderedType = Set.OrderedType
module type S : sig ... end
module Make : functor (O : Set.OrderedType) -> S with type Make.t = Set.Make(O).t and type Make.elt = O.t
\ No newline at end of file diff --git a/2.1/containers/CCSet/module-type-S/index.html b/2.1/containers/CCSet/module-type-S/index.html new file mode 100644 index 00000000..05f676c5 --- /dev/null +++ b/2.1/containers/CCSet/module-type-S/index.html @@ -0,0 +1,3 @@ + +S (containers.CCSet.S)

Module type CCSet.S

include Set.S
type elt
type t
val empty : t
val is_empty : t ‑> bool
val mem : elt ‑> t ‑> bool
val add : elt ‑> t ‑> t
val singleton : elt ‑> t
val remove : elt ‑> t ‑> t
val union : t ‑> t ‑> t
val inter : t ‑> t ‑> t
val diff : t ‑> t ‑> t
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
val subset : t ‑> t ‑> bool
val iter : (elt ‑> unit) ‑> t ‑> unit
val map : (elt ‑> elt) ‑> t ‑> t
val fold : (elt ‑> 'a ‑> 'a) ‑> t ‑> 'a ‑> 'a
val for_all : (elt ‑> bool) ‑> t ‑> bool
val exists : (elt ‑> bool) ‑> t ‑> bool
val filter : (elt ‑> bool) ‑> t ‑> t
val partition : (elt ‑> bool) ‑> t ‑> t * t
val cardinal : t ‑> int
val elements : t ‑> elt list
val min_elt : t ‑> elt
val min_elt_opt : t ‑> elt option
val max_elt : t ‑> elt
val max_elt_opt : t ‑> elt option
val choose : t ‑> elt
val choose_opt : t ‑> elt option
val split : elt ‑> t ‑> t * bool * t
val find : elt ‑> t ‑> elt
val find_opt : elt ‑> t ‑> elt option
val find_first : (elt ‑> bool) ‑> t ‑> elt
val find_first_opt : (elt ‑> bool) ‑> t ‑> elt option
val find_last : (elt ‑> bool) ‑> t ‑> elt
val find_last_opt : (elt ‑> bool) ‑> t ‑> elt option
val of_list : elt list ‑> t
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_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 of_seq : elt sequence ‑> t

Build a set from the given sequence of elements.

val add_seq : t ‑> elt sequence ‑> t
  • Since: 0.14
val to_seq : t ‑> elt sequence

to_seq t converts the set t to a sequence of the elements.

val of_list : elt list ‑> t

Build a set from the given list of elements, +added in order using add.

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 pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> elt printer ‑> t printer

Print the set

\ No newline at end of file diff --git a/2.1/containers/CCString.odoc b/2.1/containers/CCString.odoc new file mode 100644 index 0000000000000000000000000000000000000000..7f38db5bf11ad2f065eeb80a9c20dad85936b3f0 GIT binary patch literal 17813 zcmcIs34B~txo?tt+RRLvq*DakZ<9%8k|vX+r7dk~JEgW*WYMPL^1$I{awoZTGIy9e zX&PCSr{V(01ZIDk$&&ecw4VlQflz+TX98 zyPWfF=R4o|wp)MH&-4!^S0o4Dy7%UL7c5wiz+Z*G&%@s(cl2ibe97_hZZUX&V#}7{ zQqjwgr3UYM!#6Mf$|d>V9re({yT1C=Cy$Z2Th}jGu=LLh7OcB(!GhJVZ(gt>rSh@OsY-dpiB8~UY(Ztey5!}8R0Yomw)pwL8+D8JWB?-U%B|%a-#>(hn!a=( z#C5*n)K_A7C}C&)qFr!GCAXNj1J@~L#`|nM+To75d%`(yr05hqH%O*Z*3p$p_lc9) ztXnJ(UU%*4wGV8V+V+KW?|X9FwqNyBDqSZ|m)xK{c*l1ix$_#cKgD*H{`0CiUy{~#Qe$uOkzy07xE0x|? zy2afP%x)s&TI<&jU-ejf-;0k+T=9Qz{N9b2DdH**{_oA#{;gxri`H#<>|yKfZx!DK z>R+81cfi-{a@&JrKl(X!-bo*SsC3~UzLhH9u_`EL1~Pup9WYCq1hJukfpLGr9SFP$ zKR+<#7k32(C*xwE5%oZNWYWux4ve~4XEIkBeC9K)S4=vWpRnxQGbYx*^{m%#PL(TH z96Vs1+BxRt%av5>V5L%C=A=@o@?EL@W?cF&yKUNwCm~v>t4i_`?c4^$T<*}W}Pfmci{fOU7eNo*(x5S{ zE;NSP!^K>fXuoNG^c zrE$hlnd$2foUGd~Xe#A|Eh~^rRc;yFp5N`{ywS8%9GjeQ^QB68t(UdE{HT|41KTOO zcHS@9JjM`c^$MZ#d(({d(6W+#vQq!9;pMtbh(9x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CCString/.jbuilder-keep b/2.1/containers/CCString/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCString/Find/index.html b/2.1/containers/CCString/Find/index.html new file mode 100644 index 00000000..b2e36b81 --- /dev/null +++ b/2.1/containers/CCString/Find/index.html @@ -0,0 +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

Search for pattern in the string, 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

Search for pattern in the string, 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 diff --git a/2.1/containers/CCString/Split/index.html b/2.1/containers/CCString/Split/index.html new file mode 100644 index 00000000..91e9235e --- /dev/null +++ b/2.1/containers/CCString/Split/index.html @@ -0,0 +1,9 @@ + +Split (containers.CCString.Split)

Module CCString.Split

type drop_if_empty = {
first : bool;
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

Do 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

Split the given string along the given separator by. Should only +be used with very small separators, otherwise +use Containers_string.KMP.

  • 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
val seq : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> (string * int * int) sequence
val klist : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> (string * int * int) klist
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
val gen_cpy : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> string gen
val seq_cpy : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> string sequence
val klist_cpy : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> string klist
val left : by:string ‑> string ‑> (string * string) option

Split on the first occurrence of by from the leftmost part of +the string.

  • Since: 0.12
val left_exn : by:string ‑> string ‑> string * string

Split on the first occurrence of by from the leftmost part of the string.

  • Raises Not_found: if by is not part of the string.
  • Since: 0.16
val right : by:string ‑> string ‑> (string * string) option

Split on the first occurrence of by from the rightmost part of +the string.

  • Since: 0.12
val right_exn : by:string ‑> string ‑> string * string

Split on the first occurrence of by from the rightmost part of the string.

  • Raises Not_found: if by is not part of the string.
  • Since: 0.16
\ No newline at end of file diff --git a/2.1/containers/CCString/Sub/index.html b/2.1/containers/CCString/Sub/index.html new file mode 100644 index 00000000..7dfdd05c --- /dev/null +++ b/2.1/containers/CCString/Sub/index.html @@ -0,0 +1,3 @@ + +Sub (containers.CCString.Sub)

Module CCString.Sub

type t = string * int * int

A string, an offset, and the length of the slice.

val make : string ‑> int ‑> len:int ‑> t
val full : string ‑> t

Full string.

val copy : t ‑> string

Make a copy of the substring.

val underlying : t ‑> string
val sub : t ‑> int ‑> int ‑> t

Sub-slice.

val get : t ‑> int ‑> char

get s i gets the i-th element, or fails.

  • Raises Invalid_argument: if the index is not within 0 ... length - 1.
  • Since: 1.2
include S with type t := t
type t
val length : t ‑> int

Return the length (number of characters) of the given string.

val blit : t ‑> int ‑> Bytes.t ‑> int ‑> int ‑> unit

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 on chars by increasing index.

  • Since: 0.7

Conversions

val to_gen : t ‑> char gen

Return the gen of characters contained in the string.

val to_seq : t ‑> char sequence

Return the sequence of characters contained in the string.

val to_klist : t ‑> char klist

Return the klist of characters contained in the string.

val to_list : t ‑> char list

Return the list of characters contained in the string.

val pp_buf : Buffer.t ‑> t ‑> unit

Renamed from pp since 2.0.

val pp : Format.formatter ‑> t ‑> unit

Print the string within quotes.

Renamed from print since 2.0.

\ No newline at end of file diff --git a/2.1/containers/CCString/index.html b/2.1/containers/CCString/index.html new file mode 100644 index 00000000..c5e1f7a5 --- /dev/null +++ b/2.1/containers/CCString/index.html @@ -0,0 +1,21 @@ + +CCString (containers.CCString)

Module CCString

Basic String Utils

Consider using Containers_string.KMP for pattern search, or Regex +libraries.

type 'a gen = unit ‑> 'a option
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]

Common Signature

module type S : sig ... end

Strings

include module type of sig ... end
external length : string ‑> int = "%string_length"
external get : string ‑> int ‑> char = "%string_safe_get"
external set : bytes ‑> int ‑> char ‑> unit = "%string_safe_set"
  • Deprecated Use Bytes.set instead.
external create : int ‑> bytes = "caml_create_string"
  • Deprecated Use Bytes.create instead.
val make : int ‑> char ‑> string
val init : int ‑> (int ‑> char) ‑> string
val copy : string ‑> string
val sub : string ‑> int ‑> int ‑> string
val fill : bytes ‑> int ‑> int ‑> char ‑> unit
  • Deprecated Use Bytes.fill instead.
val blit : string ‑> int ‑> bytes ‑> int ‑> int ‑> unit
val concat : string ‑> string list ‑> string
val iter : (char ‑> unit) ‑> string ‑> unit
val iteri : (int ‑> char ‑> unit) ‑> string ‑> unit
val map : (char ‑> char) ‑> string ‑> string
val mapi : (int ‑> char ‑> char) ‑> string ‑> string
val trim : string ‑> string
val escaped : string ‑> string
val index : string ‑> char ‑> int
val index_opt : string ‑> char ‑> int option
val rindex : string ‑> char ‑> int
val rindex_opt : string ‑> char ‑> int option
val index_from : string ‑> int ‑> char ‑> int
val index_from_opt : string ‑> int ‑> char ‑> int option
val rindex_from : string ‑> int ‑> char ‑> int
val rindex_from_opt : string ‑> int ‑> char ‑> int option
val contains : string ‑> char ‑> bool
val contains_from : string ‑> int ‑> char ‑> bool
val rcontains_from : string ‑> int ‑> char ‑> bool
val uppercase : string ‑> string
  • Deprecated Use String.uppercase_ascii instead.
val lowercase : string ‑> string
  • Deprecated Use String.lowercase_ascii instead.
val capitalize : string ‑> string
  • Deprecated Use String.capitalize_ascii instead.
val uncapitalize : string ‑> string
  • Deprecated Use String.uncapitalize_ascii instead.
val uppercase_ascii : string ‑> string
val lowercase_ascii : string ‑> string
val capitalize_ascii : string ‑> string
val uncapitalize_ascii : string ‑> string
type t = string
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
val split_on_char : char ‑> string ‑> string list
external unsafe_get : string ‑> int ‑> char = "%string_unsafe_get"
external unsafe_set : bytes ‑> int ‑> char ‑> unit = "%string_unsafe_set"
external unsafe_blit : string ‑> int ‑> bytes ‑> int ‑> int ‑> unit = "caml_blit_string"
external unsafe_fill : bytes ‑> int ‑> int ‑> char ‑> unit = "caml_fill_string"
val equal : string ‑> string ‑> bool

Equality function on strings.

val compare : string ‑> string ‑> int
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
val init : int ‑> (int ‑> char) ‑> string

Like Array.init.

  • Since: 0.3.3
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 n str ensures that str 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

Convert a gen of characters to a string.

val of_seq : char sequence ‑> string

Convert a sequence of characters to a string.

val of_klist : char klist ‑> string

Convert a klist of characters to a string.

val of_list : char list ‑> string

Convert a list of characters to a string.

val of_array : char array ‑> string

Convert an array of characters to a string.

val to_array : string ‑> char array

Return the array of characters contained in the string.

val find : ?⁠start:int ‑> sub:string ‑> string ‑> int

Find sub in string, returns its first index or -1.

val find_all : ?⁠start:int ‑> sub:string ‑> string ‑> int gen

find_all ~sub s finds all occurrences of sub in s, even overlapping +instances.

  • 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 ~sub s is true iff sub is a substring of s.

  • Since: 0.12
val rfind : sub:string ‑> string ‑> int

Find sub in string 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 ~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 ‑> len:int ‑> bool

is_sub ~sub i s j ~len returns true iff the substring of +sub starting at position i and of length len is a substring +of s starting at position j.

val repeat : string ‑> int ‑> string

The same string, repeated 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 = 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 of the lines of s (splits along '\n').

  • Since: 0.10
val concat_gen : sep:string ‑> string gen ‑> string

concat_gen ~sep g concatenates all strings of g, separated with sep.

  • Since: 0.10
val unlines : string list ‑> string

unlines l concatenates all strings of l, separated with '\n'.

  • Since: 0.10
val unlines_gen : string gen ‑> string

unlines_gen g concatenates all strings of g, separated with '\n'.

  • Since: 0.10
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

Alias to String.iter.

  • Since: 0.12
val iteri : (int ‑> char ‑> unit) ‑> string ‑> unit

Iter on chars with their index.

  • Since: 0.12
val map : (char ‑> char) ‑> string ‑> string

Map chars.

  • Since: 0.12
val mapi : (int ‑> char ‑> char) ‑> string ‑> string

Map chars with their index.

  • 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 not satisfying f.

  • Since: 0.17
val flat_map : ?⁠sep:string ‑> (char ‑> string) ‑> string ‑> string

Map each chars 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

True for all chars?

  • Since: 0.12
val exists : (char ‑> bool) ‑> string ‑> bool

True for some char?

  • Since: 0.12
include S with type S.t := string
type t
val length : t ‑> int

Return the length (number of characters) of the given string.

val blit : t ‑> int ‑> Bytes.t ‑> int ‑> int ‑> unit

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 on chars by increasing index.

  • Since: 0.7

Conversions

val to_gen : t ‑> char gen

Return the gen of characters contained in the string.

val to_seq : t ‑> char sequence

Return the sequence of characters contained in the string.

val to_klist : t ‑> char klist

Return the klist of characters contained in the string.

val to_list : t ‑> char list

Return the list of characters contained in the string.

val pp_buf : Buffer.t ‑> t ‑> unit

Renamed from pp since 2.0.

val pp : Format.formatter ‑> t ‑> unit

Print the string within quotes.

Renamed from print since 2.0.

val ltrim : t ‑> t

Trim space on the left (see String.trim for more details).

  • Since: 1.2
val rtrim : t ‑> t

Trim 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

Map 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

Iterate 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

Iterate 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

Fold 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

All pairs of chars respect the predicate?

  • Raises Invalid_argument: if the strings have not the same length.
  • Since: 0.12
val exists2 : (char ‑> char ‑> bool) ‑> string ‑> string ‑> bool

Exists a pair of chars?

  • 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

See String.

  • Since: 0.18
val uncapitalize_ascii : string ‑> string

See String.

  • Since: 0.18
val uppercase_ascii : string ‑> string

See String.

  • Since: 0.18
val lowercase_ascii : string ‑> string

See String.

  • Since: 0.18
val equal_caseless : string ‑> string ‑> bool

Comparison without respect to ascii lowercase.

  • Since: 1.2

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 the string along the given char.

  • Since: 1.2
val split : by:string ‑> string ‑> string list

Alias to Split.list_cpy.

  • Since: 1.2

Utils

val compare_versions : string ‑> string ‑> int

compare_versions a b compares version stringsa and b, +considering that numbers are above text.

  • Since: 0.13
val compare_natural : string ‑> string ‑> int

Natural Sort Order, comparing chunks of digits as natural numbers. +https://en.wikipedia.org/wiki/Natural_sort_order

  • Since: 1.3
val edit_distance : string ‑> string ‑> int

Edition distance between two strings. This satisfies the classical +distance axioms: it is always positive, symmetric, and satisfies +the formula distance a b + distance b c >= distance a c.

Slices

A contiguous part of a string

module Sub : sig ... end
\ No newline at end of file diff --git a/2.1/containers/CCString/module-type-S/index.html b/2.1/containers/CCString/module-type-S/index.html new file mode 100644 index 00000000..e91d8c6d --- /dev/null +++ b/2.1/containers/CCString/module-type-S/index.html @@ -0,0 +1,3 @@ + +S (containers.CCString.S)

Module type CCString.S

type t
val length : t ‑> int

Return the length (number of characters) of the given string.

val blit : t ‑> int ‑> Bytes.t ‑> int ‑> int ‑> unit

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 on chars by increasing index.

  • Since: 0.7

Conversions

val to_gen : t ‑> char gen

Return the gen of characters contained in the string.

val to_seq : t ‑> char sequence

Return the sequence of characters contained in the string.

val to_klist : t ‑> char klist

Return the klist of characters contained in the string.

val to_list : t ‑> char list

Return the list of characters contained in the string.

val pp_buf : Buffer.t ‑> t ‑> unit

Renamed from pp since 2.0.

val pp : Format.formatter ‑> t ‑> unit

Print the string within quotes.

Renamed from print since 2.0.

\ No newline at end of file diff --git a/2.1/containers/CCUtf8_string.odoc b/2.1/containers/CCUtf8_string.odoc new file mode 100644 index 0000000000000000000000000000000000000000..4bd9bdec365c1434b76351866b9d691ccc457ccf GIT binary patch literal 2434 zcmb_eTWl0n7~b8?2=zihL%bSWSga8q9i9i_nJ_TRA|6GKhy7q*V@pd1wddvo>N{Si znLW5~TXEgQTUT#gKD_S5(z!9xKut0hOAN+hV{XDj#>Qf)82evlv_#0*@n(~SPj+~Y zMT*#H7aki7$1^%s<>s2Esf}eUy{Ky2*blSs?42|3+=8CmsSRhZ=$yUq*Bh3LGm4v%QD6k2~Ie zq-*gbzpYw*X3ss~Ndm&`)XD8{rEbTM0+3kS4utZgxC%QaBcY2b|&Y*AcfJBRwUMKh~HB{R(-(+vCe@6cvU zrx0av+Lr9ZUZ~wS#8@~T!EQKc_J!f@RMm5+cuSKCb%>{q1<9!k@P;b(EF5aJqnU#y z7y-IAjZ-xv^76`b3TY1;n?;5VRb!y1IpogL(T2%(4II+KnP45cp|)IT>DTsXQ%v!y z=~7&Q5LaURQY93WLaiXr9}wqBNWDD%q}C$k3i3hd28l>2OSMAbL^y<(k=XO~l&CJ@cdBnKVvjnsx5-rK=LCAK$=)3LQ2V2P8FINjT;%8) zV|b~eU?6IALVoKvI9w{xDgyCrCFn=gnevK0&bB{4O+rR5d#C7ohuJ_a6EUsUR`4|zec|vpQN4U zO5km(c0r2K;}3H+Py}4f!gf^*cV5d@rR6=PWuEq(h)OEb(Oe5UTqh9aHGe6*+<6fP zm58snh}|jfO^A3l5`j}Taf_iIPmT)Xm%tM3Aj|Fr-Wj9TfATd?tRCN%a-h_J-ZF~* zyP)%YY~pV9_Zw31birlh&oA96 z)Iu+X*#^|?2vzKju+oxszha$8mQe)+y~^*$1%51kk48@BOZd|YeqomFxF91hS-T_F zX$jlHxQVmF5?9IXHH!Ujo$Vs3xJM%HuM&hKmyTS^k)S8;N~1~zdpsj2g+x8x9YIwz zUy}9{lhZJDEkptOlY+jct|h8okH2n8<2x0jAx&&i`Fi{>dH)+sBxsrf?pMGC9LO71 zkKa_LGZG1*6^x?_xx5yTqKNgxz0&4&iCn0VrxY^Z$eoMtWgc&ov!HP`a-AZgI2tI0 zUc)M3s|z~YaH!z~MmI-@(F=p&V7Ap08+qh+R?9HF_*immF%qP0&hZGnjTZ&*lGJ`t zDeA5tRwSyZ9og9EhN^>425&|7K?wOxn(+A;si<4RMq;+SHEsO-EjA_HD3Etzlu2H~-kDLG(hwqn2NtF-5?EVkK{laSi literal 0 HcmV?d00001 diff --git a/2.1/containers/CCUtf8_string/.jbuilder-keep b/2.1/containers/CCUtf8_string/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/CCUtf8_string/index.html b/2.1/containers/CCUtf8_string/index.html new file mode 100644 index 00000000..b421e73e --- /dev/null +++ b/2.1/containers/CCUtf8_string/index.html @@ -0,0 +1,3 @@ + +CCUtf8_string (containers.CCUtf8_string)

Module CCUtf8_string

Unicode String, in UTF8

type uchar = Uchar.t
type 'a gen = unit ‑> 'a option
type 'a sequence = ('a ‑> unit) ‑> unit
type t = private string

A UTF8 string

val equal : t ‑> t ‑> bool
val hash : t ‑> int
val compare : t ‑> t ‑> int
val pp : 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_seq : ?⁠idx:int ‑> t ‑> uchar sequence

Sequence of unicode codepoints.

  • Parameter idx: offset where to start the decoding.
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 append : t ‑> t ‑> t
val concat : t ‑> t list ‑> t
val of_seq : uchar sequence ‑> t
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. +Upon iteration, if an invalid substring is met, Malformed will be raised.

\ No newline at end of file diff --git a/2.1/containers/CCVector.odoc b/2.1/containers/CCVector.odoc new file mode 100644 index 0000000000000000000000000000000000000000..4df107a06717e3ec2555cd812b98832ff6f50999 GIT binary patch literal 10041 zcmb_ieQ+G*d6#szC*9F_lF86~hm~}?JISY$WLvV0j5%9a!X0d5%RotE)V;esY3sY) z^X{HLfTrybN`_(56~Sf*X=mfuKnQJ(Q%XqlL55J8GD&IZcm_xlJPdy{WLnBJohDOC zf6w#2`ytuTgefz|ySMv3zvugFZPl#m@K|Y6Y4p>_ANW>BM@IpF6#Tgqf8KXysA`$6 zW|+F|e6cV!b-iA7ExSDW%EPH2KRW)Kv**+2-ukZ}JaVHroBK&e$0Zv(I@Gs1IzE1+ zr=ug=;s2@>l3kwfKfbH%d)sDgYe}m#^rG5qyL6#03fOWv+2i}U-R*i^x4qFX+&{7X zhgU33KYi@`uTM|EHt74qQ&ama(`s6FYr&{`qd&j)%*g!*zP|E3d(Sg3{@D+n^8Ia7 zTC-u8u5O!JW7@Ktn!8(bjH=^}uKdMa8y=ti%cECa_VVHDpSkxEAc+^e(GP!M_P*@& z@q@4DXAaK()ANt{{?N6$y@-R0I!@l7{MnE0ef7P?k8LU3{cktFaMJe&uB$F+VDZMr zUgv|4J*C_-^Tav#Q$PR5vUg_Ov8y9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n4tBzE%sM-vj6XD;BJs$T=>3&Y^!bkah6U0KX;Ebcc?eZ{907 YIjvmsQ6+sY;6{Ej%6wLWmCNP-1($^!eE +CCVector (containers.CCVector)

Module CCVector

Growable, mutable vector

type ro = [
| `RO
]
type rw = [
| `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 = ('arwt

Type synonym: a 'a vector is mutable.

type 'a ro_vector = ('arot

Alias for immutable vectors.

  • Since: 0.15
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit
val freeze : ('a_t ‑> ('arot

Make an immutable vector (no copy! Don't use the old version).

val freeze_copy : ('a_t ‑> ('arot

Copy the vector into an immutable version.

val create : unit ‑> ('arwt

Create a new, empty vector.

val create_with : ?⁠capacity:int ‑> 'a ‑> ('arwt

Create a new vector, using the given value as a filler.

  • Parameter capacity: the size of the underlying array. +caution: the value will likely not be GC'd before the vector is.
val return : 'a ‑> ('a'mutt

Singleton vector.

  • Since: 0.14
val make : int ‑> 'a ‑> ('a'mutt

make n x makes a vector of size n, filled with x.

val init : int ‑> (int ‑> 'a) ‑> ('a'mutt

Init the vector with the given function and size.

val clear : ('arwt ‑> unit

Clear the content of the vector.

val ensure_with : init:'a ‑> ('arwt ‑> int ‑> unit

Hint to the vector that it should have at least the given capacity.

  • Parameter init: if capacity v = 0, used as a filler +element for the underlying array (see create_with).
  • Since: 0.14
val ensure : ('arwt ‑> 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.

val is_empty : ('a_t ‑> bool

Is the vector empty?

val push : ('arwt ‑> 'a ‑> unit

Add an element at the end of the vector.

val append : ('arwt ‑> ('a_t ‑> unit

append a b adds all elements of b to a.

val append_array : ('arwt ‑> 'a array ‑> unit

Like append, with an array.

val append_seq : ('arwt ‑> 'a sequence ‑> unit

Append content of sequence.

val append_list : ('arwt ‑> 'a list ‑> unit

Append content of list.

  • Since: 0.14
val append_gen : ('arwt ‑> '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 : ('arwt ‑> 'a option

Remove last element, or None.

val pop_exn : ('arwt ‑> 'a

Remove last element, or raise a Failure 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'mutt

Shallow copy (may give an immutable or mutable vector).

val shrink : ('arwt ‑> int ‑> unit

Shrink to the given size (remove elements above this size). +Does nothing if the parameter is bigger than the current size.

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'mutt

Sort the vector, returning a copy of it that is sorted +w.r.t the given ordering. The vector itself is unchanged.

val sort' : ('a ‑> 'a ‑> int) ‑> ('arwt ‑> unit

Sort the vector in place (modifying it).

val uniq_sort : ('a ‑> 'a ‑> int) ‑> ('arwt ‑> 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'mutt

Map elements of the vector, yielding a new vector.

val filter : ('a ‑> bool) ‑> ('a_t ‑> ('a'mutt

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' : ('a ‑> bool) ‑> ('arwt ‑> unit

Filter elements in place.

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'mutt

Map elements with a function, possibly filtering some of them out.

val flat_map : ('a ‑> ('b_t) ‑> ('a_t ‑> ('b'mutt

Map each element to a sub-vector.

val flat_map_seq : ('a ‑> 'b sequence) ‑> ('a_t ‑> ('b'mutt

Like flat_map, but using sequence for +intermediate collections.

  • Since: 0.14
val flat_map_list : ('a ‑> 'b list) ‑> ('a_t ‑> ('b'mutt

Like flat_map, but using list for +intermediate collections.

  • Since: 0.14
val (>>=) : ('a_t ‑> ('a ‑> ('b_t) ‑> ('b'mutt

Infix version of flat_map.

val (>|=) : ('a_t ‑> ('a ‑> 'b) ‑> ('b'mutt

Infix version of map.

val get : ('a_t ‑> int ‑> 'a

Access element by its index, or

  • Raises Invalid_argument: if bad index.
val set : ('arwt ‑> int ‑> 'a ‑> unit

Modify element at given index, or

  • Raises Invalid_argument: if bad index.
val remove : ('arwt ‑> int ‑> unit

Remove the n-th element of the vector. Does NOT preserve the order +of the elements (might swap with the last element).

val rev : ('a_t ‑> ('a'mutt

Reverse the vector.

val rev_in_place : ('arwt ‑> 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 : ('arwt ‑> '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, 'mutt

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, 'mutt

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'mutt

of_array a returns a vector corresponding to the array a. Operates in O(n) time.

val of_list : 'a list ‑> ('a'mutt
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_seq : ?⁠init:('arwt ‑> 'a sequence ‑> ('arwt
val to_seq : ('a_t ‑> 'a sequence

Return a sequence with the elements contained in the vector.

val to_seq_rev : ('a_t ‑> 'a sequence

to_seq_rev v returns the sequence of elements of v in reverse order, +that is, the last elements of v are iterated on first.

  • Since: 0.14
val slice : ('arwt ‑> 'a array * int * int

Vector as an array slice. By doing it we expose the internal array, so +be careful!.

val slice_seq : ('a_t ‑> int ‑> int ‑> 'a sequence

slice_seq v start len is the sequence of elements from v.(start) +to v.(start+len-1).

val of_klist : ?⁠init:('arwt ‑> 'a klist ‑> ('arwt
val to_klist : ('a_t ‑> 'a klist
val of_gen : ?⁠init:('arwt ‑> 'a gen ‑> ('arwt
val to_gen : ('a_t ‑> 'a gen
val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a printer ‑> ('a_t printer
\ No newline at end of file diff --git a/2.1/containers/Containers/.jbuilder-keep b/2.1/containers/Containers/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/2.1/containers/Containers/Hashtbl/Make/index.html b/2.1/containers/Containers/Hashtbl/Make/index.html new file mode 100644 index 00000000..6a64d417 --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (containers.Containers.Hashtbl.Make)

Module Containers.Hashtbl.Make

Parameters

H : Hashtbl.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
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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> Hashtbl.statistics
\ No newline at end of file diff --git a/2.1/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html b/2.1/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html new file mode 100644 index 00000000..6ee3e6f7 --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -0,0 +1,2 @@ + +1-H (containers.Containers.Hashtbl.MakeSeeded.1-H)

Parameter Containers.Hashtbl.MakeSeeded.1-H

type t
val equal : t ‑> t ‑> bool
val hash : int ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers/Containers/Hashtbl/MakeSeeded/index.html b/2.1/containers/Containers/Hashtbl/MakeSeeded/index.html new file mode 100644 index 00000000..2c54f0b7 --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (containers.Containers.Hashtbl.MakeSeeded)

Module Containers.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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> statistics
\ No newline at end of file diff --git a/2.1/containers/Containers/Hashtbl/index.html b/2.1/containers/Containers/Hashtbl/index.html new file mode 100644 index 00000000..a813928c --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/index.html @@ -0,0 +1,21 @@ + +Hashtbl (containers.Containers.Hashtbl)

Module Containers.Hashtbl

  • Since: 0.14
include module type of Hashtbl with type Hashtbl.statistics = Hashtbl.statistics and module Hashtbl.Make = Hashtbl.Make and type ('a, 'b) Hashtbl.t = ('a'b) Hashtbl.t
type ('a, 'b) t = ('a'b) Hashtbl.t
val create : ?⁠random:bool ‑> int ‑> ('a'bt
val clear : ('a'bt ‑> unit
val reset : ('a'bt ‑> unit
val copy : ('a'bt ‑> ('a'bt
val add : ('a'bt ‑> 'a ‑> 'b ‑> unit
val find : ('a'bt ‑> 'a ‑> 'b
val find_opt : ('a'bt ‑> 'a ‑> 'b option
val find_all : ('a'bt ‑> 'a ‑> 'b list
val mem : ('a'bt ‑> 'a ‑> bool
val remove : ('a'bt ‑> 'a ‑> unit
val replace : ('a'bt ‑> 'a ‑> 'b ‑> unit
val iter : ('a ‑> 'b ‑> unit) ‑> ('a'bt ‑> unit
val filter_map_inplace : ('a ‑> 'b ‑> 'b option) ‑> ('a'bt ‑> unit
val fold : ('a ‑> 'b ‑> 'c ‑> 'c) ‑> ('a'bt ‑> 'c ‑> 'c
val length : ('a'bt ‑> int
val randomize : unit ‑> unit
val is_randomized : unit ‑> bool
type statistics = Hashtbl.statistics = {
num_bindings : int;
num_buckets : int;
max_bucket_length : int;
bucket_histogram : int array;
}
val stats : ('a'bt ‑> statistics
module type HashedType : sig ... end
module type S : sig ... end
module Make : functor (H : Hashtbl.HashedType) -> sig ... end
module type SeededHashedType : sig ... end
module type SeededS : sig ... end
module MakeSeeded : functor (H : SeededHashedType) -> sig ... end
val hash : 'a ‑> int
val seeded_hash : int ‑> 'a ‑> int
val hash_param : int ‑> int ‑> 'a ‑> int
val seeded_hash_param : int ‑> int ‑> int ‑> 'a ‑> int
include CCHashtbl.Poly
val get : ('a'b) Hashtbl.t ‑> 'a ‑> 'b option

Safe version of Hashtbl.find.

val get_or : ('a'b) 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) Hashtbl.t ‑> 'a CCHashtbl.sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : ('a'b) Hashtbl.t ‑> 'b CCHashtbl.sequence

Iterate on values in the table.

val keys_list : ('a'b) Hashtbl.t ‑> 'a list

keys_list t is the list of keys in t. +If the key is in the Hashtable multiple times, all occurrences will be returned.

  • Since: 0.8
val values_list : ('a'b) Hashtbl.t ‑> 'b list

values_list t is the list of values in t.

  • Since: 0.8
val map_list : ('a ‑> 'b ‑> 'c) ‑> ('a'b) Hashtbl.t ‑> 'c list

Map on a hashtable's items, collect into a list.

val incr : ?⁠by:int ‑> ('a, int) 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) Hashtbl.t ‑> 'a ‑> unit

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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) CCHashtbl.sequence

Iterate on bindings in the table.

val add_list : ('a'b list) 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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) CCHashtbl.sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val of_seq : ('a * 'b) CCHashtbl.sequence ‑> ('a'b) Hashtbl.t

From the given bindings, added in order.

val add_seq_count : ('a, int) Hashtbl.t ‑> 'a CCHashtbl.sequence ‑> 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.

  • Since: 0.16
val of_seq_count : 'a CCHashtbl.sequence ‑> ('a, int) Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : ('a'b) Hashtbl.t ‑> ('a * 'b) list

List of bindings (order unspecified).

val of_list : ('a * 'b) list ‑> ('a'b) Hashtbl.t

Build a table from the given list 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 update : ('a'b) 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) 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 : 'a CCHashtbl.printer ‑> 'b CCHashtbl.printer ‑> ('a'b) Hashtbl.t CCHashtbl.printer
module type S' = CCHashtbl.S
module Make' = CCHashtbl.Make
\ No newline at end of file diff --git a/2.1/containers/Containers/Hashtbl/module-type-HashedType/index.html b/2.1/containers/Containers/Hashtbl/module-type-HashedType/index.html new file mode 100644 index 00000000..5ebe8dd7 --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/module-type-HashedType/index.html @@ -0,0 +1,2 @@ + +HashedType (containers.Containers.Hashtbl.HashedType)

Module type Containers.Hashtbl.HashedType

type t
val equal : t ‑> t ‑> bool
val hash : t ‑> int
\ No newline at end of file diff --git a/2.1/containers/Containers/Hashtbl/module-type-S'/index.html b/2.1/containers/Containers/Hashtbl/module-type-S'/index.html new file mode 100644 index 00000000..8262087a --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/module-type-S'/index.html @@ -0,0 +1,21 @@ + +S' (containers.Containers.Hashtbl.S')

Module type Containers.Hashtbl.S'

include Hashtbl.S
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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> Hashtbl.statistics
val get : 'a t ‑> key ‑> 'a option

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

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 CCHashtbl.sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : 'a t ‑> 'a CCHashtbl.sequence

Iterate on values in the table.

val keys_list : _ t ‑> key list

keys_list t is the list of keys in t. +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_seq : 'a t ‑> (key * 'a) CCHashtbl.sequence

Iterate on values in the table.

val of_seq : (key * 'a) CCHashtbl.sequence ‑> 'a t

From the given bindings, added in order.

val add_seq : 'a t ‑> (key * 'a) CCHashtbl.sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val add_seq_count : int t ‑> key CCHashtbl.sequence ‑> 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.

  • Since: 0.16
val of_seq_count : key CCHashtbl.sequence ‑> int t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : 'a t ‑> (key * 'a) list

List of bindings (order unspecified).

val of_list : (key * 'a) list ‑> 'a t

Build a table from the given list 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 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
\ No newline at end of file diff --git a/2.1/containers/Containers/Hashtbl/module-type-S/index.html b/2.1/containers/Containers/Hashtbl/module-type-S/index.html new file mode 100644 index 00000000..1fc7cd07 --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (containers.Containers.Hashtbl.S)

Module type Containers.Hashtbl.S

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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> statistics
\ No newline at end of file diff --git a/2.1/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html b/2.1/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html new file mode 100644 index 00000000..e7c21d46 --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html @@ -0,0 +1,2 @@ + +SeededHashedType (containers.Containers.Hashtbl.SeededHashedType)

Module type Containers.Hashtbl.SeededHashedType

type t
val equal : t ‑> t ‑> bool
val hash : int ‑> t ‑> int
\ No newline at end of file diff --git a/2.1/containers/Containers/Hashtbl/module-type-SeededS/index.html b/2.1/containers/Containers/Hashtbl/module-type-SeededS/index.html new file mode 100644 index 00000000..906f36c0 --- /dev/null +++ b/2.1/containers/Containers/Hashtbl/module-type-SeededS/index.html @@ -0,0 +1,2 @@ + +SeededS (containers.Containers.Hashtbl.SeededS)

Module type Containers.Hashtbl.SeededS

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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> statistics
\ No newline at end of file diff --git a/2.1/containers/Containers/index.html b/2.1/containers/Containers/index.html new file mode 100644 index 00000000..00f9e02d --- /dev/null +++ b/2.1/containers/Containers/index.html @@ -0,0 +1,2 @@ + +Containers (containers.Containers)

Module Containers

Drop-In replacement to Stdlib

module Array = CCArray
module ArrayLabels = CCArrayLabels
module Array_slice = CCArray_slice
module Bool = CCBool
module Char = Char
module Equal = CCEqual
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 ListLabels = CCListLabels
module Map = CCMap
module Nativeint = CCNativeint
module Option = CCOpt
module Ord = CCOrd
module Pair = CCPair
module Parse = CCParse
module Random = CCRandom
module Ref = CCRef
module Result = CCResult
module Set = CCSet
module String = CCString
module Vector = CCVector
module Monomorphic = CCMonomorphic
module Utf8_string = CCUtf8_string
include Monomorphic
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
val (=.) : float ‑> float ‑> bool
val (<>.) : float ‑> float ‑> bool
val (<.) : float ‑> float ‑> bool
val (>.) : float ‑> float ‑> bool
val (<=.) : float ‑> float ‑> bool
val (>=.) : float ‑> float ‑> bool
val (==) : [ `Consider_using_CCEqual_physical ]
  • Deprecated Please use CCEqual.physical or Pervasives.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • Deprecated Please use [not CCEqual.physical] or Pervasives.(!=) instead.
\ No newline at end of file diff --git a/2.1/containers/containers.odoc b/2.1/containers/containers.odoc new file mode 100644 index 0000000000000000000000000000000000000000..164a12bc17ee0757e2023c62f02b3f3b3355d7b9 GIT binary patch literal 9175 zcmbVSdwkT@mCtYH-pM4HC}LR@MHA+c2apU32(7^h;gv235&;$MbTat`hD>J0nF$c2 zU@M5AlwUwZ7HWq_MC*fxAB(cvLgmw?zGzEVwrH)?M?bAy7p!Hgw4b`)bI+Xz1YAG+ z$4u_r^F8ODd+)jDdmo9n#lyo#)LmESU$OD=9~TuB)#4-Z8Gz4aduqe+SUMDmnaR|) z+NNAN;GcYAl{I_m={hiu?eeK+kH<_QTh6!BJWd0MV<{#d=+KBybWQqGMW92 zfsEBKAsJ5$Z;n+Y%|tX5HapE&x*{E~Xi2w4B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(F`1+9?v^s&fG9B1Lf+zOelvaM>Xby=($oWv!QG7KvH# zGj}tERargNug};2!i)OruY=?Ul5EOLeod0mBO$qoBy<6*ZJiv_JRQ}OsTwhpt^R{& zs!D`q(@F4TUU0gW1o}ZumdzpYvw88SZaksFUXbda%hkJzYI5(Tkj^_#>h$6H6weqC z#Yyx+Ua_AW52~nNMD;()*I(hG_f-g%lK}VI+H+ThS3S2vvWg@}@{(#FzrI4Wjzq8J zMSeFPV^P0}>VKK9ALE;;-ew{CK8cR!MFBUSYEi$7>fg%OPx0}~EkwIXbTTiR;p2B( zi1w4{-Mr|wp@lEbvh1MMbM7m29vT{2@EiKn%q@Ix&hnFWqvV50^;?5@6%aDUUdiCJ7T z<7R4Hue+M;xm+4IJBz!6abb=7AsQwRU4u1nUKZHFKz_ZGt|Ol6aSF)CW?8m43tY;; zmD=L3tHSY4Y^RWaTsLW>`urfv_&9<^r80r*kM7P0qR%x$yv$SGP)EHIV+BYUE$#w#%>aV#pPECCl}OR9~={ z{YK;JF+vLV2*W(wwy0)vA8A+sg>Wfxyy+$4?ry282m*dfbX zy%=s~PhSDf(YU#ctI+mR=rN{+;w@v9+%N-gu_?2n3m^SIA9acO-T23ZP_!bRtjPZ- zK^>`8L}ID58EUHw1UACL-kb2BFsVoz9`m|Vc&7?#6Tz&B#(-{hg{QhQ-)ciat8-)V Sbf2d0I=^iw|3BKsTKiv9T%DN! literal 0 HcmV?d00001 diff --git a/2.1/containers/index-generated.mld b/2.1/containers/index-generated.mld new file mode 100644 index 00000000..fe7ddc94 --- /dev/null +++ b/2.1/containers/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers} +This library exposes the following toplevel modules: {!modules:CCArray CCArrayLabels CCArray_slice CCBool CCChar CCEqual CCFloat CCFormat CCFun CCHash CCHashtbl CCHeap CCIO CCInt CCInt32 CCInt64 CCList CCListLabels CCMap CCNativeint CCOpt CCOrd CCPair CCParse CCRandom CCRef CCResult CCSet CCString CCUtf8_string CCVector Containers}. \ No newline at end of file diff --git a/2.1/containers/index.html b/2.1/containers/index.html new file mode 100644 index 00000000..fb11fe9a --- /dev/null +++ b/2.1/containers/index.html @@ -0,0 +1,3 @@ + +index (containers.index)

Library containers

+This library exposes the following toplevel modules:

CCArray
CCArrayLabels
CCArray_slice
CCBool
CCChar
CCEqual
CCFloat
CCFormat
CCFun
CCHash
CCHashtbl
CCHeap
CCIO
CCInt
CCInt32
CCInt64
CCList
CCListLabels
CCMap
CCNativeint
CCOpt
CCOrd
CCPair
CCParse
CCRandom
CCRef
CCResult
CCSet
CCString
CCUtf8_string
CCVector
Containers

.

\ No newline at end of file diff --git a/2.1/containers/page-index.odoc b/2.1/containers/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9b8426d2595e6624cccd1a71a6a918855a9fea04 GIT binary patch literal 654 zcma)4Jx{|h5DgU!Fn|z$AV@7Ag;r2dRWY>~5J;h|%EyY_#HE(pIM{B19cIdakeJei z4GFQZApQ*hfe~@FlK>mTN$=ged*`#wJ?`dK^M(A%)!pN}Wm##6F^Cz6spqWAeTAt{ zgzRUi?~#j@%FE~VboJrwYsjCL@UM-)Vn6a- zLa2%r?GYMzf>sMm;}8lj_N!x>ELq1wnwx;V8rb)ECq7$)v@{$FM0QzXbwCUR;Xny^ k5M2iMeWY5Y6Zw;Zf@9(;Zl+~X^06vqc + + + index + + + + + +
+

OCaml package documentation

+
    +
  1. containers.unix 2.1
  2. +
  3. containers.top 2.1
  4. +
  5. containers.thread 2.1
  6. +
  7. containers.sexp 2.1
  8. +
  9. containers.monomorphic 2.1
  10. +
  11. containers.iter 2.1
  12. +
  13. containers.data 2.1
  14. +
  15. containers 2.1
  16. +
+ + diff --git a/2.1/odoc.css b/2.1/odoc.css new file mode 100644 index 00000000..e7808926 --- /dev/null +++ b/2.1/odoc.css @@ -0,0 +1,234 @@ +@charset "UTF-8"; +/* Copyright (c) 2016 Daniel C. Bünzli. All rights reserved. + Distributed under the ISC license, see terms at the end of the file. + odoc 1.2.0 */ + +/* Reset a few things. */ + +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre, +a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp, +small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li, +fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td, +article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup, +menu,nav,output,ruby,section,summary,time,mark,audio,video +{ margin:0; padding:0; border:0; /* outline: 0; */ + font-size:100%; font: inherit; line-height:inherit; vertical-align:baseline; + text-align: inherit; color: inherit; background: transparent; } + +table { border-collapse: collapse; border-spacing: 0; } +*, *:before, *:after { box-sizing: border-box; } + +body +{ font-family: Helvetica, "DejaVu Sans", Arial, sans-serif; + font-weight: normal; + font-size: 0.875rem; + line-height:1.25rem; + text-align: left; + min-width: 40ex; + max-width: 78ex; + padding: 1.25rem; + margin-left: 3.75rem; + color: #222; background: #FAFAFA; } + +/* Basic markup elements */ + +b, strong { font-weight: bold; } +em { font-style: italic; } + +sup { vertical-align: super; } +sub { vertical-align: sub; } +sup, sub { font-size : 0.75rem; line-height: 0; margin-left: 0.2ex; } + +p, div, img { margin-top: 1.25rem; } + +ul, ol +{ margin-top: 0.625rem; margin-bottom: 0.625rem; list-style-position: outside } + +ul { list-style-type: square } +ul > li { margin-left: 1.375rem; } +ol > li { margin-left: 1.7rem; } +li > *:first-child { margin-top: 0 } + +/* Text alignements, this should be forbidden. */ + +.left { text-align: left; } +.right { text-align: right; } +.center { text-align: center; } + +/* Links and anchors */ + +a { text-decoration:none; color:#2C5CBD; } +a:hover { box-shadow:0 1px 0 0 #2C5CBD; } +*:target /* Linked highlight */ +{ background-color: #FFF8E5; + box-shadow: 0 0 0 2px #FFF8E5, 0 0 0 3px #DDD; } + +.spec:hover > a.anchor, /* FIXME remove */ +.anchored:hover a.anchor { visibility: visible; } + +a.anchor:before { content: "#" } +a.anchor:hover { box-shadow: none; text-decoration: underline } +a.anchor +{ visibility: hidden; position: absolute; /* top: 0px; */ + margin-left: -3ex; + font-weight: normal; + font-style: normal; + padding-right: 1ex; padding-left: 1ex; /* To remain selectable */ + color: #AAA; } + +.xref-unresolved { box-shadow:0 1px 0 0 red } + +/* Section and document divisions. + Until at least 4.03 many of the modules of the stdlib start at .h7, + we restart the sequence there like h2 */ + +h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 +{ font-weight: bold; margin-top: 1.25rem; } + +h1 + *, h2 + *, .h7 + * { margin-top: 0.625rem; } +h1, h2, .h7 +{ font-size: 1.25rem; + line-height: 2.4375rem; /* 2.5rem - border width */ + padding-top: 0.625rem; + border-top: solid; + border-width: 1px; + border-color: #DDD; } + +h3, .h8 { font-size: 1.125rem; } +h2 + h3, .h7 + .h8 { margin-top: 0.625rem; } + +/* Preformatted and code */ + +tt, code, pre +{ font-family: Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", + monospace; + font-weight: normal; + font-size: 0.75rem; } + +pre +{ padding-left: 0.25rem; padding-right: 0.25rem; + margin-left: -0.25rem; margin-right: -0.25rem; + padding-top: 0.3125rem; padding-bottom: 0.3125rem; + margin-top: 1.25rem; /* margin-bottom: 0.625rem; */ + line-height: 1.1875rem; + background: #F1F1F1; } + +h1 tt, h1 code, h2 tt, h2 code, .h7 tt, .h7 code { font-size: 1.125rem } +h3 tt, h3 code { font-size: 1rem } + +/* Code lexemes */ + +.keyword { font-weight: bold; } + +/* Module member specification */ + +div.def { margin-top: 0rem; text-indent: -2ex; padding-left: 2ex; } +div.def + div.doc { margin-left: 1ex; margin-top: 0.15625rem } +div.doc > *:first-child { margin-top: 0rem; } + +/* Collapsible inlined include and module */ + +details +{ border-radius: 0.5rem; + border-left: 0.2rem solid; + border-color: #FAFAFA /* Background */; + margin-left: -1.5rem; + padding-left: 1.3rem; + padding-bottom: 0.625rem; } + +details[open] { border-color: #AAA; } + +/* Records and variants FIXME */ + +div.def table { text-indent: 0em; padding:0; margin-left: -2ex; } +td.def { padding-right: 2ex } +.record td.def { padding-left:2ex; } +td.doc *:first-child { margin-top: 0em } + +/* @ tags */ + +ul.at-tag { list-style-type: none; margin-left: 0; padding: 0; } +ul.at-tag li { margin-left:0; padding:0; } +ul.at-tag li p:first-child { margin-top: 0 } /* FIXME remove */ +span.at-tag { font-weight: bold } +.at-tag.deprecated { font-weight: normal; color: crimson } +.at-tag.raise { font-weight: bold; } + +/* FIXME random other things to review. */ + +.heading +{ margin-top: 0.625rem; + border-top: solid; + border-width: 1px; + border-color: #DDD; + text-align: right; + font-weight: normal; + font-style: italic; } + +.heading + .sig { margin-top: -1.25rem; } +.heading + .parameters { margin-top: -1.25rem; } + +/* Odig package index */ + +.by-name ol, .by-tag ol, .errors ol { list-style-type: none; margin-left:0; } +.by-name ol ol, .by-tag ol ol { margin-top:0; margin-bottom: 0 } +.by-name li, .by-tag li, .errors li { margin-left:0; } + +.by-name .version { font-size: 0.625rem; color: #AAA } +.by-name nav { margin-bottom: 0.625rem } +.by-name nav a +{ text-transform: uppercase; font-size: 1.125rem; + margin-right:1ex; color: #222; display: inline-block; } + +.by-tag nav a { margin-right:1ex; color: #222; display: inline-block; } +.by-tag > ol > li { margin-top: 0.625rem; } +.by-tag > ol > li > span, +.by-tag > ol > li > ol, +.by-tag > ol > li > ol > li { display: inline-block; margin-right: 1ex; } + +/* Odig package page */ + +.package nav { display: inline; font-size: 0.875rem; font-weight: normal; } +.package .version { font-size: 0.875rem; } + +h1 + .modules, h1 + .sel { margin-top: 0.625rem } +.sel { font-weight: normal; font-style: italic; + font-size:0.875rem; margin-top:1.25rem; } +.sel + .modules { margin-top:0.625rem; + margin-bottom: 1.25rem; margin-left: 1ex; } + +.modules { margin:0; } +.modules .module { min-width:8ex; padding-right: 2ex } + +.package.info { margin: 0;} +.package.info td:first-child { font-style: italic; padding-right: 2ex; } +.package.info ul { list-style-type: none; display: inline; margin:0; } +.package.info li { display: inline-block; margin:0; margin-right:1ex; } +#info-authors li, #info-maintainers li { display:block; } + +/* Mobile adjustements. */ + +@media only screen and (max-width: 78ex) +{ body { margin: auto; } } + +/* Print adjustements. */ + +@media print +{ body { color: black; background: white; } + body nav:first-child { visibility: hidden; }} + +/*--------------------------------------------------------------------------- + Copyright (c) 2016 Daniel C. Bünzli + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + ---------------------------------------------------------------------------*/ diff --git a/dev/containers.data/CCBV.odoc b/dev/containers.data/CCBV.odoc new file mode 100644 index 0000000000000000000000000000000000000000..a0d881b84feaaf979d897a231ffa8b0832985e77 GIT binary patch literal 4719 zcmbtYYit}>74|+x!dnV`5H$jY+{Ekkd%bHXp-$p-Z6|h3sg>BNB_xnFyL)$c@a){p z%&Z@6sRR`9r-gB?xPn$_8WLJTRZLMR@B=DPDgA*^p;W5WNFbn61!^lqCDbCqckZ2; zU7Lt!B{z3>?mg!_=X~e8XI7L&X(*o^$>#1q|MeesbaeFLPs86H{N1oUToRV68y2^n zY*}~p$I??%lZ%DicPGC6-si7>R zn@Gkz-+yMZ;CqK>>kV$}uCc<|q~Wgck}GVd;1~Rhc$%A>KQ(d3?A#2Sx_x49=F|ed z>-;2h46DQ$A~~9JjJr8A9A=4C=HMtVGu;$cm8}|Xjkz_>ilNmkTM%{5Dov~88p3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2Qa+|W4A^K3d()5+@9Vd#a`wxc+1SAHjzy(#tE}8l9Y-)m9xY@vn z81}CmI~3@^RE|txSO@1IpCGEg(HFD?d6redctw7R;qjA71-1C?Dv;AbAlv=e0s*9r zGLY8Ce-TJ$R~U)h?%?(2{|#uk6;NIL`*>Evc5 zA{OkZ0ex^+g{)OX=J=OF2b;>lR^Z@WG(^x>Lvq#Tpnr#h-Kn{@pT|Q#-&B5{QhpLQ z_mz!GC8|q4`V^D}-0g?h;cL~A0WT1wd_|N!P9CKYgNE{QumtXbYxGh(Q(g=K{aOLK z5&#-c69h_ZKP{M>XD+fj-WD?{hV&;@OL;oz=6z3HO_BG5bZ~bo$Nw5S{+n`qHE>+c zphv(kSyQ!y1lq_u?rT(yo+%~6l7?x#IFgWcVUxTal$1%mN|l6-QK=y;ys@H#^yu;m z(2~*aESrs#@K`v8IW^qD7^SY| +CCBV (containers.data.CCBV)

Module CCBV

Imperative Bitvectors

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.

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

Create a bitvector of given size, with given default value.

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 or shrink +the underlying bitvector.

  • Raises Invalid_arg: on negative sizes.
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 flip : t ‑> int ‑> unit

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

val clear : t ‑> unit

Set every bit to 0.

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 will have length t 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.

val negate_self : t ‑> unit

negate_self t flips all of the bits in t.

  • Since: 1.2
val negate : t ‑> t

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

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.

val union : t ‑> t ‑> t

union bv1 bv2 returns the union of the two sets.

val inter : t ‑> t ‑> t

inter bv1 bv2 returns the intersection of the two sets.

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.

type 'a sequence = ('a ‑> unit) ‑> unit
val to_seq : t ‑> int sequence
val of_seq : int sequence ‑> t
val pp : Format.formatter ‑> t ‑> unit

Print the bitvector as a string of bits.

  • Since: 0.13
\ No newline at end of file diff --git a/dev/containers.data/CCBijection.odoc b/dev/containers.data/CCBijection.odoc new file mode 100644 index 0000000000000000000000000000000000000000..40e83dce27500f83101b6234c68951bc629fce42 GIT binary patch literal 4105 zcmbtW3yf4(8J;=!{0+Mx52b}7(7W$hcG+1dkBy=64p3}ufp(Xe3fA@R%vtubGjo@F z@9eUbR!~w?#d^1thfwT=vS1r+H&j@Sk8B&TXl$XPKpQlTX{{()+ZwH*G5+Uuhni|q z-RxxU-1B|k|NZ~@&%@2R*}3yt=C`zN+j;oMiA16mKY*X>@H1s3oppwU9}1p|x~&0xSa zgTX%Lx0pBE*&dVSSpf-Vx91kjpof{&dDb0NS317nvYZ*Xrd!1Kp0mCus5blUe2F!i zb}?sS0s1j}mLF`fq8&B!Tjp7GVidJ4vkQ5r7%;DB=U2F1!48(%zLWLC*1;#YPaN%d zs(1MfudMmhbGye!(VRP&*N>z942Sp8%NKXQHo1A$g49EA-1E{wD;#O_y=)|4~5~b+EUR8EPSGXBhk>< zA!;?P_HxW)xiwhLkX|1S39*W*Af#1eh(g@Xk#Ez<4OzF)XM2cA9pw_kbQ+zA(o&79 z*I=gS}OQtbQH`Ba+ z+)6j7ZIUiIMje98!XB3BmnJaAv*73T{8{AW_)dE*^ccoyPrI-HfHx30Ex9En;FY zCotJ2#}BYw+F4NYih^3{+XZ&j8W7z%;P@==f>CAVxcr9XH0}wKGnA=JlQb3gLYs6Z zjHwni2OMm;*k#3H(Q+T$l&<$V?Pb37vQT;XOtbP5x66Mq6PM}#b#qy}St;Gzq1+5K z=CR&!T`Fq4a^3aJ;9i0MCI|Axl8S5eo|#NF$`jF71%TuR9%@%D=S4drF(I=o`8`t| z3XqKE2m_)RLt~UiQ6?8jzCcLiw}$Q&SsrnD={ok&rl>g$*)(8YSUTPl$0Vu;SvR&wV!f-ch3FDvT(+A66`ajU!*A&?a^(iRQhr{H_bHm}H#|CAv~T?5)w zY+JJTY4&l&KBjzmi6!<)sS@LS>2bXA6~sKSee7?Vq^Jh*NtUBn0ZUw9x2N9bC5m$LFXAio517RWE8 zl^l>4ft*oR93a2eR*FD=i&n6FD6ocNLgG@i7RVog`~k=%Deze!zX$TV637Dis}|@1 z@(&bv9bNM44%Yf5AQym~m%kqdat_F^=t}u>k90+sOIfVf86c;z<%Ve#2gB)k0m$0vMAu>@0_=_ZPsZ;>|WpFM?4gjlTlqFixmKyaq-KiXIT6mwEs9{Jh0OMZ8XanOO z#aIHw1F}&wGGKfuj{C!T6qH_+b1{F$RFN1G!T(HiL1}!v4z0eFHPw2F6ds-hs~#fN=s> zlPuuZfP8#t3~P=py%e8;V7hHuXeSuI;X-Y((0(v3XrY5(yc!E(qqG58j7%VEW5rlc zf$^q>e;1555U#bq50t1(egyOy<>wjHKmj4MFpl~&pcAyrX`q!T!&?=SXMxUC%=1VC zvQW!k1X{#-No1XLbxcwn{y?L`s% F`xhVh{GtE= literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCBijection/.jbuilder-keep b/dev/containers.data/CCBijection/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCBijection/Make/argument-1-L/index.html b/dev/containers.data/CCBijection/Make/argument-1-L/index.html new file mode 100644 index 00000000..f26091b4 --- /dev/null +++ b/dev/containers.data/CCBijection/Make/argument-1-L/index.html @@ -0,0 +1,2 @@ + +1-L (containers.data.CCBijection.Make.1-L)

Parameter CCBijection.Make.1-L

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCBijection/Make/argument-2-R/index.html b/dev/containers.data/CCBijection/Make/argument-2-R/index.html new file mode 100644 index 00000000..0061f2df --- /dev/null +++ b/dev/containers.data/CCBijection/Make/argument-2-R/index.html @@ -0,0 +1,2 @@ + +2-R (containers.data.CCBijection.Make.2-R)

Parameter CCBijection.Make.2-R

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCBijection/Make/index.html b/dev/containers.data/CCBijection/Make/index.html new file mode 100644 index 00000000..90ec9ac5 --- /dev/null +++ b/dev/containers.data/CCBijection/Make/index.html @@ -0,0 +1,7 @@ + +Make (containers.data.CCBijection.Make)

Module CCBijection.Make

Parameters

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

Checks both sides for key membership.

val mem_left : left ‑> t ‑> bool

Checks for membership of correspondence using left key

val mem_right : right ‑> t ‑> bool

Checks 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

Removes the left, right binding if it exists. Returns the +same bijection otherwise.

val remove_left : left ‑> t ‑> t

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

val remove_right : right ‑> t ‑> t

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

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

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

val list_right : t ‑> (right * left) list
val add_seq : (left * right) sequence ‑> t ‑> t
val of_seq : (left * right) sequence ‑> t
val to_seq : t ‑> (left * right) sequence
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 diff --git a/dev/containers.data/CCBijection/index.html b/dev/containers.data/CCBijection/index.html new file mode 100644 index 00000000..b54cf64e --- /dev/null +++ b/dev/containers.data/CCBijection/index.html @@ -0,0 +1,4 @@ + +CCBijection (containers.data.CCBijection)

Module CCBijection

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 sequence = ('a ‑> unit) ‑> unit
module type OrderedType : sig ... end
module type S : sig ... end
module Make : functor (L : OrderedType) -> functor (R : OrderedType) -> S with type left = L.t and type right = R.t
\ No newline at end of file diff --git a/dev/containers.data/CCBijection/module-type-OrderedType/index.html b/dev/containers.data/CCBijection/module-type-OrderedType/index.html new file mode 100644 index 00000000..f9d3a4cb --- /dev/null +++ b/dev/containers.data/CCBijection/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (containers.data.CCBijection.OrderedType)

Module type CCBijection.OrderedType

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCBijection/module-type-S/index.html b/dev/containers.data/CCBijection/module-type-S/index.html new file mode 100644 index 00000000..69cb3b32 --- /dev/null +++ b/dev/containers.data/CCBijection/module-type-S/index.html @@ -0,0 +1,7 @@ + +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

Checks both sides for key membership.

val mem_left : left ‑> t ‑> bool

Checks for membership of correspondence using left key

val mem_right : right ‑> t ‑> bool

Checks 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

Removes the left, right binding if it exists. Returns the +same bijection otherwise.

val remove_left : left ‑> t ‑> t

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

val remove_right : right ‑> t ‑> t

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

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

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

val list_right : t ‑> (right * left) list
val add_seq : (left * right) sequence ‑> t ‑> t
val of_seq : (left * right) sequence ‑> t
val to_seq : t ‑> (left * right) sequence
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 diff --git a/dev/containers.data/CCBitField.odoc b/dev/containers.data/CCBitField.odoc new file mode 100644 index 0000000000000000000000000000000000000000..27f8f361fadfa76d67834f7a95a45530c428b7f0 GIT binary patch literal 1955 zcmb7^O>7%Q6vv(D8HlN9`A|g!p%W#k>@>06G-{xq8>dYrL}*3A$1NJ~&c>_k?wH+i z99xKTCQ)Fk;vhb#Ah!)53lD;?hESpEC{m}74+KR#6-anlMZt& zBj0)UiLJk;zP-DcymfW^&enHY;{HM+(J_-qzy>}&4^93n7!j|5`RHaM=Cx`Nc2juXG41^?Yu`=^5 z$DbqIC!)j%4a|}wm?C{aYKh#RVZfd^ zetLp>uHy?9_|%=`fk#DwhK?CV`P!H7J+v|X)%>Y_TQe`+x%^-p51wPe0!9}YhOfZg zUoQW;XQ*d1z5GZ0=M^Jb9}5FBCwa@YwHD>Oa=8-sST1xt?&qpJm=DX;WNnn@W{VZa zwQ`6Ct+*n8KAHXP)wiwUfm@^91KV$1A2*`-qs<$T8J^*MiuyIhR*1MoUC+Egose0i zT4G2C=fuM}(L5n3j9{&KjN>jj0>oOhWep=T45d4|e=^{8<}1O$c0o#P6=|&^8e|6x zSPg}X>o?(K#-od~RmTz~B~qBKg@Sp*nq3Jw#vQNX5tT!11e~@+ha|L)NnOOZ2|tRj zM$x4{^lijTo2&4A?=(tp6mXzMaK1E*)6Sev#^6o3(8xFjH!uU +1-X (containers.data.CCBitField.Make.1-X)

Parameter CCBitField.Make.1-X

\ No newline at end of file diff --git a/dev/containers.data/CCBitField/Make/index.html b/dev/containers.data/CCBitField/Make/index.html new file mode 100644 index 00000000..265d8a11 --- /dev/null +++ b/dev/containers.data/CCBitField/Make/index.html @@ -0,0 +1,4 @@ + +Make (containers.data.CCBitField.Make)

Module CCBitField.Make

Create a new bitfield type

Parameters

X : sig ... end

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 diff --git a/dev/containers.data/CCBitField/index.html b/dev/containers.data/CCBitField/index.html new file mode 100644 index 00000000..8897e60f --- /dev/null +++ b/dev/containers.data/CCBitField/index.html @@ -0,0 +1,15 @@ + +CCBitField (containers.data.CCBitField)

Module CCBitField

Bit Field

This module defines efficient bitfields +up to 30 or 62 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 ()
+      let z = B.mk_field ()
+
+      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

Bitfield Signature

module Make : functor (X : sig ... end) -> S

Create a new bitfield type

\ No newline at end of file diff --git a/dev/containers.data/CCBitField/module-type-S/index.html b/dev/containers.data/CCBitField/module-type-S/index.html new file mode 100644 index 00000000..b9fe76af --- /dev/null +++ b/dev/containers.data/CCBitField/module-type-S/index.html @@ -0,0 +1,4 @@ + +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 diff --git a/dev/containers.data/CCCache.odoc b/dev/containers.data/CCCache.odoc new file mode 100644 index 0000000000000000000000000000000000000000..91325b51011ccf4c3bcf016360f95e95187e6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git a/dev/containers.data/CCCache/.jbuilder-keep b/dev/containers.data/CCCache/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCCache/index.html b/dev/containers.data/CCCache/index.html new file mode 100644 index 00000000..cf77f8fc --- /dev/null +++ b/dev/containers.data/CCCache/index.html @@ -0,0 +1,38 @@ + +CCCache (containers.data.CCCache)

Module CCCache

Caches

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'bcallback ‑> ('a'bt ‑> ('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'bcallback ‑> ('a'bt ‑> (('a ‑> 'b) ‑> 'a ‑> 'b) ‑> 'a ‑> 'b

with_cache_rec c f is a function that first, applies f to +some f' = fix f, such that recursive calls to f' are cached in c. +It is similar to with_cache but with a function that takes as +first argument its own recursive version. +Example (memoized Fibonacci function): +

      let fib = with_cache_rec (lru 256)
+          (fun fib' n -> match n with
+             | 1 | 2 -> 1
+             | _ -> fib' (n-1) + fib' (n-2)
+          );;
+
+      fib 70;;
  • 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'bt ‑> ('a ‑> 'b ‑> unit) ‑> unit

Iterate on cached values. Should yield size cache pairs.

val add : ('a'bt ‑> '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'bt

Dummy cache, never stores any value.

val linear : eq:'a equal ‑> int ‑> ('a'bt

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'bt

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'bt

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'bt

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

\ No newline at end of file diff --git a/dev/containers.data/CCDeque.odoc b/dev/containers.data/CCDeque.odoc new file mode 100644 index 0000000000000000000000000000000000000000..7780e5d60aedecb77c9bc4f9cbbd59f9dda10147 GIT binary patch literal 3800 zcmcInYitx%6yEO6M7Iz^G$=8Gw`I56Ez9n<-S7&^K%oRBl&6aPXztG5?M^y7Go6`j zEe7NVKYdI=Ac&Gd0r3$e7(!4qB!(ChF^Wh+VhDeX7>)1;;~yXA+e%@`ZhM|AEJ^mA@=bAFf`$&s#rbOC%!nL?V-EBr<8;y^%;F;@%C45OrMl)Dp>c z@++$bGpVhNGE(9pUAPqN2PmI>?$ z)k>sDvk-ymCMX@@~`cmyWqm3WBunw z&fnUGc z6bNimS6b6gekwk<;`AkZ+s&^f=Xk*~i6}3?5#)#Hupt0Tz~iU^GhVh-Ffz~P-wHE`cAyF&)ap2 zq-ecr1h&1#h@z3A4&@u8c3 zBA@N<^bmMJe=!M?qbdZS zNb@T~NfAUzL=;q(0>Nv3GgakF`zcAr$zW@*$c7oSbQ1~@IUFzj? zKIH|$O_-SNUwb(%0=^g@dPrr@DzZLgQlp~CQ0(#B@&nSd(y!9Xt5IZe3238PtXjpl`6{+O&`O( zuxtu8fVTq831`A6DL)G7GHO<3kXr^un!g6Vl2NLH~z!X~q z4hqDukHnUtGzSYPWmln7-XYYCW~l9Hn+~(V0IGKbd?V^z;LUBu+tZgg>kkKIajR&P*sU1ySFHm2d&xPQbG2&IWxQ*pt|D$?I~l<=Z;YRUc?U zqO7YW1nTaGi)NItmK?0e5uG;v7k=>y{>CBUru(V`D5t>foY^qFM&ZB$E(!xm!pSB^ z*{mU^IbyUu99WJA5q+2sp$^?Z+vRYZD)<8-+d9DGQk771sD{TAP+*e3jVdfD7D|DdR)*9pM%<&0 z<3N2hwP6D-C^yc&+to+?MEH99-!HTw9MmiAx zQK+{|bazA0Uy-;M)QKnmfjL5lQ~wrlG5U6xO@P}8wR9FTWI?DZ7L zS5+*23SL~d5wCCYK?ZloOSSp*StpfIXc8tp>31{3>`66%i<>0h6r4|6W+R ztjG#lfnA|m(DSi#vjGOA!=a$%Z*3PbHX6hiGC_D@Iu<6LTOMLU8~W~u+6j|t)?{;X zV(g_5d6|b?x7(y);z`ao&DftQ{vD=+7(3JGnTOt-5M#fj;am&0rjAD^G4^rb lp27p|hJl28*B~g@d{CxaBz{;F5<)Vhb&t!DF7g`y_ZNYPzoh^G literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCDeque/.jbuilder-keep b/dev/containers.data/CCDeque/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCDeque/index.html b/dev/containers.data/CCDeque/index.html new file mode 100644 index 00000000..b789301b --- /dev/null +++ b/dev/containers.data/CCDeque/index.html @@ -0,0 +1,14 @@ + +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, or

  • Raises Empty: if empty.
val peek_back : 'a t ‑> 'a

Last value, or

  • Raises Empty: if empty.
val take_back : 'a t ‑> 'a

Take last value, or

  • Raises Empty: if empty.
val take_front : 'a t ‑> 'a

Take first value, or

  • Raises Empty: if empty.
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 sequence = ('a ‑> unit) ‑> unit
val of_seq : 'a sequence ‑> 'a t

Create a deque from the sequence. +Optional argument deque disappears, use add_seq_back instead since +0.13

val to_seq : 'a t ‑> 'a sequence

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_seq_front : 'a t ‑> 'a sequence ‑> unit

add_seq_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_seq_back : 'a t ‑> 'a sequence ‑> unit

add_seq_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

print

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

Print the elements.

  • Since: 0.13
\ No newline at end of file diff --git a/dev/containers.data/CCFQueue.odoc b/dev/containers.data/CCFQueue.odoc new file mode 100644 index 0000000000000000000000000000000000000000..79d62cf2b52f78389b5bd620aec4e866513ab0c2 GIT binary patch literal 4475 zcmb_fYit}>72d}k5j#>KNG)wu;5wf5?k4-P-G)*pVdJC@k&-m769|;x+}*kB9XyZC z%j!LehU1qgx~7Z)uwHEM7OBp zRy5*~9~8E1nV9U-F0I$DdF@LxCqMe=#m{H=<(K{%j0%9&*TVXRRO-X$Q>j%Cu1KZS zRPbNHpo|{`XE)aae|Vy6H9g(7h=C6>pKiTgM=OG0XuR8MQOB=+_t^SRKeusi;x`9> z_vXaJ8^s{FVGA)0-SVgdt0rv6B;Gi2^``6B7Eay0>g?1{XSaUxl|7$(`o5KbBMki7 zH6NS0U!6EQ`DT9G#ZZSBxgzrD9_WqRkKKkWF-ghwA%Gk~L~A3~4jsM+xrd~_#|?-%Gw9v^@AL_v3_!`Da7@EoqG zZ5a|K9`@Q4w;ZTP9vLAUV{udsNWX9oLgFaHb6Pc1dz+$nLQEj@5?l;qOE?l=NgJ zb}~)pE#{~&MNEo`i-RBe09FBkY$)MI*TXHM8?g5l=KB}640!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O=fQI{TSeejE literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCFQueue/.jbuilder-keep b/dev/containers.data/CCFQueue/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCFQueue/index.html b/dev/containers.data/CCFQueue/index.html new file mode 100644 index 00000000..98f230cc --- /dev/null +++ b/dev/containers.data/CCFQueue/index.html @@ -0,0 +1,8 @@ + +CCFQueue (containers.data.CCFQueue)

Module CCFQueue

Functional queues

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a equal = 'a ‑> 'a ‑> bool
type 'a printer = 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_seq_front : 'a sequence ‑> 'a t ‑> 'a t
val add_seq_back : 'a t ‑> 'a sequence ‑> 'a t
val to_seq : 'a t ‑> 'a sequence
val of_seq : 'a sequence ‑> 'a t
val to_klist : 'a t ‑> 'a klist
val of_klist : 'a klist ‑> 'a t
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 diff --git a/dev/containers.data/CCFun_vec.odoc b/dev/containers.data/CCFun_vec.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8e95a50b820bd6c7d7e18e27309f8c9c03488736 GIT binary patch liter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{L3`|<(oi>-!IVc9wfKa&XE>OyxR!n0o)F>|4p&w4hm^`Qg>b0 znZR)=6xk^%!k6L5@0b`0WocboS$6^RTX+ve7E2L;-!O$>ky3xsC}Hd)sz_2ueITm5 z7Ep@|c`*m)etkc7CgEQtzhT28u1HU(2+s3M14!0{BriuK4F^N=Q@B_w?Fmb-M5XhA z9^Zb_!4BOtYqi_M+Vi3yeEB^Be%SzIDGr3|8SLc4((fYNoFbi8q;iA}7b!%~CBa_+ z-7lbW&|1;u+YKTYld$HX@Wntwx~oPhcQzFMEZp#GUy)c?xmwJN7jSb!k*YPQBBdIz ze{nYf^xQw)NL!=Aru(>?pzva-v7<&=a}zaj?ci{&cTF4Cy0BlQrO-^%Mn(Flj=Y=k KbxT-$0Lb4^ +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)

  • Since: 2.1
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a printer = 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.

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_seq : 'a t ‑> 'a sequence ‑> 'a t
val of_seq : 'a sequence ‑> 'a t
val to_seq : 'a t ‑> 'a sequence
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 diff --git a/dev/containers.data/CCGraph.odoc b/dev/containers.data/CCGraph.odoc new file mode 100644 index 0000000000000000000000000000000000000000..29c183923e631d1ac2edc76ec6af2518e62ca460 GIT binary patch literal 13507 zcmb7L3v?XSdDg7v+S-+0NfR&-!bnx2_*$5At611Jens-^B`$Td*A?prYT92)9?T9 z%)6|NigS9a%Xm+dq^ZP7l8S;N6e3w6yf$Bk*}WKC4a)WUZ2;ngVL(lbFrNUfF%M;m}?Nq8+r&=-WbZmUu(5kjk(aII8X66iA zo5qDTTUxwU(``-H-1*^TqSmJ+jFjd{A?>*JWM6C+a0Z@tCTebdlV;kQ1Jur3*&xbl zM#V9+z^<2ayvP6polQ%OT;8x_$tkO%nI+rNOIf22OVbHM+oWMrtyfFbQVa&>? zgS{ze1`t|NFU@IL-8Sr0n&guht7fNPo#a?ci*i9j6hyENQDv=44q|16o27irnXVXy zHdQT2DR0o6SqsYwx?^ZevF2FBh6$ln%sl8I4k1U!Ea{|}z8KxGKx0ua+YLc9z^YE( z!d4O;X@p3bgp%~Eqm?W|LL!v9E9x_lqUmU5%eKu)*ai?)swEa>L;o?rkUU7W{dU>N znp0+0YQve<9c@}Kmkk&VfT#7E0oE6p28%Fy_fA40A2pDZiC|w)0yx{)T{WPqW-Wun zQn~7+V>_mpGBz=?L2O5Yw!tuHC$lj2Xh|cTPxoo0dL1N{t%8*|vw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0w1{CF+eUn?S)`#9Ur6_Fi6xr=eO zUmzkog>ppVyhtd2FOZSb>de=qjq#Z)OT`1B7k*v3g$Sf|gc-~ulxrn^qU%X2wI3@TnFbm~2X`+C6 zr-;mxnm^=0Tqh!jVN#N^NfG%7J>oiLN+^FLlv^17g8{t7uiFUaW)Hq9BA*7lPyb#K zLG5?5M7K{wP6*`#65UNg!GC!w1v+jPk%w>z+V%ywKP)0&CEDKW;XWuLUk7dp|1qK5 zAe8HwoV@`EUR?SSfy{Xz$3*1mfSuza@)LT*?0}M*P^t{?1n>`u$V&uod+?8n$p3`c zc}zt98xJKrUlozx3T3xM_k>VNLMi%ue@nEs;u7q50SYWWC0bugxJ?iDPeto$;11VS z@tvlfrCUVeif4k5jTv6b3*Q>e*)|3*1LeboA&>G=Wzd;@)0*z}x~t6wBptBz;}spTn#i=mo2oIr5w6;5^;9)a01)va_?#FkCKk0f0KI@pld} z6apk37K=aKl}Q}Icf~Kg@gEa)nuzoWlp{wb@H3uXR$fhM2%`tYjQOPes-cpJzIPE> zG@0Pa*MEx?r3k$nM0EKj6ABdkZHEyYB~eimkjLe208CRn+pZQ-CxaOb$8ZpDREl_C z0)OOzb2Ugg=slJ{%{(wW2U+IKg5PwktfiZ09mGlpvR$+*G?4R)EE-kdPe6PK?8JDF SlO2m?_wlGftayQJ`TqdU)>^Ot literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCGraph/.jbuilder-keep b/dev/containers.data/CCGraph/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCGraph/Dot/index.html b/dev/containers.data/CCGraph/Dot/index.html new file mode 100644 index 00000000..1f92574f --- /dev/null +++ b/dev/containers.data/CCGraph/Dot/index.html @@ -0,0 +1,2 @@ + +Dot (containers.data.CCGraph.Dot)

Module CCGraph.Dot

type attribute = [
| `Color of string
| `Shape of string
| `Weight of int
| `Style of string
| `Label of string
| `Other of string * string
]

Dot attribute

type vertex_state

Hidden state associated to a vertex

val pp : tbl:('vvertex_statetable ‑> eq:('v ‑> 'v ‑> bool) ‑> ?⁠attrs_v:('v ‑> attribute list) ‑> ?⁠attrs_e:('e ‑> attribute list) ‑> ?⁠name:string ‑> graph:('v'et ‑> 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_seq : tbl:('vvertex_statetable ‑> eq:('v ‑> 'v ‑> bool) ‑> ?⁠attrs_v:('v ‑> attribute list) ‑> ?⁠attrs_e:('e ‑> attribute list) ‑> ?⁠name:string ‑> graph:('v'et ‑> Format.formatter ‑> 'v sequence ‑> unit
val with_out : string ‑> (Format.formatter ‑> 'a) ‑> 'a

Shortcut to open a file and write to it.

\ No newline at end of file diff --git a/dev/containers.data/CCGraph/Lazy_tree/index.html b/dev/containers.data/CCGraph/Lazy_tree/index.html new file mode 100644 index 00000000..d81d6e6d --- /dev/null +++ b/dev/containers.data/CCGraph/Lazy_tree/index.html @@ -0,0 +1,2 @@ + +Lazy_tree (containers.data.CCGraph.Lazy_tree)

Module CCGraph.Lazy_tree

type ('v, 'e) t = {
vertex : 'v;
children : ('e * ('v'et) list Lazy.t;
}
val map_v : ('a ‑> 'b) ‑> ('a'et ‑> ('b'et
val fold_v : ('acc ‑> 'v ‑> 'acc) ‑> 'acc ‑> ('v_t ‑> 'acc
\ No newline at end of file diff --git a/dev/containers.data/CCGraph/Map/index.html b/dev/containers.data/CCGraph/Map/index.html new file mode 100644 index 00000000..5c6ebc6c --- /dev/null +++ b/dev/containers.data/CCGraph/Map/index.html @@ -0,0 +1,4 @@ + +Map (containers.data.CCGraph.Map)

Module CCGraph.Map

Parameters

O : Map.OrderedType

Signature

type vertex = O.t
type 'a t
val as_graph : 'a t ‑> (vertex'agraph

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 sequence
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_seq : (vertex * 'a * vertex) sequence ‑> 'a t
val add_seq : (vertex * 'a * vertex) sequence ‑> 'a t ‑> 'a t
val to_seq : 'a t ‑> (vertex * 'a * vertex) sequence
\ No newline at end of file diff --git a/dev/containers.data/CCGraph/Seq/index.html b/dev/containers.data/CCGraph/Seq/index.html new file mode 100644 index 00000000..7ce3f580 --- /dev/null +++ b/dev/containers.data/CCGraph/Seq/index.html @@ -0,0 +1,2 @@ + +Seq (containers.data.CCGraph.Seq)

Module CCGraph.Seq

type 'a t = 'a sequence
val return : 'a ‑> 'a sequence
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 diff --git a/dev/containers.data/CCGraph/Traverse/Event/index.html b/dev/containers.data/CCGraph/Traverse/Event/index.html new file mode 100644 index 00000000..9e4d561e --- /dev/null +++ b/dev/containers.data/CCGraph/Traverse/Event/index.html @@ -0,0 +1,2 @@ + +Event (containers.data.CCGraph.Traverse.Event)

Module CCGraph.Traverse.Event

More detailed interface

type edge_kind = [
| `Forward
| `Back
| `Cross
]
type ('v, 'e) t = [
| `Enter of 'v * int * ('v'epath
| `Exit of 'v
| `Edge of 'v * 'e * 'v * edge_kind
]

A traversal is a sequence of such events

val get_vertex : ('v'et ‑> ('v * [ `Enter | `Exit ]) option
val get_enter : ('v'et ‑> 'v option
val get_exit : ('v'et ‑> 'v option
val get_edge : ('v'et ‑> ('v * 'e * 'v) option
val get_edge_kind : ('v'et ‑> ('v * 'e * 'v * edge_kind) option
val dfs : tbl:'v set ‑> eq:('v ‑> 'v ‑> bool) ‑> graph:('v'egraph ‑> 'v sequence ‑> ('v'et sequence_once

Full version of DFS.

  • Parameter eq: equality predicate on vertices.
val dfs_tag : eq:('v ‑> 'v ‑> bool) ‑> tags:'v tag_set ‑> graph:('v'egraph ‑> 'v sequence ‑> ('v'et sequence_once

Full version of DFS using integer tags.

  • Parameter eq: equality predicate on vertices.
\ No newline at end of file diff --git a/dev/containers.data/CCGraph/Traverse/index.html b/dev/containers.data/CCGraph/Traverse/index.html new file mode 100644 index 00000000..a4624037 --- /dev/null +++ b/dev/containers.data/CCGraph/Traverse/index.html @@ -0,0 +1,7 @@ + +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'et ‑> 'v sequence ‑> 'v sequence_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'et ‑> 'v sequence ‑> 'v sequence_once

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

val dfs : tbl:'v set ‑> graph:('v'et ‑> 'v sequence ‑> 'v sequence_once
val dfs_tag : tags:'v tag_set ‑> graph:('v'et ‑> 'v sequence ‑> 'v sequence_once
val bfs : tbl:'v set ‑> graph:('v'et ‑> 'v sequence ‑> 'v sequence_once
val bfs_tag : tags:'v tag_set ‑> graph:('v'et ‑> 'v sequence ‑> 'v sequence_once
val dijkstra : tbl:'v set ‑> ?⁠dist:('e ‑> int) ‑> graph:('v'et ‑> 'v sequence ‑> ('v * int * ('v'epath) sequence_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'et ‑> 'v sequence ‑> ('v * int * ('v'epath) sequence_once
module Event : sig ... end

More detailed interface

\ No newline at end of file diff --git a/dev/containers.data/CCGraph/index.html b/dev/containers.data/CCGraph/index.html new file mode 100644 index 00000000..58554f70 --- /dev/null +++ b/dev/containers.data/CCGraph/index.html @@ -0,0 +1,36 @@ + +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 a sequence of vertices as input. +If the user only has a single vertex (e.g., for a topological sort +from a given vertex), she can use Seq.return x to build a sequence +of one element.

status: unstable

  • Since: 0.12

Sequence Helpers

type 'a sequence = ('a ‑> unit) ‑> unit

A sequence of items of type 'a, possibly infinite

type 'a sequence_once = 'a sequence

Sequence that should be used only once

exception Sequence_once

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

module Seq : sig ... end

Interfaces for graphs

This interface is designed for oriented graphs with labels on edges

type ('v, 'e) t = 'v ‑> ('e * 'v) sequence

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

type ('v, 'e) graph = ('v'et
val make : ('v ‑> ('e * 'v) sequence) ‑> ('v'et

Make a graph by providing the children function.

type 'v tag_set = {
get_tag : 'v ‑> bool;
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 = {
mem : 'k ‑> bool;
find : 'k ‑> 'a;

(**

  • Raises Not_found: if element not added before

*)

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'atable

Default implementation for table: a Hashtbl.t.

val mk_map : cmp:('k ‑> 'k ‑> int) ‑> unit ‑> ('k'atable

Use a Map.S underneath.

Bags of vertices

type 'a bag = {
push : 'a ‑> unit;
is_empty : unit ‑> bool;
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 sequence ‑> 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'et ‑> 'v sequence ‑> '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'et ‑> 'v sequence ‑> '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'et ‑> 'v ‑> ('v'eLazy_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'et ‑> 'v ‑> ('v'eLazy_tree.t

Strongly Connected Components

type 'v scc_state

Hidden state for scc.

val scc : tbl:('v'v scc_statetable ‑> graph:('v'et ‑> 'v sequence ‑> 'v list sequence_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 Sequence_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 = {
graph : ('v'et;
add_edge : 'v ‑> 'e ‑> 'v ‑> unit;
remove : 'v ‑> unit;
}
val mk_mut_tbl : eq:('v ‑> 'v ‑> bool) ‑> ?⁠hash:('v ‑> int) ‑> int ‑> ('v'amut_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 : functor (O : 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) 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 diff --git a/dev/containers.data/CCGraph/module-type-MAP/index.html b/dev/containers.data/CCGraph/module-type-MAP/index.html new file mode 100644 index 00000000..34b99c3a --- /dev/null +++ b/dev/containers.data/CCGraph/module-type-MAP/index.html @@ -0,0 +1,4 @@ + +MAP (containers.data.CCGraph.MAP)

Module type CCGraph.MAP

type vertex
type 'a t
val as_graph : 'a t ‑> (vertex'agraph

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 sequence
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_seq : (vertex * 'a * vertex) sequence ‑> 'a t
val add_seq : (vertex * 'a * vertex) sequence ‑> 'a t ‑> 'a t
val to_seq : 'a t ‑> (vertex * 'a * vertex) sequence
\ No newline at end of file diff --git a/dev/containers.data/CCHashSet.odoc b/dev/containers.data/CCHashSet.odoc new file mode 100644 index 0000000000000000000000000000000000000000..999216606d3de9ec1b65d408b30587cc7d03f49d GIT binary patch literal 4641 zcmb7GdvF!y70=y0M~PJlGa}%i-I$x3n-G#4KqmpKi;y6ecLb_c!{*+-WX-+1m%DrO z5T$7gVkvDmSYRlfc6kJWp+I2(YaPT|+Db?3qs6Mslv-(N)saDLZBg6v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E{j5s+gnO~riM5Udes2FnpIm8+K zWTyO|M_efNeu)sMEDBkVBQ9cAi=@>F#I}(2Br5l#avx{CSML7}@qv)_ZN!3PeGip; zQTb}fdJb_J`!=*B?as3m%IzMJ+ka76h{^)0sadFenIl^SQn?&)6?s5qs$94VaXmjf F{|5@1;{N~u literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCHashSet/.jbuilder-keep b/dev/containers.data/CCHashSet/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCHashSet/Make/argument-1-E/index.html b/dev/containers.data/CCHashSet/Make/argument-1-E/index.html new file mode 100644 index 00000000..204296e7 --- /dev/null +++ b/dev/containers.data/CCHashSet/Make/argument-1-E/index.html @@ -0,0 +1,2 @@ + +1-E (containers.data.CCHashSet.Make.1-E)

Parameter CCHashSet.Make.1-E

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

Positive value

\ No newline at end of file diff --git a/dev/containers.data/CCHashSet/Make/index.html b/dev/containers.data/CCHashSet/Make/index.html new file mode 100644 index 00000000..9c64d2d2 --- /dev/null +++ b/dev/containers.data/CCHashSet/Make/index.html @@ -0,0 +1,3 @@ + +Make (containers.data.CCHashSet.Make)

Module CCHashSet.Make

Parameters

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_seq : t ‑> elt sequence
val of_seq : elt sequence ‑> t
val add_seq : t ‑> elt sequence ‑> unit
val pp : ?⁠sep:string ‑> elt printer ‑> t printer

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

\ No newline at end of file diff --git a/dev/containers.data/CCHashSet/index.html b/dev/containers.data/CCHashSet/index.html new file mode 100644 index 00000000..abc75e6a --- /dev/null +++ b/dev/containers.data/CCHashSet/index.html @@ -0,0 +1,2 @@ + +CCHashSet (containers.data.CCHashSet)

Module CCHashSet

Mutable Set

status: unstable

  • Since: 0.13
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type S : sig ... end
module type ELEMENT : sig ... end
module Make : functor (E : ELEMENT) -> S with type elt = E.t
\ No newline at end of file diff --git a/dev/containers.data/CCHashSet/module-type-ELEMENT/index.html b/dev/containers.data/CCHashSet/module-type-ELEMENT/index.html new file mode 100644 index 00000000..ddb7c32b --- /dev/null +++ b/dev/containers.data/CCHashSet/module-type-ELEMENT/index.html @@ -0,0 +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 diff --git a/dev/containers.data/CCHashSet/module-type-S/index.html b/dev/containers.data/CCHashSet/module-type-S/index.html new file mode 100644 index 00000000..1d95066c --- /dev/null +++ b/dev/containers.data/CCHashSet/module-type-S/index.html @@ -0,0 +1,3 @@ + +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_seq : t ‑> elt sequence
val of_seq : elt sequence ‑> t
val add_seq : t ‑> elt sequence ‑> unit
val pp : ?⁠sep:string ‑> elt printer ‑> t printer

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

\ No newline at end of file diff --git a/dev/containers.data/CCHashTrie.odoc b/dev/containers.data/CCHashTrie.odoc new file mode 100644 index 0000000000000000000000000000000000000000..da4618c66e1177ca6210f3b0d280dda9ed32a729 GIT binary patch literal 7391 zcmbVQ4U`nsmG18MZVfXkYWyK^ki21r`GKZq_!C6Xf`P$79h4ul8(5imsEB*=-xHD}FwTwSw9O~`Jtt5H@ot8P}aXYYNl zs=INMJ!j>dp{w4z-*b_<71IJ>qSQq{Q{#}fJ=O60IIJRe4 zwpn&lS;I5#pV`xMmEq>smn~E8{_iz=j_rSY*Rda;_I5sT`?SXt#nc_KSYvA}Hf4D% zHaRvS7Hf?K|4$;G@Ppv7WqRPxByED!xq5)_jr-|YSa#OjW@bftRCsw)$++ z)J=+!yjeEod%A4cnY?8Wiky-0oU*W7k+Tq-YFdxbLB}Z2kmn%Fuqh0&wPJauFmpL8 zW0|%mauqw{S&ofzu2-&Pyb3apSY93pU9YK9!oVQT&I%)wFC4jY=(9GgCGV*A!W^rYSj_P*H}1dDo%V!^UKvy6f6b;?D-B8lz`toWzxEPT6=e2f4Y6u_3K`I;b;)dyv{5SBXHP6W(;{{ z)AadOXW&rT3Vk;&@!^(!tAJ&BxV7KOnz*#2Hjs7~EZ3u_aekDyhSnf0=EUj!{0E)u zu?k%(Co1gaIJ%%ZBKop8Zsja&G6)zOlTMu5Orn0{rn*^ywhJ#}5=AGAsEk4WyD72k zPfRso3S(3;@P$!fMY?3~Fhnpmt7=Hf3;gz!ScB_><8y1{IgH76Q4Rk~B^ArdrQ12C}qi}@@CzG4PulTje-f|c|{9U^UdBc^F1&aDE^4GAtF zf<3Ki$0;a=4Q;uyvmLW52*x_pqp$+MQnBZCbpiM@mz_;`G170*~Z5k*G%xj=e5U71*EQ-P2shA~0yXb)MJ zqPSNr@5H>TI=x1+EKw|Xprd4X=xF3ayC@n%CJ{B0N0(uqR9tFXGShGw&a^WnXvY{f z3Ki3BQVW+=JAooth%eX`ZD$1Ifi1jPk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jsL>7cz$sLw@eSAup5*hZxmi{J*jPyxFZ*y@OB4QL+#TP2xR zRGIz^8XAbHCt~^{wP?0nF&V(F1a^hQEUjX;K*MChEQv476Drrsoe$* z0$(5PrLM_=Ed9jo(11#)XeJ@S`Qhj;90hisD#*k) zfSm(OZQ2;*zlMgDka+(fBz~t39FTa2P8^Up9pK=psu7Ps!zNUpc#F19{QWKc>{X!}G+1=cF$H!&D*wqa>#5{{v2F&Ak8s literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCHashTrie/.jbuilder-keep b/dev/containers.data/CCHashTrie/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCHashTrie/Make/argument-1-K/index.html b/dev/containers.data/CCHashTrie/Make/argument-1-K/index.html new file mode 100644 index 00000000..ab7c51b5 --- /dev/null +++ b/dev/containers.data/CCHashTrie/Make/argument-1-K/index.html @@ -0,0 +1,2 @@ + +1-K (containers.data.CCHashTrie.Make.1-K)

Parameter CCHashTrie.Make.1-K

type t
val equal : t ‑> t ‑> bool
val hash : t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCHashTrie/Make/index.html b/dev/containers.data/CCHashTrie/Make/index.html new file mode 100644 index 00000000..b13bc6e9 --- /dev/null +++ b/dev/containers.data/CCHashTrie/Make/index.html @@ -0,0 +1,9 @@ + +Make (containers.data.CCHashTrie.Make)

Module CCHashTrie.Make

Functors

Parameters

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 ‑> key ‑> 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val add_seq_mut : id:Transient.t ‑> 'a t ‑> (key * 'a) sequence ‑> 'a t
  • Raises Frozen: if the ID is frozen.
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 diff --git a/dev/containers.data/CCHashTrie/Transient/index.html b/dev/containers.data/CCHashTrie/Transient/index.html new file mode 100644 index 00000000..0fc0e08b --- /dev/null +++ b/dev/containers.data/CCHashTrie/Transient/index.html @@ -0,0 +1,7 @@ + +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 diff --git a/dev/containers.data/CCHashTrie/index.html b/dev/containers.data/CCHashTrie/index.html new file mode 100644 index 00000000..fc1d3a9e --- /dev/null +++ b/dev/containers.data/CCHashTrie/index.html @@ -0,0 +1,6 @@ + +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

  • Since: 0.13
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a ktree = unit ‑> [ `Nil | `Node of 'a * 'a ktree list ]
module Transient : sig ... end

Transient Identifiers

module type S : sig ... end

Signature

module type KEY : sig ... end

Type for keys

module Make : functor (K : KEY) -> S with type key = K.t

Functors

\ No newline at end of file diff --git a/dev/containers.data/CCHashTrie/module-type-KEY/index.html b/dev/containers.data/CCHashTrie/module-type-KEY/index.html new file mode 100644 index 00000000..5d53860f --- /dev/null +++ b/dev/containers.data/CCHashTrie/module-type-KEY/index.html @@ -0,0 +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 diff --git a/dev/containers.data/CCHashTrie/module-type-S/index.html b/dev/containers.data/CCHashTrie/module-type-S/index.html new file mode 100644 index 00000000..3326cb26 --- /dev/null +++ b/dev/containers.data/CCHashTrie/module-type-S/index.html @@ -0,0 +1,9 @@ + +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 ‑> key ‑> 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val add_seq_mut : id:Transient.t ‑> 'a t ‑> (key * 'a) sequence ‑> 'a t
  • Raises Frozen: if the ID is frozen.
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 diff --git a/dev/containers.data/CCHet.odoc b/dev/containers.data/CCHet.odoc new file mode 100644 index 0000000000000000000000000000000000000000..051be9f43f5612b437c0caaf3ade29e5fcb599bd GIT binary patch literal 2212 zcmbtUU2IfE7~OlBi4=k$f(im&vfCf9>~4YhLqw-6D1;P=5X3~Sv%6FF!u?t9ouyqA zF$SOTVL+f5qq)@9_CadXn2?x=O(^lf7!nf_H6&u9XoO%N^uY&=GxJShfXpi&b1T@ z9c~XVdPLREwmQWccX)+4Zm^$~xEltFRCXiz;MJX4%*qap=TPSWt7l2_P9~pidz7I2 zljN}i^*uL`{R8Sf9Y#Lon`rEoVv(;8zkT!LM}=Qq68Ke1?N@c7Z*jkneh_mXxZl9OWtDBlvZgEbbEm`Dg2OA@h? z5<=26{ngZdpnE6`$HOoJL5rC{pG42Xu-Lg-g% z#2nros#A#NaZ&D6sE&i&;%?ECyY(uIvqX-hL@v~|;C_j|SE4h;Fq8)`KLTd_FjJ*& zBv3r27ez8Qh#E3G_1dc<=@&zy4}FSut>mCh87H*dF|=GINRB<8-d$8mFKm*}Pi*t6 zEP||Zs&u(Qnf1sJ73(U0Qrbb)%6PO$c{He-gF6pSxidT}PGn;DFjK1J5Y~@vyRo@}?i>=k>@pX7?1Kp!d zJnWROf&^><_;IyAfUTq0dNxt~ag);Vrm)LEp9koCz5flE+7AVbHz zzi2qNT)_XqfeRRwt9YW}ENVAhJHKN|=f0d>K(}jgQF{VP9hnAsvFrK5Mh^?!t_Yk&T&>;jN_b4IQ>H*|Boknc^YLMQ{90FmLR^AHu z?UQ-Lb_%w2AhGov?C)(U(WvaoKVpIHd4MQD$4)>n$Sk&(nwB3-wNwu6)nI$pbZn3O z-`Gk6KL1ybZZetMvnIE8hsiCrE`xw)Onh`OvAqMtpPve@U4-Gz!f?wI?do-NG8d;( zYsVUgt%m_|8Wh={4^uD_PfBiGRas5j0b@6Juv>7 o4y`?Gw5$Q(DgfTpKy1yKPObd~l>U?GvDyK@QAdwp`(;A@0l9o=I{*Lx literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCHet/.jbuilder-keep b/dev/containers.data/CCHet/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCHet/Key/index.html b/dev/containers.data/CCHet/Key/index.html new file mode 100644 index 00000000..bccb4e3b --- /dev/null +++ b/dev/containers.data/CCHet/Key/index.html @@ -0,0 +1,2 @@ + +Key (containers.data.CCHet.Key)

Module CCHet.Key

type 'a t
val create : unit ‑> 'a t
val equal : 'a t ‑> 'a t ‑> bool

Compare two keys that have compatible types.

\ No newline at end of file diff --git a/dev/containers.data/CCHet/Map/index.html b/dev/containers.data/CCHet/Map/index.html new file mode 100644 index 00000000..c9bf358f --- /dev/null +++ b/dev/containers.data/CCHet/Map/index.html @@ -0,0 +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 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_seq : t ‑> pair sequence
val of_seq : pair sequence ‑> t
val add_seq : t ‑> pair sequence ‑> 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 diff --git a/dev/containers.data/CCHet/Tbl/index.html b/dev/containers.data/CCHet/Tbl/index.html new file mode 100644 index 00000000..e76d3701 --- /dev/null +++ b/dev/containers.data/CCHet/Tbl/index.html @@ -0,0 +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 length : t ‑> int
val find : t ‑> 'a Key.t ‑> 'a option
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_seq : t ‑> pair sequence
val of_seq : pair sequence ‑> t
val add_seq : t ‑> pair sequence ‑> 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 diff --git a/dev/containers.data/CCHet/index.html b/dev/containers.data/CCHet/index.html new file mode 100644 index 00000000..776832d2 --- /dev/null +++ b/dev/containers.data/CCHet/index.html @@ -0,0 +1,3 @@ + +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.

  • Since: 0.17
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
module Key : sig ... end
type pair =
| Pair : 'a Key.t * 'a ‑> pair
module Tbl : sig ... end

Imperative table indexed by Key

module Map : sig ... end

Immutable map

\ No newline at end of file diff --git a/dev/containers.data/CCImmutArray.odoc b/dev/containers.data/CCImmutArray.odoc new file mode 100644 index 0000000000000000000000000000000000000000..1eb15f1d32083581b2da4b7101337f9ffc41df33 GIT binary patch literal 2915 zcmb7GZEO@p817wnBQ2&vVuE0RY46%=q3m7xuwX$KYD#JdAGRolm}c&FwzsmkyX?%i z95w_JjFK4LqLlFQV+ATPDqtfahG4*tkeI0PBZ`R%F`AfQEc}r8%lOXh-rd4Kn_PEx z_j%rV=6&9IXKl?cEa_5~D!KiK-ukGnuC5DyGW_PiZ}z!t!L}GSEaFl{!wkRK+1uM+ zDtT*BJSJF)WiUpr?^4PCi9^z&~Ez8njK%mi*dsjF+a0Y7C%U0u2^_}`(Vq#pzq z)~bP@6EotxNsyS9ssTK0IKJ6)iCIRvXBC)XTi8S%CCJth=HjS=wmP7hAcLZUO_^El zM0t-Pmtc(ohM*DR0v%JPG!9^mzc(01TQ)F80Ae|*wI+R!$v_-gV)nJrK?+&9teWAb)K#h*Uue4_QgJjuQXj4IJ@JCg*OJDzIu2j#0dd@Zr+@M zBk8_FTW)36ZyEUR+w(!NXfts~fH*>cc})8Ar^CO`>YTs4{owTOA5R29>()XMgMeqv ze)`b)PvjTYfA~Gy^Y_=Pe{L0Z3t8@MHg2r~sv5G{qFo|cYLsj%J8HW-sDle6RukEw zyl0qNRwFw0OqToj*Ucvntm?ipwr9h<%kN!M*Q$PS@baY8-ORvDzacOD;}(rz(<79R zL`pMQL4!qtJWC_4S?1Xk&%rAbEH-E(wnAG&55cEV!!(gaz(bTLsAOw~ZV*iorLnx9 zAqviz8h=;wi`&16XFOtq&$v(^4!F(~RlN)vo3SeXfxUUKl1}w&hC;rc{W|fv6T_v_rE!C^Lar zA`n&B(i-eQn%5xYaJ*dS4J@Buq2Pukz_^{nt($#^+o)Z%V zr*r)lm}_W5*d6vt#A1P;GPtl-3#~@ExEvGYgu-@KWW8LIbv-pqMA~H_1aEZFvCS)OABiSii+{R;FPPe&c$L))-rXeDoIW} zn4(^uXDSOaJbl zSrQ=wKg}CYFrIV5DHd}wT7tR)zq8un5EkX0c?ug;xV`$`+@lt;;}lTa!efR;L{qdv zA)T0c5u^`J8A}iy#@W;Z= ztwf2yyg#P8logTvcVd~p89kfkdrD47vFvY8m9PWPX7jQEul?q{a9&Q#5hy{J55v6J zesY4rws8z#EQ$(EPRzZRy1YhxG)5h7!;V8N4an=GN!ANwbhEKW8x%uccyi*Mv;n;w zNI236nkLd7Y^!ita^m?4QMx};`DrWXaGATSGL29s?-uhb%onT7OvJq2s@tZNeGZvqfH_w{!Mc>kUyxB;r%_F%Xe{-b2GZ_4nb1}+E?)<=53pA zXED#Us?cbO$)#;%mq8f?)*m&N#LWV;1h-7`C5-K^wMhJsU&sno_zgK$~d7&{9Q)}gLO zv8&PM=meN(6;oG~$w?ZM_IVpD0&)v0-W#o9Zv_c?|3TUx1OL(n>j=Sb2rwLfP&&fS zL2N~8u&~NTrYD8A^2h>;bH|@IeTm6(bB)EVsU*-#&N}W6sW&; zm(3@~<@%-$C|mfpf_#Xb!H;1%v5&L4+x4qj9B3@b=_x;Iz@jWDgOI~2JWNw&JG@{T f_#K=s;$~J@zLRqOGt!Ex%=-c!yneQL05kjtQ(k8@ literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCImmutArray/.jbuilder-keep b/dev/containers.data/CCImmutArray/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCImmutArray/index.html b/dev/containers.data/CCImmutArray/index.html new file mode 100644 index 00000000..e402418a --- /dev/null +++ b/dev/containers.data/CCImmutArray/index.html @@ -0,0 +1,8 @@ + +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 sequence = ('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_seq : 'a t ‑> 'a sequence
val of_seq : 'a sequence ‑> 'a t
val of_gen : 'a gen ‑> 'a t
val to_gen : 'a t ‑> 'a gen

IO

type 'a printer = Format.formatter ‑> 'a ‑> unit
val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/dev/containers.data/CCIntMap.odoc b/dev/containers.data/CCIntMap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..97832cfbef76856db68a406d595edc5c7b523163 GIT binary patch literal 3519 zcmb7HYiu0V72essSKtsVQou!*w}a%NDAJ>jczvnCDj- zG@!pKkBn?~g4<|Yuibgcf46>q&+t2MHcubV?0;oQ5?p*Y;P1+0dJn;M<%O9{ArpNq z8k7yA=){m7h2I4?#BVdhq?UOvYmlbv5%5kX*=}Et^ym;6Rs4Vk9e)FX-@3(gJ$j^2 zt6W#p(XuG&8}2ll%nNIe9b7;7_nW3ipWpT8v!kQ`=#QcsN2qO?PQW~eTBELK(_onT zrs0RR-ADHJo*4h#b`}oT*9gm_lTbVZn zz$pgEgXo`U_P=|{x~soke)!XSUwb@?iaU%J1pz;@Hv3l|KZWnR_4ls^dp`S{9xmMA zdq$NfwHoKN0*ZR7)s}0ss&Cq^Q=N9bNxw}EmfDEwM7?8LjcS86X~zm`m(Gm*vZ{?O zd8T479J$!Dhx9Od_~bkqyfz3UT|XH`;k8s3|Dw5tr_e1$X19agAzFGU4Cm4J(Km#F zSlia`o6b&)1+EjK6~}b2*q4Va>Bn>+fhTl%V!X4z;dUVB!nh)g(Ph$7KCDV$wFLG+ z-ez`)Hc6W**l^waJ_)Ld;yDX*!J%{a9LzD9as!ireoq%*4pEg-VkDlxwbAySd+i@CExZZ5?$|9yu95*0s zkNM0AD!Ov(sNbIncaROC@ufU%fW!k*;samNNO0nDpqR zMW+~nW#aQ(_$(l9leDSn`Af^d?()$zD^q&kcC)V zFH~dgYQV|>UWx6|8)=%G;@4Ok5x2Yyu=ew^LA{0vvqVIJ!ru zkwJ_VvIRye^+;gaP=>MG?Xm^1_C2NViGm693Dnt26xMctvCR6uLdP+AV?rlj&5dQD zr3!qi&~&W^EX{Pmo&d7>W1JUnE+W#k*6z}JfSJLh%LW*G$;_Rw8{wzvz2*Jo!$JuKHht!)bcJ*f0 zid)Hce^DGaz&6rlTe~RREortb3EMWwb|8crJ24DOH~z5YT5P~@EsGg^6cV@1Jj(BU z82J1cz}drPA4Ugr49ICV=pF|l7a>atYdx}xmUcm>@;ez1d?sx#GQUcgW(S0p*vD(d zNz3#D07PE_T(8eT9UaY&nHHStM++ld9PA_b=6eYW|AS=yz%fmT z#Q1+Jyx85`wh|W%nGSJI9-KJWo9La#xx3NR3YzOpxz4Rlx%T@&uO!(ZJfoE{rj*8P zOkwu+fn13hmuhpHx@rew_~ z(Ndm{MW8tMqOjt7I25y-PG<%6_wzlJmHd?`QimIyWii1AX&G{ohlgyzOR! literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCIntMap/.jbuilder-keep b/dev/containers.data/CCIntMap/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCIntMap/index.html b/dev/containers.data/CCIntMap/index.html new file mode 100644 index 00000000..762faec4 --- /dev/null +++ b/dev/containers.data/CCIntMap/index.html @@ -0,0 +1,3 @@ + +CCIntMap (containers.data.CCIntMap)

Module CCIntMap

Map specialized for Int keys

status: stable

  • Since: 0.10
type 'a t
val empty : 'a t
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 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

Whole-collection operations

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
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_seq : 'a t ‑> (int * 'a) sequence ‑> 'a t
val of_seq : (int * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (int * 'a) sequence
val keys : _ t ‑> int sequence
val values : 'a t ‑> 'a sequence
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_klist : 'a t ‑> (int * 'a) klist ‑> 'a t
  • Since: 0.13
val of_klist : (int * 'a) klist ‑> 'a t
  • Since: 0.13
val to_klist : 'a t ‑> (int * 'a) klist
  • Since: 0.13
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 = Format.formatter ‑> 'a ‑> unit
val pp : 'a printer ‑> 'a t printer
  • Since: 0.13

Helpers

\ No newline at end of file diff --git a/dev/containers.data/CCMixmap.odoc b/dev/containers.data/CCMixmap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..fc62723450307bc3abf9721fa6ffd40b4450b60e GIT binary patch literal 4122 zcmb7GZH!b`8J=@Fr*;QJA*5=pg|i>9yRgiDVZj#YT_{jO7U?bp8>O4ObI_WG7be>`Vt2Y37;ms>QM%ProU%jLJ-p38OQ zlK;yMHR2?h8#0r4%dk}o_)#Y;^M^zzd~ZUy!ixgF->O6+FcUMm2($G;XoXR59~Z}J z!gs0yj4SftseCSHL|pw5B8=f~eNQdSiWj3$`rV=1+jneHq(+-hUGd z$#Q_V4Yb|FronHJe|hkJ{2$Czk=j^6ApDSb4HqV$(Z`@cmydc?!TU3LZgNC&>F4su z9?uoGcwj&sP#B2f77ob_>O;4P(iDCpoK%NffRjNDE(C?@i(57o%a%JKxL4vsdw2El zuq-$_hdTkUSV71weZc*^QLjS!5 zGdbPfSNMWSS0>5EZC15{ScUIel^vd6wZg49Pz>U}`cJ;QWN!5G;Rjc~yKn!iXBQ{Q zn!UoG#M4QE$IsAzTs!;z(w=+Pcb&Ta_*>`Ac=q#wU+k4_-rMLAIB)6gEhD$Rfm8L| z-lLv>IH*}g(KH%*$HpV4V)xpjWJQ&*@146}`KJBC+bzh^!@WX8#<`5C&g z8`Ua`q2sye@wny0kjt%NQ3QeK^AbLjstbsa>3?*kw&MXrh$Nzc17Jr%Gk z;v2j?nNbR6Sf$3SbiQW09Js3JOwF-C?=e+<475WXMPOtnWR|)qToCbn5!5`_mR!)$ zvfgC&fL`KGh}#MCKR`9x`EgP4+=)P2EodyoiQ{(k2y~%4lqgEA8M>2h*22*hO1{-z zO?HviO|n1GjvGPoYTb%x6)~AMMI`0elXgNfB{8%BO@K!h0O?wwAtwr*?v{{rj~3uW zM+yEF($*arl9oW0vJ^zOg9`m<*+FSnBTPFKkL+ta_nnC{q(f>j$}V;9@xrl^7r8bj z!o$!?;KE0>N=q35RFvhUEP6N~l$?Q2bt~tOi;2(yyu{K*dmt^7GZcsCtt^$-+m}Zxuj#GVNGh z5DhPnrwq<2ea~rEziqFIs`Asn3l-8Vr)(*?fx7R}4K7y;u|9A^{k)T;y++TbI6qaa zJH|Z^uSc?I{?_fF(Z`^2pqcN&5-&QKOqu+FP8yiY5v%}OOS&x7HzS`&z5h{qXJmF$robO)jP&>ln8A;twMVmiSRO*?jO^-?VUOXY41L{DrP2sFOAsTg zpdE>Fb7yvZY;9H)V_r##w<&XxJ%B&l6Gi!2RPw#5a)0BLXxxTc*tGK*2@=rOvNEzm za-cjptr^@44djibLqEAnwI1Sravq_XkZJxBZCSNnUZmLlcATVXI;W1QAa-jHv5svT zBPG>jrYqwvBih(h4Y;uWrwf3osC^})=Hq=FR6nPPsBzAW742Ufc@RYA(}~`K@y*C@ z6j@z_OFJP^&GIGPKPa*@^wV@nT2)L!Fam*STM~b8o*55x$oF>ay*G6}p1n$MA8P#) zM*2l&?567wzq}+qN!QXfv^xc$U9>ZGd?#J69na9uQoKQRniuq0n;Ewy)A0pU-Z)?f zah{8>(t#nmrZtoSVQV^xXK6p}O+hx${qzyKPlMb~N9jlkV$!h;WIMG@I-;{h_cEiC z8LR0kl{~tS86D7>8SUy$nxO}ovEIbG%`}<8wcl}Otb~d(RkXwmWM4M!A!gjgjL%$Q z#&TvXO<`-y*qPx*%-9YmitbobB9kVZ%n`H?ED zzcO-$k*63rt(pFvk(20y)cgZx%h7qLZ zPwEgxDLCt9f?i9Q@jj}7V9x1YU(U!8Mrw?Bs>@+=7b8cpWW;5pnzr)_MviMdM%oy8 fjFE#G5{mDm6lpE;)Ib_wi&|9c!sP}8sLTDoV;aSX literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCMixmap/.jbuilder-keep b/dev/containers.data/CCMixmap/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCMixmap/Make/argument-1-X/index.html b/dev/containers.data/CCMixmap/Make/argument-1-X/index.html new file mode 100644 index 00000000..7c387271 --- /dev/null +++ b/dev/containers.data/CCMixmap/Make/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCMixmap.Make.1-X)

Parameter CCMixmap.Make.1-X

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCMixmap/Make/index.html b/dev/containers.data/CCMixmap/Make/index.html new file mode 100644 index 00000000..f4dc7647 --- /dev/null +++ b/dev/containers.data/CCMixmap/Make/index.html @@ -0,0 +1,4 @@ + +Make (containers.data.CCMixmap.Make)

Module CCMixmap.Make

Parameters

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 sequence = ('a ‑> unit) ‑> unit
val keys_seq : t ‑> key sequence

All the keys.

val bindings_of : inj:'a injection ‑> t ‑> (key * 'a) sequence

All the bindings that come from the corresponding injection.

type value =
| Value : ('a injection ‑> 'a option) ‑> value
val bindings : t ‑> (key * value) sequence

Iterate on all bindings.

\ No newline at end of file diff --git a/dev/containers.data/CCMixmap/index.html b/dev/containers.data/CCMixmap/index.html new file mode 100644 index 00000000..9b9da8ad --- /dev/null +++ b/dev/containers.data/CCMixmap/index.html @@ -0,0 +1,25 @@ + +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()
+      let inj_list_int = CCMixmap.create_inj()
+
+      let m =
+        M.empty
+        |> M.add ~inj:inj_int 1 1
+        |> M.add ~inj:inj_str 2 "2"
+        |> M.add ~inj:inj_list_int 3 [3;3;3]
+
+          assert (M.get ~inj:inj_int 1 m = Some 1)
+          assert (M.get ~inj:inj_str 1 m = None)
+          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 : functor (X : ORD) -> S with type key = X.t
\ No newline at end of file diff --git a/dev/containers.data/CCMixmap/module-type-ORD/index.html b/dev/containers.data/CCMixmap/module-type-ORD/index.html new file mode 100644 index 00000000..1a27ae60 --- /dev/null +++ b/dev/containers.data/CCMixmap/module-type-ORD/index.html @@ -0,0 +1,2 @@ + +ORD (containers.data.CCMixmap.ORD)

Module type CCMixmap.ORD

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCMixmap/module-type-S/index.html b/dev/containers.data/CCMixmap/module-type-S/index.html new file mode 100644 index 00000000..e188bea9 --- /dev/null +++ b/dev/containers.data/CCMixmap/module-type-S/index.html @@ -0,0 +1,4 @@ + +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 sequence = ('a ‑> unit) ‑> unit
val keys_seq : t ‑> key sequence

All the keys.

val bindings_of : inj:'a injection ‑> t ‑> (key * 'a) sequence

All the bindings that come from the corresponding injection.

type value =
| Value : ('a injection ‑> 'a option) ‑> value
val bindings : t ‑> (key * value) sequence

Iterate on all bindings.

\ No newline at end of file diff --git a/dev/containers.data/CCMixset.odoc b/dev/containers.data/CCMixset.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9d1367cd2ae8fdee26ed9845862ed3f3c2663e73 GIT binary patch literal 1691 zcmb7EO=u)V6ztSyaMDgrV@Sq0|iXa|5coE;LnaoabS+t>;nyOdd``-7y zDjCUevF6pi>RbCCed##PB918>kKuUq$PcB^EEYUfUc@xJQCeMnA>L732i0G{{(JkI z^-EK~9N&0lW9sZ*LxB69cAPV1$GP`U9Q=OAnRCqlf^qN3jk(nfOuoFvHOMwR%Qa8s zCKp_03f5US<0>$L*(+cw0ru-+=vEDuAQm{`16TpUw`o!;<62=Ns{Ws%8W^Q?8jH=l z!=V(gGJ*%-Nly>P|6Y3rX!~`fv4rGmciyN&{mvT=C^m|tt#JuVDV}O5ZB77N4zMN@ z4z=>~=)}JR>z2*RFtC1?z{X@Cau|n}%7J-juIkllf%~vAPpz_~i-Pl1uJ$S&F^DpwWkGp-2+wZx*{c!N}BbBokN_)S*`uzt% ze)ObDL!Uh6pIFR8@M+)gU|qh76Dj;{nQo~b3;BdE{f$-@cOyUIZI*R)wZ8h@g{yn~ z3-;54=MMTioo0}mz2if-G^5d2`Sg6#R)@aoTPKmjI;R|_2R$@ca2(KQ&o*YUh4ys0 z37LqmXB>*SR0J)7g&|i8*btB42ms7(ae>qvVK0iP7 zDWdO|$CgE&7a>eJ)0~iT{Uj|}T6dU+kO^pU$P|xmvnWs|n|FF)#K)$`+#XzEVaJ+z z2pqw7tUDM#Vt_fD5G#mcrDGB5LOYcSFfjnBJ3OV672tg?AjT3q$fLvhoMxaHT92ys z@LJ~8Yf|GfvX2%OYjZCMZU!Ib`MYx{ou=8LE8Jx(gw-H>!rmJa`1}>RLDV5UWh38k zUmhy;CMifVdH8ED74#{PG)`DgVI|Zilh2VJW_PAfQ!Ia|y~&q6cuqsYnNU{3LR+R( zP&ycg6e~ELE}mR2D4kAK#%IM|GlZU@vhti#B2V|SE$3!{-L=KKD@5N#15ua1nng(B zUKvAM<`+S>=zS$ZeAF;vb-R=a{^bfOj}1AU`T8g`rQ5VR&&!^UrLgNZ{T~aMc7yK- zlDM=+-D0TMCpjKj#*X#Za+e^9Pf|@j; y!TS?T_DKm!K6U2tQpnOM#y5h}H?Cz#3+;sW1iRM52UZb^RqN2wpT#EyZ^%EA!&zeh literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCMixset/.jbuilder-keep b/dev/containers.data/CCMixset/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCMixset/index.html b/dev/containers.data/CCMixset/index.html new file mode 100644 index 00000000..36c2301f --- /dev/null +++ b/dev/containers.data/CCMixset/index.html @@ -0,0 +1,17 @@ + +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 =
+        empty
+        |> set ~key:k1 1
+        |> set ~key:k2 2
+        |> set ~key:k3 "3"
+      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 diff --git a/dev/containers.data/CCMixtbl.odoc b/dev/containers.data/CCMixtbl.odoc new file mode 100644 index 0000000000000000000000000000000000000000..760f6f8df60c70c66a773d21054a5f564ac16c2d GIT binary patch literal 3460 zcmb7GU1$_n6y6QH#cWY3MWGLEZ#F;fYOc5Pb9S-3;H2SE~kheQLSP6BU#C^o!EO!~yGs zuiM)2!As^H@7TQ?KW;uS`qRd8Nd;KnpUHIX&t%p;m&rVJe_bZimx-PzOs*@8qU&Q? z6m}Q)QPChXRJR#9Zut$ekNM2wb>=c22=WGN2`$2f+N8%F((wJJ*jcUCVQHXO4DM8& zIqK-#tvV7jDftcR&I{sm(y*LzrSRGb>NIV(6QZ0g0Pz2a{MgJVmOD3VxjxxL63P|B zW7KEx-#Jn$lU=(Ch4ylgWaUyaGTgE3%_FYmSEvxo^Jm$yfZAk=yNsloR_c)VT?oH3 zNsdvAv{-KEO2LQ@jPWuu(q6YpveGnn7#S%)S;9mM;d_=_U&(Q$94jEkTO~@pNQ(QI zZS!I(-z8VziJ`1I+2H{Jf_+Wp=OUU16%^OG?x zjLt4y&JFhXFfGFF$uZKvS>elB5f3f2>jJd{CJ3())2h{&$56pmlZi@UrorSTX;P0m zI9W(^rnrSdxE|uMrpE-VhGCJcgCKZ44`ZjIX-kl|hidX8v5b|$5X|r`?n+GWkGX^z z1`~pNqz2zM7DPa{=rCglbz2H`g&b8_n}J_|2Qsas69{BNF)=ZyOSo&dh|T~bv?N<# zCQ&Q=h9wFM%xe(=d~kUJQ;%Vuzxr+N;D8!qfbmR8T@n{K4-j=DAXA5yK-z+_Wx=o# z)=35u^}y;Lh`gwM6^0jj!76xhIcMeeNJS#d(%jk}mZ$~{*X)7A%nv-EtdszT)F-m~ zQXWd`;3FW8;y_v@SB1;~Em8|ysVo7CE}GH?4Gj1N_S`j?jKHV?7UMGaa5-7&zM*bi+~-}Qos5>?N*<(d)} z$|7OJ2nS<7M`tht>_x8abYn7_N;eDF6r2dZ_@g77w-o<7eKklRQ;kn1sgwfPj7UfM zO)@{;u)sS`AbjksxYIqW-caMBqD5EAQ{11e@xV2qTMmI#4Bj)q4j2h3fQVQvxnht& z3aO@0suxVogu4Z!qoN7l&J3L#=Q}ul*yacfWo;h}*vzf_4P-Yu6*xM;0L(hjgqq@X zQu2H*x1uQDNKx|Hjs1qrsD~T(PT&>T0cJf+#h5d;zMP_IkZWm>D{+wi0gpL+fk|=6 zVR)*}_oUC*UH%u^hwiDTcq~6{?WWPWL*@kswC* zt2v!k6q^PMBf|`;Hpct5;Cq*u>W?VV?7=da7y5M0?HHDr35+h+0kJHIFnX1Vm^C21@=x13_@Z! G`1}tU4DVC` literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCMixtbl/.jbuilder-keep b/dev/containers.data/CCMixtbl/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCMixtbl/index.html b/dev/containers.data/CCMixtbl/index.html new file mode 100644 index 00000000..dec2856d --- /dev/null +++ b/dev/containers.data/CCMixtbl/index.html @@ -0,0 +1,32 @@ + +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 ;;
+
+      OUnit.assert_equal None (CCMixtbl.get ~inj:inj_int tbl "a");;
+
+      CCMixtbl.set inj_int tbl "a" 1;;
+
+      OUnit.assert_equal (Some 1) (CCMixtbl.get ~inj:inj_int tbl "a");;
+
+      let inj_string = CCMixtbl.create_inj () ;;
+
+      CCMixtbl.set inj_string tbl "b" "Hello";
+
+      OUnit.assert_equal (Some "Hello") (CCMixtbl.get inj_string tbl "b");;
+      OUnit.assert_equal None (CCMixtbl.get inj_string tbl "a");;
+      OUnit.assert_equal (Some 1) (CCMixtbl.get inj_int tbl "a");;
+      CCMixtbl.set inj_string tbl "a" "Bye";;
+
+      OUnit.assert_equal None (CCMixtbl.get inj_int tbl "a");;
+      OUnit.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 sequence = ('a ‑> unit) ‑> unit
val keys_seq : 'a t ‑> 'a sequence

All the keys.

val bindings_of : inj:'b injection ‑> 'a t ‑> ('a * 'b) sequence

All the bindings that come from the corresponding injection.

type value =
| Value : ('b injection ‑> 'b option) ‑> value
val bindings : 'a t ‑> ('a * value) sequence

Iterate on all bindings.

\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap.odoc b/dev/containers.data/CCMultiMap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..acdc26bbdd753707020f6ebc2b2671bcf3fdc79e GIT binary patch literal 6681 zcmb7I4RjRM70$eQmqS4Q6pBI63E2(#-6i}AifjS|BLt9NMKMfvCuC%IC+<#y0ZVBQ zA}ZR{6uL5MbJX4heGSIN?WbfYOVHQwQ}qckJ_qGt+x05&4wzi<&f-T-u=G& z^X_~1-gOdAys|1XDl&5I<_C}D<>f{32k_@x_%mRCH14Eb(@tBNY$Rd2=8m!{Q|eoj zu3c}o#76F|d%XJPNTl-2>|={c+n%F>qTp~|UQatO@4{4G-r%)8^YTJ@{{KltiRb%= zs$;%a!nLJPTP#L<`u?R;%v91&yH+M`CTpEc%5-bYtR2sKBikR@(D%^1N0(2%;nxaIk=*iqm23QhFHI}ke%!^hp8*BNR}+inb>DBz0UadbDGSUAt4 z1zrcI$S+!MwR^PiD6Zlz&JWX zNrd<;_KmppY^M&FGP(vE4*)l=unwP0*D{>6GVUDATP1TlehR(V!--qK) zYuXil&uUFIS{Y`sbo(64hb3Ppx48&Uryx5OQf5x*W+m=SE>Qx%UkI#vM6&H;Y@qcL zAAL9_X!)TgC&|M(t`;Ad+h0$33Tg0!$%7^weo<2YmaX7_7E#d3LRotyPrGQ&W8BxQ zG7hvpJVsYb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z_L;8Yvy00y!jfe1?OR(D5aZD3FMd22IB~Op1fnlSwfj zK|4>4VW9N~QURn~AqKHQO#Lwg$m?iGi8!$r0|^5Osl_57?*)=2K;A;hLLrHSC_GF_ zR^_HP(8lqx4ag8*n1apZr|M)PLjjNr6>b{neF6 +1-K (containers.data.CCMultiMap.Make.1-K)

Parameter CCMultiMap.Make.1-K

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/Make/argument-2-V/index.html b/dev/containers.data/CCMultiMap/Make/argument-2-V/index.html new file mode 100644 index 00000000..a4b4688d --- /dev/null +++ b/dev/containers.data/CCMultiMap/Make/argument-2-V/index.html @@ -0,0 +1,2 @@ + +2-V (containers.data.CCMultiMap.Make.2-V)

Parameter CCMultiMap.Make.2-V

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/Make/index.html b/dev/containers.data/CCMultiMap/Make/index.html new file mode 100644 index 00000000..41b99a73 --- /dev/null +++ b/dev/containers.data/CCMultiMap/Make/index.html @@ -0,0 +1,3 @@ + +Make (containers.data.CCMultiMap.Make)

Module CCMultiMap.Make

Parameters

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 ‑> unit) ‑> unit

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_seq : t ‑> (key * value) sequence
val of_seq : ?⁠init:t ‑> (key * value) sequence ‑> t
val keys : t ‑> key sequence
val values : t ‑> value sequence

Some values may occur several times.

\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/MakeBidir/argument-1-L/index.html b/dev/containers.data/CCMultiMap/MakeBidir/argument-1-L/index.html new file mode 100644 index 00000000..41379937 --- /dev/null +++ b/dev/containers.data/CCMultiMap/MakeBidir/argument-1-L/index.html @@ -0,0 +1,2 @@ + +1-L (containers.data.CCMultiMap.MakeBidir.1-L)

Parameter CCMultiMap.MakeBidir.1-L

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/MakeBidir/argument-2-R/index.html b/dev/containers.data/CCMultiMap/MakeBidir/argument-2-R/index.html new file mode 100644 index 00000000..cc041fdf --- /dev/null +++ b/dev/containers.data/CCMultiMap/MakeBidir/argument-2-R/index.html @@ -0,0 +1,2 @@ + +2-R (containers.data.CCMultiMap.MakeBidir.2-R)

Parameter CCMultiMap.MakeBidir.2-R

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/MakeBidir/index.html b/dev/containers.data/CCMultiMap/MakeBidir/index.html new file mode 100644 index 00000000..13c55798 --- /dev/null +++ b/dev/containers.data/CCMultiMap/MakeBidir/index.html @@ -0,0 +1,2 @@ + +MakeBidir (containers.data.CCMultiMap.MakeBidir)

Module CCMultiMap.MakeBidir

Parameters

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 sequence

Find all bindings for this given left-key.

val find_right : t ‑> right ‑> left sequence

Find all bindings for this given right-key.

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) sequence

Iterate on pairs.

val add_pairs : t ‑> (left * right) sequence ‑> t

Add pairs.

val seq_left : t ‑> left sequence
val seq_right : t ‑> right sequence
\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/index.html b/dev/containers.data/CCMultiMap/index.html new file mode 100644 index 00000000..62059049 --- /dev/null +++ b/dev/containers.data/CCMultiMap/index.html @@ -0,0 +1,4 @@ + +CCMultiMap (containers.data.CCMultiMap)

Module CCMultiMap

Multimap

type 'a sequence = ('a ‑> unit) ‑> unit
module type S : sig ... end
module type OrderedType : sig ... end
module Make : functor (K : OrderedType) -> functor (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 : functor (L : OrderedType) -> functor (R : OrderedType) -> BIDIR with type left = L.t and type right = R.t
\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/module-type-BIDIR/index.html b/dev/containers.data/CCMultiMap/module-type-BIDIR/index.html new file mode 100644 index 00000000..7edb3f7c --- /dev/null +++ b/dev/containers.data/CCMultiMap/module-type-BIDIR/index.html @@ -0,0 +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 sequence

Find all bindings for this given left-key.

val find_right : t ‑> right ‑> left sequence

Find all bindings for this given right-key.

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) sequence

Iterate on pairs.

val add_pairs : t ‑> (left * right) sequence ‑> t

Add pairs.

val seq_left : t ‑> left sequence
val seq_right : t ‑> right sequence
\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/module-type-OrderedType/index.html b/dev/containers.data/CCMultiMap/module-type-OrderedType/index.html new file mode 100644 index 00000000..018a1206 --- /dev/null +++ b/dev/containers.data/CCMultiMap/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (containers.data.CCMultiMap.OrderedType)

Module type CCMultiMap.OrderedType

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCMultiMap/module-type-S/index.html b/dev/containers.data/CCMultiMap/module-type-S/index.html new file mode 100644 index 00000000..6f93f886 --- /dev/null +++ b/dev/containers.data/CCMultiMap/module-type-S/index.html @@ -0,0 +1,3 @@ + +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 ‑> unit) ‑> unit

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_seq : t ‑> (key * value) sequence
val of_seq : ?⁠init:t ‑> (key * value) sequence ‑> t
val keys : t ‑> key sequence
val values : t ‑> value sequence

Some values may occur several times.

\ No newline at end of file diff --git a/dev/containers.data/CCMultiSet.odoc b/dev/containers.data/CCMultiSet.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9fb1e8ee18861ee6009ad06c48ab7ac4e532b675 GIT binary patch literal 4513 zcmbtXZE#dq8P1+_-hl)aunL0|y-PO92Ey(pfPe&gle8#uEjlyvjmWfh><hXWYD-o7bFbNoDpNIR1Q9RaF{)0Dq?8&(xuG&UJjla?FyK${W7X zKc}N(b-CzU>r7wIQ0;uvxj^|zSA8cF}Ttv*Z}X6>iBk{C2~$a$b<>J^9!t&a8W8>z$vw zy#Bry4^0ZgId_|-ZP>fb#O}lFtxJdAn9?+BL2}=<9T$&=VJ!|K$RzvcU7PWjcZFsW5tJiJh%rQwycV^30F`v$x z1q0KRInq0Fpz!Ixr?zywR1-Va{#=_Lg!_gES$)zozg9M#oEe0=J{*QY+`thAr}R@g z76*dhV500;zK$gZ*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rb;0d6YB&8o{8fZ#UjstxoqWlEt z+k!GdP=V@g}f25^)XKLWy`6$Wb8u3ULG2qA2Wp zz*+?wVliN9>%;&E9tV3R9%41XRw@F-CIefe7`FlYiU4fjv@T+y!h8Ca+6u{n$z% zCXjrDTm$TT734Z#`w%JCJH+k>k_BQ!$c?}bSC9s<5RvlyjiF#CkcT4V7GO_f=LQ+j z0fI_ur9;dEToC;4n6@3jhOxdL$UTy?3&`8ICCoGHvyVCxiPYX+o~Q&UF7_401G%HUSYfk k(7_p+Vh{pk7LeP8tLYJpOaj2iHIQk_6`2CCmLI+U1=uQqC;$Ke literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCMultiSet/.jbuilder-keep b/dev/containers.data/CCMultiSet/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCMultiSet/Make/index.html b/dev/containers.data/CCMultiSet/Make/index.html new file mode 100644 index 00000000..ab31ad40 --- /dev/null +++ b/dev/containers.data/CCMultiSet/Make/index.html @@ -0,0 +1,8 @@ + +Make (containers.data.CCMultiSet.Make)

Module CCMultiSet.Make

Parameters

O : Set.OrderedType

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_seq : t ‑> elt sequence
val of_seq : elt sequence ‑> 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_seq_mult : t ‑> (elt * int) sequence
  • Since: 0.19
val of_seq_mult : (elt * int) sequence ‑> t
  • Since: 0.19
\ No newline at end of file diff --git a/dev/containers.data/CCMultiSet/index.html b/dev/containers.data/CCMultiSet/index.html new file mode 100644 index 00000000..88cb381c --- /dev/null +++ b/dev/containers.data/CCMultiSet/index.html @@ -0,0 +1,2 @@ + +CCMultiSet (containers.data.CCMultiSet)

Module CCMultiSet

Multiset

type 'a sequence = ('a ‑> unit) ‑> unit
module type S : sig ... end
module Make : functor (O : Set.OrderedType) -> S with type elt = O.t
\ No newline at end of file diff --git a/dev/containers.data/CCMultiSet/module-type-S/index.html b/dev/containers.data/CCMultiSet/module-type-S/index.html new file mode 100644 index 00000000..b15236b5 --- /dev/null +++ b/dev/containers.data/CCMultiSet/module-type-S/index.html @@ -0,0 +1,8 @@ + +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_seq : t ‑> elt sequence
val of_seq : elt sequence ‑> 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_seq_mult : t ‑> (elt * int) sequence
  • Since: 0.19
val of_seq_mult : (elt * int) sequence ‑> t
  • Since: 0.19
\ No newline at end of file diff --git a/dev/containers.data/CCPersistentArray.odoc b/dev/containers.data/CCPersistentArray.odoc new file mode 100644 index 0000000000000000000000000000000000000000..0a2619f98d2b4fd25c3811590736846de274eedb GIT binary patch literal 4501 zcmdT{TWlOx8D6hvMZGN*L6urXr5xKEd!6jgu9ILAik;oK+QUU-v$p8VX|`CtC{d#}Cu%5|k_M>Utznz`Kj z_vCUnzj{+HSIWiznLaHa#qs54BaUV_Z8K@yZ^U>!_Su%_^jXjo%;m1|SbM_GJX6Q)z!XL|ETWzQ5@;gC!ej5Imd1^ z;;)wK`fRG_ z9Ok~+@uT|S`LnlPKK`xK_k8#dC+>gw(VL-12}Jdsw;zA3)H-+U+VqiQ$A9tj7vgv~ z61IYaD*`7U*Z%UmNB{JJ%7^xsA9?$M-<*%*T_-y|4hKGCE%|r6aHa6zk?;R1cub=GJW;sjc49&Hlp~Emo8|B#sic$nm>Ue1p`+w$H-QP6UO{T<0Z(9^M?Ev zpS$#|c3-K_PYWDfFVlkAYz;`znI}*?+h_beT1c}c?B$@x>rWeu3y8=xj~Db9o(ryaIdESt83qAzS; zMnf2wpJ%Qox{waUjLsGvygL)ZiZ!S((_m{1cKTt!+m^tC0NbLE+K4XW$nY|Q6}Hte zp?s<^4&?Tou4xQR2(H1n=Y-2W=GdwEqVgW*JX81x9m>=Rsn>yr9!uZyK)KKRD2Uk? zdLw?OzGSa(%j}-w-f~FEiK9t)9k1`Q*~eKuj!Mk&usvY21$KPk>wUfkS(NUS$~a1M zpI%&|gbD^#p>$0~&6#02Jb>?2*8%349roM8tB|P5B$S!`u+Mz+0i@qAIyRCIW7`>G zHMSQ>(Ho8LG@gp0jY(+464=4+g7$fBQQ}BK=;0F8QbLFpfRF({=l(qiB}FL$N@g4_ zr0{^NUBUy!>j@tnKyZrJCk+NM`1gODRIQ1O%JgcjB(vGHzB;)qWLBr~i#|lWV{DjI zN=TA3)q@~jv4+f0`s&O`nOs2@kNJ($b#Ou*c0!rmwiDW2e}ei6=j=F|qpreB-|Pa* zXl;+%%Yt4?$f7*)`ranNR8NS3vnrdF29p3E#D*v9uTZdroWjW1q_1L}!7s(gR^sRY z<^^aY8{xkYT!~-;m!RNAu=p>;`NK?{uOnX7FxqSKv5NV`lu8oO_1NxDOP-a%Cb^Sz zi4nXxT4fE>R@8nkb)gNlw;D=guhene0X5(hEf`9Da0nFe0ve~s~ zQ=&3O$X($IpvVq}w*H>lDvabZA$)nV&)p~{a*!cL<86uK!pLo#2XfG|3#5sDEG>0PHq~}1wG+Y>_j|m<|&J_H{rl5#HlvNdnu`)d{ zX=|`Dbu!M)%pf;1$w}HMlYq)*9-EtaJd(-dPfI2)Gm2`lAVYDqmvN+&$~X)HeLx)C zxKU2u4X#QN)7J62q>`8;Wfs-qm?2K)Q6&K?V%%)<6zUtL5HkSb0HB2tYDP{=?G}ZE z{KzhffS|Bmrq%yc2-4?^sutw*TpGtWhH>ETNz9f1$c*7wU5sTTh_vUDKA_cc z{-|B#g^&4RySlxJ{GGAX$fQOIjr>$b`}1YeeoB%`935(5!?0nvlDcdUNGi1knwZJ@ zpQ5gipNG135>fshsau-7S3XxkyipDub)6#k?M^q;Lw9HRGPyry850u2yHFwDP1SGg zlJUx|GV!;vV`NOE8=~ZeO%ou5{x()1G_<1KnHnkN&u$tRy=@w9;}c2V3}%uwMKCr# z)K8>EB6L+sI@t${(RADz$kVBfjS|Uc%*;*0^`V($%`BLiADT%g%e%>h>P26>bd4rg zhAyb-10~x=`Fh6u{d-{26Dva(s+m2xQ77^xOpm~y^tX#wp}nukLEugZ(BMS#fV!;LuF1FR?Co%nug(8pF`^b2M6-O&*s zxp#&iRZ+qNguIa_6a_vtJoFeYbT(RSM^;{newRcyrW}{%pmZRinbB`gp~SF-V>60S zM(0vz;m3>G-O69$q|vKWNP!Zbm%`euscd2NXh!hYBuLK0Te$!l|EN*NNX{;d_A+O# zktf@nDU1%%1KM3melvL!OP@-^*LF<1p8OU^EDvu +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

  • Since: 0.10
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

iter f t applies function f to all elements of the persistent array, +in order from element 0 to element length t - 1.

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 sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
val to_seq : 'a t ‑> 'a sequence
val of_seq : 'a sequence ‑> '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 = Format.formatter ‑> 'a ‑> unit
val pp : 'a printer ‑> 'a t printer
  • Since: 0.13
\ No newline at end of file diff --git a/dev/containers.data/CCPersistentHashtbl.odoc b/dev/containers.data/CCPersistentHashtbl.odoc new file mode 100644 index 0000000000000000000000000000000000000000..d2a0029f9f1f5b92dad69af7cb9c8e87aeec3cd9 GIT binary patch literal 6204 zcmbVQeRLgVola)nCpF=#iH!Y-8ZIPxHQ1_I{y>pWxbMIX4 z%uR@T%38a&YIP@K3kV(tXt2ABQd$wKN9YP#kLw4t%Py>}!Xn2#yDHssK>Rqm&-=bJ z_g;_wWzR`7@4Ua~`F;Q1cj6cQ!txb^7Y`2a+gcQ<0p2AcVG0(7Vk;Twe)yf+oHa< zwsU^h*7o{mU)R=_X^a0-Mqxy8{P1W#jyf-H8emP)g5{w-;W?IHu|mIU`6cVBb#~dy z1!`061^HM4pC9$geh^xAU^%6dTX5-uT!d4ORdXimo?WvNm#lEE>I_&D_0XDi!zs(Q zstvEZ+)C)wN_N4q`fARsTPeDgNvkkrS0){j`PQTpS`&6*+Hz?Ux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=;XzYsrhun&zV@(J|Y z!1rMMP%HW_3@-jfVZPhIoB*Dam}4pCY2e2&zO6CO!gvhEH&aud2WW>}!g#bn@jt+? zB*h~s#Y?~|FutKF=;_yB97!o&1AecUFusyf813jdQ&K#XP#7KPI33296@}3S<3Sku z9>r07t003%&`)eJ~ahwMI8Oa$FK~PXp7Bj+GK~H!(2o z(zqcQ`(W_01LL!l{#2}zV5~&Pr7-p+ +1-H (containers.data.CCPersistentHashtbl.Make.1-H)

Parameter CCPersistentHashtbl.Make.1-H

type t
val equal : t ‑> t ‑> bool
val hash : t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCPersistentHashtbl/Make/index.html b/dev/containers.data/CCPersistentHashtbl/Make/index.html new file mode 100644 index 00000000..04339b3b --- /dev/null +++ b/dev/containers.data/CCPersistentHashtbl/Make/index.html @@ -0,0 +1,10 @@ + +Make (containers.data.CCPersistentHashtbl.Make)

Module CCPersistentHashtbl.Make

Parameters

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 !.

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_seq : (key * 'a) sequence ‑> 'a t

Add (replace) bindings from the sequence to the table.

val of_list : (key * 'a) list ‑> 'a t
val add_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val add_list : 'a t ‑> (key * 'a) list ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence

Sequence of the bindings of the table.

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

Misc

val equal : 'a equal ‑> 'a t equal
val pp : ?⁠sep:string ‑> ?⁠arrow:string ‑> key printer ‑> 'a printer ‑> 'a t printer
val stats : _ t ‑> Hashtbl.statistics

Statistics on the internal table.

  • Since: 0.14
\ No newline at end of file diff --git a/dev/containers.data/CCPersistentHashtbl/index.html b/dev/containers.data/CCPersistentHashtbl/index.html new file mode 100644 index 00000000..7e53ad85 --- /dev/null +++ b/dev/containers.data/CCPersistentHashtbl/index.html @@ -0,0 +1,5 @@ + +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 sequence = ('a ‑> unit) ‑> unit
type 'a printer = 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 : functor (H : HashedType) -> S with type key = H.t
\ No newline at end of file diff --git a/dev/containers.data/CCPersistentHashtbl/module-type-HashedType/index.html b/dev/containers.data/CCPersistentHashtbl/module-type-HashedType/index.html new file mode 100644 index 00000000..3af4a03a --- /dev/null +++ b/dev/containers.data/CCPersistentHashtbl/module-type-HashedType/index.html @@ -0,0 +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 diff --git a/dev/containers.data/CCPersistentHashtbl/module-type-S/index.html b/dev/containers.data/CCPersistentHashtbl/module-type-S/index.html new file mode 100644 index 00000000..5f05a082 --- /dev/null +++ b/dev/containers.data/CCPersistentHashtbl/module-type-S/index.html @@ -0,0 +1,10 @@ + +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 !.

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_seq : (key * 'a) sequence ‑> 'a t

Add (replace) bindings from the sequence to the table.

val of_list : (key * 'a) list ‑> 'a t
val add_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val add_list : 'a t ‑> (key * 'a) list ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence

Sequence of the bindings of the table.

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

Misc

val equal : 'a equal ‑> 'a t equal
val pp : ?⁠sep:string ‑> ?⁠arrow:string ‑> key printer ‑> 'a printer ‑> 'a t printer
val stats : _ t ‑> Hashtbl.statistics

Statistics on the internal table.

  • Since: 0.14
\ No newline at end of file diff --git a/dev/containers.data/CCRAL.odoc b/dev/containers.data/CCRAL.odoc new file mode 100644 index 0000000000000000000000000000000000000000..7cd86e76c6b5728590415e68279d67e0ee03691e GIT binary patch literal 5936 zcmbtY4~!gD8Na=Iv&R(zgdi#czPsDK-Mv4%*Onq}xpvztht)#iuH{cuj=A00+v&~D zY-eV#Jy40n1Y$~@rGH2P!&oR*Fi>j>0tu-Sicyg$jS0$MMWcZLiIC7h(BJpo%+4Gf zh}iV*-kbM*zwiI|z8R}*m4+7Qm*j`PyZfHU+S=Os@uT49Gx$06V4-B0uBw}w?c~d< ztNt)OIy$~)Lvi@2n|EDvboIGAPjU}$dGz4;^^*IHV{L6GbhWjeaSZ^nC$zPt+Wb$B z!P-6Fe`rn7_m+;UX4$F@ttpi>$Ke}v$90N64!WM+RMj1h|EkG1j;b|->$SR})ikK- z>Xyl^3g0-RI_iv`ad=&=Yxbg^OB=Rk%<-{?St1(M;1Zw5@q6-oz01p51=a$d8xT5V z=rbB8!xuTO-6**L;@fn$$~R^g=Qy0>6yP3%TaY8+a-JaW;_fv-6?_VZZPH@7~ODIaQvMz zv|`cUnHtV7URq>l`F`KpMx~d+oVf|90x&+2>|&dE?q=_xXN$bE&FAfvb%5&gTw4u3UG~!+&(Y z{r2yR-oYh~T`G`Y3nHKLP^YU1Q5Z>wr?q?M;MU0rx)o5U&P^VXu;hS z!M)Z~Efd(tm~JDOp+_iyffEL~Wf%P)4X-z6RYNaNs`hk)+JWya(<7=6hu}^j4hm2p zm4wpc8YHNze_X3svzqkyJfZM^?f(}0^Olv5iItSzlNP}h3JeDdP#=-OTR@kX14J+> zl23=wd-|+8H9CJMJ@M)6C2@uhA&gy@6XGVd?IJOjY&IRWqVZX@`JjjT2Rv})i(tdA z|J}R)7V=v1mBb>cfRu0c8JaomR>|Jgmo#cqC>B`MN;f`gQCHutqxSq}2Hn);Ci43N zDlN2NbHw~GQ&3w7XQD7tf@|<9%wqu9;|Qt!#ZS#?sy)HpJH66=SRQRdfT_wa2~?^W)s_5L9*QE-etDev8xeC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GNuhlp3(UNRbGt&Dej@yYN@p%T9c7f(oSR!ePui#)+UrSmd>?-8Z*E>BS|ZSF!A z>{B}LWyk$BXz}blk*}SH*m3p_dsS{8WPfIVVo%ArOt$JlPRi`^(Uzhrf0 zF*z@F9%U13oGpuA8$IhcLcD1FoyRhDTYS8P5;x3i{&zK%&Y$Hf;)5pUK$wEOByX|; xanq-d&R2WzdZ8$L4|z?z3fFPErw`wDF<(i`_bZ+6vP>9L)+y}olrIqg`41Xj1cU$p literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCRAL/.jbuilder-keep b/dev/containers.data/CCRAL/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCRAL/Infix/index.html b/dev/containers.data/CCRAL/Infix/index.html new file mode 100644 index 00000000..2889728b --- /dev/null +++ b/dev/containers.data/CCRAL/Infix/index.html @@ -0,0 +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 diff --git a/dev/containers.data/CCRAL/index.html b/dev/containers.data/CCRAL/index.html new file mode 100644 index 00000000..6cd09614 --- /dev/null +++ b/dev/containers.data/CCRAL/index.html @@ -0,0 +1,6 @@ + +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

  • Since: 0.13
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 v.

  • 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 sequence = ('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_seq : 'a t ‑> 'a sequence ‑> 'a t
val of_seq : 'a sequence ‑> 'a t
val to_seq : 'a t ‑> 'a sequence
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 = Format.formatter ‑> 'a ‑> unit
val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/dev/containers.data/CCRingBuffer.odoc b/dev/containers.data/CCRingBuffer.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8984a317bab7e94084c756991f841a194f902b46 GIT binary patch literal 13025 zcmcIq33yw@wf4Q5U(%HfgaT!UYhovM;w=l1kOX8x0%3=QB|sBoTaHC!$!N*KQo69i z136(U6e>bOQlKS)u(gE-C`()R(z2AT4|uQal(z7o1m1sU=1PW-(pTEY_XX?TbLKxY z=bSmq%+2-YdfLXdk8kfh{o-rys;jFT$A93zt@&^BwH-aVY%!V6rt*dM-efU(b?fx$ zho`d(_Ad4HrSgf+*xMhybjg*suQ>9<1CO2hY{!EJWc)Yl>NcHHS2yNIb#=|zXkA@n zUFDyKQf|3YxveWvDepc#o$o1Sl6l{V^_%xeomfh>Bq}6&6OJgP`brtUFPHac9n$La zPqN@A{q9^T+nefbE2K|K`N>Q%mCq)N=|w5OnDZ-Z%2ziXR!Wsp34z$fU)-O{#=4Wm zo_;?!n97qemnBF(E4u|%Vw6=Cgpc){rQD-wkPF}YoCy)EFam~J~^QpDwU?amljin za_8EoUs!kc=)tyk&pvUBpG=dGUm`!ei5mQ1nUa*=5v?6I-+&QiOtL2Iq8`diSpXXg?vwk*tBD~ zN!uyF>*(mu4Wv2>>499fV{tCOurQeHNe%Obj``iCbf&kXH`SLcWs05e`sIy3+V$iM zpGdC#ODXc=2VIGBMYq^ zDCUzrMZdUoFr^Ke6!t(lEPRNhHccm1P@Nso2O=rYM6uWpFB!5_9OW ziNprVpcG--szEbN6DAFu>+_RY8kf+t7A;C6R7YIA_6FsT>dB{)#gt%sQx8fm2SCq?n_3`PtGyc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V5TB4BJpgylNaP=GrY(ItEga66#NP=O!26A{@M;7&&LOsH>K+-Xp!LfKjq z?%s&<2-e2sIc?gE4>m0QV?FIk4L@9t)L(IzC`L9?=%TJu<*u zfarQY2Dl5MSXj>q*as1v9N?A^y@ySK#a*hK1N}{q_>p@Wq7Sh@ATy(g`&~p2w2Wuz zu3=h$cs`;>1c*b3zQ8tuvL)lk->rUkGi7gc$W-DNstb5#v_OA;tJ^F28Z$`eM-ThL zCVs;P34B_ps(xV;zggy^^cOaWm2{F)2g`>vK|drtCP(rUEBVxBT$gH+wre z&C`wY=f1XKK`I^8{_vRT#|&M=w4guKQKOapu>-%kG}#)#jI_y$YrMEq0P zM|SbMqJA@jFd6Z+h}&4rUap>3PGtMO9k&nacjDva8gf6xFGl<#OF9VkJijLKWcl9` zJ+s-U-^Jh_h4>=GOP2RI)Q{C}ppHjI&Xyc$|u~sgJ^Ifak-rpSdzQZwGH%&f0?( z^)$R)&77E@U3e^E_4_}-GtR4CWx6*UuOa#gq8ly8+frd6`k|iWdx*Y|=wB`A11YkY z#x;p$Ap_T2h6JaMl?G`q3k{AEmybRl5IuN()P#+9o56b*(c8&=o8jI9(HjuGKH%O4 zUa7{t6TD9mT}W!7 zQ<;hwE8NLuKSAn_Nr+bC`V4sdlrK8LU@{f)|(5?=LRpRRiS1Xqn5R(o${9=InDq{EZF~EHd;TI6D`tjR{RXgNABlaZA zN{jme%S(iR6-?k`#O4a_28-*45POA>7T1j+{Bwlwvg~d>VnK(@6diky#iqe^S<2ps za5Z6XhnRH8;gtby1L7_p1KcK-od~Z8aK|8ameqsXf%pi7FS5835MGY(GGWwtjWKgO lgwN-r +Byte (containers.data.CCRingBuffer.Array.Byte)

Module CCRingBuffer.Array.Byte

Efficient array version for the char type

type elt = char

The element type

type t = Bytes.t

The type of an array instance

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 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 new file mode 100644 index 00000000..690a5bc5 --- /dev/null +++ b/dev/containers.data/CCRingBuffer/Array/Make/argument-1-Elt/index.html @@ -0,0 +1,2 @@ + +1-Elt (containers.data.CCRingBuffer.Array.Make.1-Elt)

Parameter CCRingBuffer.Array.Make.1-Elt

type t
val dummy : t
\ No newline at end of file diff --git a/dev/containers.data/CCRingBuffer/Array/Make/index.html b/dev/containers.data/CCRingBuffer/Array/Make/index.html new file mode 100644 index 00000000..996bdf1e --- /dev/null +++ b/dev/containers.data/CCRingBuffer/Array/Make/index.html @@ -0,0 +1,5 @@ + +Make (containers.data.CCRingBuffer.Array.Make)

Module CCRingBuffer.Array.Make

Makes an array given an arbitrary element type

Parameters

Elt : sig ... end

Signature

type elt = Elt.t

The element type

type t = Elt.t array

The type of an array instance

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 diff --git a/dev/containers.data/CCRingBuffer/Array/index.html b/dev/containers.data/CCRingBuffer/Array/index.html new file mode 100644 index 00000000..37060726 --- /dev/null +++ b/dev/containers.data/CCRingBuffer/Array/index.html @@ -0,0 +1,2 @@ + +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 = Bytes.t

Efficient array version for the char type

module Make : functor (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 diff --git a/dev/containers.data/CCRingBuffer/Array/module-type-S/index.html b/dev/containers.data/CCRingBuffer/Array/module-type-S/index.html new file mode 100644 index 00000000..77509e4e --- /dev/null +++ b/dev/containers.data/CCRingBuffer/Array/module-type-S/index.html @@ -0,0 +1,5 @@ + +S (containers.data.CCRingBuffer.Array.S)

Module type CCRingBuffer.Array.S

type elt

The element type

type t

The type of an array instance

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 diff --git a/dev/containers.data/CCRingBuffer/Byte/index.html b/dev/containers.data/CCRingBuffer/Byte/index.html new file mode 100644 index 00000000..18d37024 --- /dev/null +++ b/dev/containers.data/CCRingBuffer/Byte/index.html @@ -0,0 +1,15 @@ + +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. Doesn't actually destroy the content.

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 diff --git a/dev/containers.data/CCRingBuffer/Make/Array/index.html b/dev/containers.data/CCRingBuffer/Make/Array/index.html new file mode 100644 index 00000000..eed8626a --- /dev/null +++ b/dev/containers.data/CCRingBuffer/Make/Array/index.html @@ -0,0 +1,5 @@ + +Array (containers.data.CCRingBuffer.Make.Array)

Module CCRingBuffer.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 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 diff --git a/dev/containers.data/CCRingBuffer/Make/argument-1-X/index.html b/dev/containers.data/CCRingBuffer/Make/argument-1-X/index.html new file mode 100644 index 00000000..77d276ab --- /dev/null +++ b/dev/containers.data/CCRingBuffer/Make/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCRingBuffer.Make.1-X)

Parameter CCRingBuffer.Make.1-X

type t
val dummy : t
\ No newline at end of file diff --git a/dev/containers.data/CCRingBuffer/Make/index.html b/dev/containers.data/CCRingBuffer/Make/index.html new file mode 100644 index 00000000..a2bc7ba1 --- /dev/null +++ b/dev/containers.data/CCRingBuffer/Make/index.html @@ -0,0 +1,15 @@ + +Make (containers.data.CCRingBuffer.Make)

Module CCRingBuffer.Make

Buffer using regular arrays

Parameters

X : sig ... end

Signature

module Array : Array.S with type elt = X.t and 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. Doesn't actually destroy the content.

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 diff --git a/dev/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html b/dev/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html new file mode 100644 index 00000000..45eea5e2 --- /dev/null +++ b/dev/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html @@ -0,0 +1,5 @@ + +1-A (containers.data.CCRingBuffer.MakeFromArray.1-A)

Parameter CCRingBuffer.MakeFromArray.1-A

type elt

The element type

type t

The type of an array instance

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 diff --git a/dev/containers.data/CCRingBuffer/MakeFromArray/index.html b/dev/containers.data/CCRingBuffer/MakeFromArray/index.html new file mode 100644 index 00000000..a2889dad --- /dev/null +++ b/dev/containers.data/CCRingBuffer/MakeFromArray/index.html @@ -0,0 +1,15 @@ + +MakeFromArray (containers.data.CCRingBuffer.MakeFromArray)

Module CCRingBuffer.MakeFromArray

Makes a ring buffer module with the given array type

Parameters

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. Doesn't actually destroy the content.

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 diff --git a/dev/containers.data/CCRingBuffer/index.html b/dev/containers.data/CCRingBuffer/index.html new file mode 100644 index 00000000..d71993b0 --- /dev/null +++ b/dev/containers.data/CCRingBuffer/index.html @@ -0,0 +1,3 @@ + +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

Ring Buffer

module Byte : S with module Array = Array.Byte

An efficient byte based ring buffer

module MakeFromArray : functor (A : Array.S) -> S with module Array = A

Makes a ring buffer module with the given array type

module Make : functor (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 diff --git a/dev/containers.data/CCRingBuffer/module-type-S/Array/index.html b/dev/containers.data/CCRingBuffer/module-type-S/Array/index.html new file mode 100644 index 00000000..e20d55b7 --- /dev/null +++ b/dev/containers.data/CCRingBuffer/module-type-S/Array/index.html @@ -0,0 +1,5 @@ + +Array (containers.data.CCRingBuffer.S.Array)

Module CCRingBuffer.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 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 diff --git a/dev/containers.data/CCRingBuffer/module-type-S/index.html b/dev/containers.data/CCRingBuffer/module-type-S/index.html new file mode 100644 index 00000000..24e20ac0 --- /dev/null +++ b/dev/containers.data/CCRingBuffer/module-type-S/index.html @@ -0,0 +1,16 @@ + +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. Doesn't actually destroy the content.

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 diff --git a/dev/containers.data/CCSimple_queue.odoc b/dev/containers.data/CCSimple_queue.odoc new file mode 100644 index 0000000000000000000000000000000000000000..4a465e7f6cb193d40baa849def76ee2a6b3eb5a8 GIT binary patch literal 3157 zcmbVOTWl0n7~Y*d$503;A&3gdl-=$H%kFZKa4BZm;?{ZrN&)e~l`ub)i zmsd&4>LMu;DfwFR)g7}gJ-Oh_wb3{G*WTRBVMYx4e5l6f8*v$ab;EqVkk7skFeF&E zeY94xt=XxfmNpe#lU0#bHpFOF$?7pllF%^Q4%Zd4SyHf)@9my7=i>Y|sk5uk52jK# zW41lJUe2kCW|9IVr}RQjHtS?VNgGzO^W$x!jy8YNzF^W%OP7DSa|Gb<04w>}xaM7< zRCm*0q@k(#>r4H%J!LT|bU>weg4+f~cbZ88veNo_P9 z=|7FvHyr=g+;r=LWF4Mo6w(PQUt*|wao|;vNVMrWk}#BQieXwPIV2CjtEFyRvX2B8Dk>cNkx;#^ z891hg? zOsPs=N-`*FZFX8Y?rW*KX)hsr-yaF5EWh5e_UyVIR7?4JVz3@u@Q6H9P5E6PC6 zf~N-eVqsEMqn1_HLgX)9UF=e+sER(dVSbE~jMb_NjFG83lcYdWX{ND%gM;n1&I-N` zfAVfoJQ$Vkit`r3fxGvA6^;$9@R3u2A%Dg;Y9m{=1Q*u$EnN?ViZ0kT>F9_VkJWeV_YSA zg78jsz%Pfgx|#u+d$=3GiO>#nWXYDoG?oc_PVcXf0wV-DC(CbNEc83(5gOb&SooY* z35<%EdJB7>V&M|EmGGh)))S&n*pA@`f>Ak>al>yo;VKJY8|P(4&s6C2T|J8HfTM zH*vEQTT`ww(i3}uQm5Z6IMBl)L6q-t;F)rCr6>A2(}#zD-~h+jbGAX_%W3mGY5&qg z;8|y!tWp8QZ!iAUc(e}YZgS%y=i>&W36t}Ap!Rd0)fF^I9*oe7Q5Xj<(ho2kxJo}n SV1+8&!stQ%WIg)>aQ*{z^V%N( literal 0 HcmV?d00001 diff --git a/dev/containers.data/CCSimple_queue/.jbuilder-keep b/dev/containers.data/CCSimple_queue/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.data/CCSimple_queue/Infix/index.html b/dev/containers.data/CCSimple_queue/Infix/index.html new file mode 100644 index 00000000..83ae918b --- /dev/null +++ b/dev/containers.data/CCSimple_queue/Infix/index.html @@ -0,0 +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 map.

Alias to append.

val (<::) : 'a t ‑> 'a ‑> 'a t

Alias to append.

Alias to snoc.

\ No newline at end of file diff --git a/dev/containers.data/CCSimple_queue/index.html b/dev/containers.data/CCSimple_queue/index.html new file mode 100644 index 00000000..521b50ab --- /dev/null +++ b/dev/containers.data/CCSimple_queue/index.html @@ -0,0 +1,4 @@ + +CCSimple_queue (containers.data.CCSimple_queue)

Module CCSimple_queue

Functional queues (fifo)

Simple implementation of functional queues

  • Since: 1.3
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
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 map.

Alias to append.

val (<::) : 'a t ‑> 'a ‑> 'a t

Alias to append.

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_seq : 'a t ‑> 'a sequence
val add_seq : 'a t ‑> 'a sequence ‑> 'a t
val of_seq : 'a sequence ‑> 'a t
val to_klist : 'a t ‑> 'a klist
val add_klist : 'a t ‑> 'a klist ‑> 'a t
val of_klist : 'a klist ‑> 'a t
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 diff --git a/dev/containers.data/CCTrie.odoc b/dev/containers.data/CCTrie.odoc new file mode 100644 index 0000000000000000000000000000000000000000..35c38959e1a026290ff156625398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!zpB+Q3wyADb@QI^idCuM|eEhf4)Ca! z(*$QToQH*+O$D;~2+!wa4{14PB0LYygVLUJseyoVpEmgdgwLiaoV(@nC2;P5bGu&7 zAxv%3?WD#Um292WI@vBocsWmQ&MNx3S&VLyAj{!g3rDxSp_K@)REG?qwFtMuxtb7L z3L4*q@Le1zrwt +1-W (containers.data.CCTrie.Make.1-W)

Parameter CCTrie.Make.1-W

type t
type char_
val compare : char_ ‑> char_ ‑> int
val to_seq : t ‑> char_ sequence
val of_list : char_ list ‑> t
\ No newline at end of file diff --git a/dev/containers.data/CCTrie/Make/index.html b/dev/containers.data/CCTrie/Make/index.html new file mode 100644 index 00000000..8aa89f72 --- /dev/null +++ b/dev/containers.data/CCTrie/Make/index.html @@ -0,0 +1,11 @@ + +Make (containers.data.CCTrie.Make)

Module CCTrie.Make

Parameters

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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/dev/containers.data/CCTrie/MakeArray/argument-1-X/index.html b/dev/containers.data/CCTrie/MakeArray/argument-1-X/index.html new file mode 100644 index 00000000..8aad7177 --- /dev/null +++ b/dev/containers.data/CCTrie/MakeArray/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCTrie.MakeArray.1-X)

Parameter CCTrie.MakeArray.1-X

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCTrie/MakeArray/index.html b/dev/containers.data/CCTrie/MakeArray/index.html new file mode 100644 index 00000000..c7bb46e7 --- /dev/null +++ b/dev/containers.data/CCTrie/MakeArray/index.html @@ -0,0 +1,11 @@ + +MakeArray (containers.data.CCTrie.MakeArray)

Module CCTrie.MakeArray

Parameters

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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/dev/containers.data/CCTrie/MakeList/argument-1-X/index.html b/dev/containers.data/CCTrie/MakeList/argument-1-X/index.html new file mode 100644 index 00000000..f29b9408 --- /dev/null +++ b/dev/containers.data/CCTrie/MakeList/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCTrie.MakeList.1-X)

Parameter CCTrie.MakeList.1-X

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCTrie/MakeList/index.html b/dev/containers.data/CCTrie/MakeList/index.html new file mode 100644 index 00000000..1a9d8aa4 --- /dev/null +++ b/dev/containers.data/CCTrie/MakeList/index.html @@ -0,0 +1,11 @@ + +MakeList (containers.data.CCTrie.MakeList)

Module CCTrie.MakeList

Parameters

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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/dev/containers.data/CCTrie/String/index.html b/dev/containers.data/CCTrie/String/index.html new file mode 100644 index 00000000..984ef4ed --- /dev/null +++ b/dev/containers.data/CCTrie/String/index.html @@ -0,0 +1,11 @@ + +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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/dev/containers.data/CCTrie/index.html b/dev/containers.data/CCTrie/index.html new file mode 100644 index 00000000..55fa3a34 --- /dev/null +++ b/dev/containers.data/CCTrie/index.html @@ -0,0 +1,2 @@ + +CCTrie (containers.data.CCTrie)

Module CCTrie

Prefix Tree

type 'a sequence = ('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 : functor (W : WORD) -> S with type key = W.t and type char_ = W.char_
module type ORDERED : sig ... end
module MakeArray : functor (X : ORDERED) -> S with type key = X.t array and type char_ = X.t
module MakeList : functor (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 diff --git a/dev/containers.data/CCTrie/module-type-ORDERED/index.html b/dev/containers.data/CCTrie/module-type-ORDERED/index.html new file mode 100644 index 00000000..b2352f56 --- /dev/null +++ b/dev/containers.data/CCTrie/module-type-ORDERED/index.html @@ -0,0 +1,2 @@ + +ORDERED (containers.data.CCTrie.ORDERED)

Module type CCTrie.ORDERED

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCTrie/module-type-S/index.html b/dev/containers.data/CCTrie/module-type-S/index.html new file mode 100644 index 00000000..e9c3f55f --- /dev/null +++ b/dev/containers.data/CCTrie/module-type-S/index.html @@ -0,0 +1,11 @@ + +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_seq : 'a t ‑> (key * 'a) sequence
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq_values : 'a t ‑> 'a sequence
val to_tree : 'a t ‑> [ `Char of char_ | `Val of 'a | `Switch ] ktree
Ranges
val above : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is bigger or equal to the given key, in +ascending order.

val below : key ‑> 'a t ‑> (key * 'a) sequence

All bindings whose key is smaller or equal to the given key, +in decreasing order.

\ No newline at end of file diff --git a/dev/containers.data/CCTrie/module-type-WORD/index.html b/dev/containers.data/CCTrie/module-type-WORD/index.html new file mode 100644 index 00000000..2f9b256f --- /dev/null +++ b/dev/containers.data/CCTrie/module-type-WORD/index.html @@ -0,0 +1,2 @@ + +WORD (containers.data.CCTrie.WORD)

Module type CCTrie.WORD

type t
type char_
val compare : char_ ‑> char_ ‑> int
val to_seq : t ‑> char_ sequence
val of_list : char_ list ‑> t
\ No newline at end of file diff --git a/dev/containers.data/CCWBTree.odoc b/dev/containers.data/CCWBTree.odoc new file mode 100644 index 0000000000000000000000000000000000000000..c4a8dd3af2b757ef45ec9428fc3585ac8de57460 GIT binary patch literal 9127 zcmcgxX>?RowocVO-yJFrC@PB64VfVmqlh2{Xh0D}5s|hvR+5{fObxNB0zntfPi@im z1_Ts`z6?=p2M{0Hv~MAH+qUi8D$e3OG-5lV?fmwcDuvB@YxSSUA}jaYv%mfAv-dvx z>~oWDO}EqzuNzU=OFsoZ$o`cI+csXQ(h)p*BZ;kR#i=zGI#Q6 z8PAJ0Y+EvTJDc;v_NTu7`ht-=?>}5BD4kYRwAYbEMML%}Dk>?qi;BvMg8xVj3;RLv zz@%v4kDBYn+dFc#lVgcks>N${1#b`y*7C`0E|%-gj&r@9E-w>LdSquJ8V#0~HPj6s z8D;wgLB-_mwl**0H{5*Fn4_PYu%PiT=RNgVW8=rwK`?eoESZR>a$Y7COEji4$yjc3 zEE{jh`V9;3xn`dSX0Pu&?#Q=JJN>UKib;=&Nj6a?ib zq;exi_zkaZtqNcL!nPIjo=?8Gbz%GvIWuOI-|+dP;d|?DFI{`)me`cf54xi_2&!ks za`E{dvHJ}dlvt$?Ke>LV|MP)8cV9Sfc@PYp zaM$0X{)W-nOiMkFU%d`r9WCFfukT1Fz4~lCnNHO&NM|~;U9lFgAm;T=&E4@tYkjNN z7VA#r8t(jl-172+UO4)aABH{j$Ni7|aZ=O|mTc`~Gpe%QdEFib$q%B@twG?I#G=ut zzcIQoN{?%Oe|cGVDxQnd69df%R9k7gm-5*mh4NhBKrXhtBHfjXr&CIm09;tvl@USn z+3?*!YkFBnb(;tyg)~pfMscd%t!vq`(vwd;&S%s7UZKb-$@y&7R+^>xWgG5d11ek6 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ff --git a/dev/containers.data/CCWBTree/Make/argument-1-X/index.html b/dev/containers.data/CCWBTree/Make/argument-1-X/index.html new file mode 100644 index 00000000..e31dd146 --- /dev/null +++ b/dev/containers.data/CCWBTree/Make/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCWBTree.Make.1-X)

Parameter CCWBTree.Make.1-X

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCWBTree/Make/index.html b/dev/containers.data/CCWBTree/Make/index.html new file mode 100644 index 00000000..3514d879 --- /dev/null +++ b/dev/containers.data/CCWBTree/Make/index.html @@ -0,0 +1,12 @@ + +Make (containers.data.CCWBTree.Make)

Module CCWBTree.Make

Parameters

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. Will use WORD.of_list to rebuild keys.

  • 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 : 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 : key printer ‑> 'a printer ‑> 'a t printer

Renamed from val print.

  • Since: 2.0
\ No newline at end of file diff --git a/dev/containers.data/CCWBTree/MakeFull/argument-1-X/index.html b/dev/containers.data/CCWBTree/MakeFull/argument-1-X/index.html new file mode 100644 index 00000000..708c2c23 --- /dev/null +++ b/dev/containers.data/CCWBTree/MakeFull/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.data.CCWBTree.MakeFull.1-X)

Parameter CCWBTree.MakeFull.1-X

include ORD
type t
val compare : t ‑> t ‑> int
val weight : t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCWBTree/MakeFull/index.html b/dev/containers.data/CCWBTree/MakeFull/index.html new file mode 100644 index 00000000..d6bc915f --- /dev/null +++ b/dev/containers.data/CCWBTree/MakeFull/index.html @@ -0,0 +1,12 @@ + +MakeFull (containers.data.CCWBTree.MakeFull)

Module CCWBTree.MakeFull

Use the custom X.weight function

Parameters

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. Will use WORD.of_list to rebuild keys.

  • 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 : 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 : key printer ‑> 'a printer ‑> 'a t printer

Renamed from val print.

  • Since: 2.0
\ No newline at end of file diff --git a/dev/containers.data/CCWBTree/index.html b/dev/containers.data/CCWBTree/index.html new file mode 100644 index 00000000..361872d4 --- /dev/null +++ b/dev/containers.data/CCWBTree/index.html @@ -0,0 +1,2 @@ + +CCWBTree (containers.data.CCWBTree)

Module CCWBTree

Weight-Balanced Tree

status: experimental

  • Since: 0.13
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type ORD : sig ... end
module type KEY : sig ... end

Signature

module type S : sig ... end

Functor

module Make : functor (X : ORD) -> S with type key = X.t
module MakeFull : functor (X : KEY) -> S with type key = X.t

Use the custom X.weight function

\ No newline at end of file diff --git a/dev/containers.data/CCWBTree/module-type-KEY/index.html b/dev/containers.data/CCWBTree/module-type-KEY/index.html new file mode 100644 index 00000000..3e1a6e17 --- /dev/null +++ b/dev/containers.data/CCWBTree/module-type-KEY/index.html @@ -0,0 +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 diff --git a/dev/containers.data/CCWBTree/module-type-ORD/index.html b/dev/containers.data/CCWBTree/module-type-ORD/index.html new file mode 100644 index 00000000..0d379fa4 --- /dev/null +++ b/dev/containers.data/CCWBTree/module-type-ORD/index.html @@ -0,0 +1,2 @@ + +ORD (containers.data.CCWBTree.ORD)

Module type CCWBTree.ORD

type t
val compare : t ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers.data/CCWBTree/module-type-S/index.html b/dev/containers.data/CCWBTree/module-type-S/index.html new file mode 100644 index 00000000..4ab23089 --- /dev/null +++ b/dev/containers.data/CCWBTree/module-type-S/index.html @@ -0,0 +1,12 @@ + +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. Will use WORD.of_list to rebuild keys.

  • 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 : 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_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
val of_seq : (key * 'a) sequence ‑> 'a t
val to_seq : 'a t ‑> (key * 'a) sequence
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 : key printer ‑> 'a printer ‑> 'a t printer

Renamed from val print.

  • Since: 2.0
\ No newline at end of file diff --git a/dev/containers.data/CCZipper.odoc b/dev/containers.data/CCZipper.odoc new file mode 100644 index 0000000000000000000000000000000000000000..43807399aaa540473a6da72b40ae4b5195c9b886 GIT binary patch literal 2884 zcmbVOONd)l7*0Z>%?LggmV&P{Z6-}JnPmEyI<&UEb!y8%r>Gs3)?zr5dopvJn|s2! zH%U_zMReE2oepgUL5`(kT}T~7sVnV9TolEXAP7pa;6ms^v|GBT&nGTMNz|B49 z{NMNekMCSziu%a5%J$0W+vh&~GLcA(z%K*8jqrPDxmp*tOS#RYQ!%MaKPXI0oZzh% zlg8+>J^k15Kc@Gkzmw+e8?~$-VBlsVk$OFmxcBEo;-1?Z5{XCFvMZ#zWTa9~gx#x=kgq=sR5i|Uf+ozGz~{R;o4v%#vN&MkkOo*rV&mfJ&K zBhTOyIjxIYF$~zelzt_>+dqn%S%EvXX#cMM{rk!D%xz2CK~b)3Gv)0iywT7E-LBAz z96}`{IsnA~6cN&!ltwzAn-RkDIlZyf6*VM{tg>4sgxz7%)scL1WQNw~i7N=zVJib_ zVI(+03RYPbm6szNsjQyB!3cd^i$fkS#WF7rLoiHw$YJlA6x5{y$}7Nr7!76`%6l?k zHE9z8#gqh^#&pU+=fAR)!~!}I%X-A}t(fJvxh9=wIz_uDB%>~abOiZn3783P&l2jV zt-&Sq6SG(oI*bUvDyS}kSd1Xvj3Iu_S*+n#;qYOB3D>;|@5)3-VhUn|K*ZsG$N(Nv zPc5Ki_K*O^XbQk@2`9o^i104Ncz+jgZ;hR@QP%dAkcPTEI%#*P#myR(vu%_EEmB-J z{FMm)vj{$u+%zQl?3^!nGDg=g*P~b;SRwiA2=jU$X0@nyhoX0^0(%$LrL|PAPT@vG z;kP~tNAgW!@`g5n?9`Ng)|IZerNo8_8mEk9rgjhPrw4|Gwgl2bU4c|uJSU1jhT2qNUw zHZ=7NYX~qk4kJOqp#8I<8^b<-iouWr`g>yfU>o4mXv3N0QeLvA=-@mrfS2GSLS}~` z(fG%|7DD!S6eOIgO!9>|`pbRMzbb)o2eNd6#wPuM!N3Mfc!xM}*M-^GPp0Q!fH`o?A|D)c867w$NP` zg5N0$;_VFAfG62Ybo83?hVW*A>TJ_j37Q@(HmK!5qeZTnNxmBD6s?-yDq4T(AiN-W zW%R;iWAf2nH=_q`CWSh+;LB##PkJUfp)VHLVEeU*&9@kr|NBsJCiz33 +CCZipper (containers.data.CCZipper)

Module CCZipper

List Zipper

  • Since: 1.0
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 diff --git a/dev/containers.data/index-generated.mld b/dev/containers.data/index-generated.mld new file mode 100644 index 00000000..75a16ac6 --- /dev/null +++ b/dev/containers.data/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.data} +This library exposes the following toplevel modules: {!modules:CCBV CCBijection CCBitField CCCache CCDeque CCFQueue CCFun_vec CCGraph CCHashSet CCHashTrie CCHet CCImmutArray CCIntMap CCMixmap CCMixset CCMixtbl CCMultiMap CCMultiSet CCPersistentArray CCPersistentHashtbl CCRAL CCRingBuffer CCSimple_queue CCTrie CCWBTree CCZipper}. \ No newline at end of file diff --git a/dev/containers.data/index.html b/dev/containers.data/index.html new file mode 100644 index 00000000..60be1167 --- /dev/null +++ b/dev/containers.data/index.html @@ -0,0 +1,3 @@ + +index (containers.data.index)

Library containers.data

+This library exposes the following toplevel modules:

CCBV
CCBijection
CCBitField
CCCache
CCDeque
CCFQueue
CCFun_vec
CCGraph
CCHashSet
CCHashTrie
CCHet
CCImmutArray
CCIntMap
CCMixmap
CCMixset
CCMixtbl
CCMultiMap
CCMultiSet
CCPersistentArray
CCPersistentHashtbl
CCRAL
CCRingBuffer
CCSimple_queue
CCTrie
CCWBTree
CCZipper

.

\ No newline at end of file diff --git a/dev/containers.data/page-index.odoc b/dev/containers.data/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e4a4b413aff3bc64dcb81c29de39d9bda83e3a44 GIT binary patch literal 635 zcma)(J5Iwu5QZHD1yIm%03-1V50iidQbdtt5f3SmAc=@X6D{@x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W>Q+haMNzNWDTFZ?|u}NK8HMu(qy=BW+$=)VAeKUR0jhlXXhfAIK zEbh|qanht)NBSyQQlGc=Rl}&87?kz^Dwo6}2^_pp0_<%|O@c`%8 iaH$_`D2R$^|1d9u^SHJwujLL!wo;#0a(D3y0R3Mg;-4-6 literal 0 HcmV?d00001 diff --git a/dev/containers.iter/CCKList/.jbuilder-keep b/dev/containers.iter/CCKList/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.iter/CCKList/Infix/index.html b/dev/containers.iter/CCKList/Infix/index.html new file mode 100644 index 00000000..45dfb5e1 --- /dev/null +++ b/dev/containers.iter/CCKList/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.iter.CCKList.Infix)

Module CCKList.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 diff --git a/dev/containers.iter/CCKList/Traverse/argument-1-M/index.html b/dev/containers.iter/CCKList/Traverse/argument-1-M/index.html new file mode 100644 index 00000000..791fe65e --- /dev/null +++ b/dev/containers.iter/CCKList/Traverse/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (containers.iter.CCKList.Traverse.1-M)

Parameter CCKList.Traverse.1-M

type 'a t
val return : 'a ‑> 'a t
val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t
\ No newline at end of file diff --git a/dev/containers.iter/CCKList/Traverse/index.html b/dev/containers.iter/CCKList/Traverse/index.html new file mode 100644 index 00000000..e466f737 --- /dev/null +++ b/dev/containers.iter/CCKList/Traverse/index.html @@ -0,0 +1,2 @@ + +Traverse (containers.iter.CCKList.Traverse)

Module CCKList.Traverse

Parameters

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 diff --git a/dev/containers.iter/CCKList/index.html b/dev/containers.iter/CCKList/index.html new file mode 100644 index 00000000..fde7e0a6 --- /dev/null +++ b/dev/containers.iter/CCKList/index.html @@ -0,0 +1,16 @@ + +CCKList (containers.iter.CCKList)

Module CCKList

Continuation List

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit

Basics

type +'a t = unit ‑> [ `Nil | `Cons of 'a * 'a t ]
val nil : 'a t
val empty : 'a t
val cons : 'a ‑> 'a t ‑> 'a t
val singleton : 'a ‑> 'a t
val repeat : ?⁠n:int ‑> 'a ‑> 'a t

repeat ~n x repeats xn times then stops. If n is omitted, +then x is repeated forever.

  • Since: 0.3.3
val cycle : 'a t ‑> 'a t

Cycle through the iterator infinitely. The iterator shouldn't be empty.

  • Since: 0.3.3
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.
  • Since: 0.13
val is_empty : 'a t ‑> bool
val head : 'a t ‑> 'a option

Head of the list.

  • Since: 0.13
val head_exn : 'a t ‑> 'a

Unsafe version of head.

  • Raises Not_found: if the list is empty.
  • Since: 0.13
val tail : 'a t ‑> 'a t option

Tail of the list.

  • Since: 0.13
val tail_exn : 'a t ‑> 'a t

Unsafe version of tail.

  • Raises Not_found: if the list is empty.
  • Since: 0.13
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 iter : ('a ‑> unit) ‑> 'a t ‑> unit
val iteri : (int ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Iterate with index (starts at 0).

  • Since: 0.13
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).

  • Since: 0.13
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.

  • Since: 0.3.3
val product : 'a t ‑> 'b t ‑> ('a * 'b) t

Specialization of product_with producing tuples.

  • Since: 0.3.3
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].

  • Since: 0.3.3
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.

  • Since: 0.3.3
val flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b t
val filter_map : ('a ‑> 'b option) ‑> 'a t ‑> 'b t
val flatten : 'a t t ‑> 'a t
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.

  • Since: 0.17

Operations on two Collections

val fold2 : ('acc ‑> 'a ‑> 'b ‑> 'acc) ‑> 'acc ‑> 'a t ‑> 'b t ‑> 'acc

Fold on two collections at once. Stop at soon as one of them ends.

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 zip : 'a t ‑> 'b t ‑> ('a * 'b) t

Combine elements pairwise. Stop as soon as one of the lists stops.

  • Since: 0.13
val unzip : ('a * 'b) t ‑> 'a t * 'b t

Split each tuple in the list.

  • Since: 0.13

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.

  • Since: 0.3.3
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.

  • Since: 0.3.3
val memoize : 'a t ‑> 'a t

Avoid recomputations by caching intermediate results.

  • Since: 0.14

Fair Combinations

val interleave : 'a t ‑> 'a t ‑> 'a t

Fair interleaving of both streams.

  • Since: 0.13
val fair_flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b t

Fair version of flat_map.

  • Since: 0.13
val fair_app : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

Fair version of (<*>).

  • Since: 0.13

Implementations

  • Since: 0.3.3
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.

  • Since: 0.13
val (<.>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

Infix version of fair_app.

  • Since: 0.13

Infix operators

  • Since: 0.17
module Infix : sig ... end
module type MONAD : sig ... end

Monadic Operations

module Traverse : functor (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.

  • Since: 0.13
val to_array : 'a t ‑> 'a array

Convert into array. Iterate twice.

  • Since: 0.13
val to_rev_list : 'a t ‑> 'a list

Convert to a list, in reverse order. More efficient than to_list.

val to_seq : 'a t ‑> 'a sequence
val to_gen : 'a t ‑> 'a gen
val of_gen : 'a gen ‑> 'a t

of_gen g consumes the generator and caches intermediate results.

  • Since: 0.13

IO

val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print the list with the given separator (default ","). +Do not print opening/closing delimiters.

\ No newline at end of file diff --git a/dev/containers.iter/CCKList/module-type-MONAD/index.html b/dev/containers.iter/CCKList/module-type-MONAD/index.html new file mode 100644 index 00000000..700bb5df --- /dev/null +++ b/dev/containers.iter/CCKList/module-type-MONAD/index.html @@ -0,0 +1,2 @@ + +MONAD (containers.iter.CCKList.MONAD)

Module type CCKList.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 diff --git a/dev/containers.iter/CCKTree.odoc b/dev/containers.iter/CCKTree.odoc new file mode 100644 index 0000000000000000000000000000000000000000..ab1295fecd0505c11356d044cbfad058c319ca43 GIT binary patch literal 4648 zcmb7HeQXPw76J3Xx&=3p(5@Kkp#41%tO#Ghb zJ%6+kOiPs9`F)@7kKgmyExV=R(fnAx@c4;yKTjkQL-^D2cRT(zo*yZ>PGDM&^!&UP zNb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^jb-wOs%p3_Cdh?4a%f5@zPAW*xwQW38JG2EM|h znosoP6-5)Q*fGr}KA54^PBGn02Yvg?>QjcV??=Nx)srk0ks{$^1U0y&oqjgMo-)u+ z?G|NN&j%D=tbt}t4v9L|a(nlq&iBA)XWPN(-FQisa{aHQUrN^4) zXf!J6hcHj`GH4b{Vcx)lTr_4JdrS+Oa0t_o;BP7fh5M%n>x}2muIgQDgyKljc1m)D zqxf4|F9r)~?pjrj_aXyo<cPPTRaG+i^7B+Pjo z!#GW`rEILJy4Ab(DqAPj;~+gWo(deUH?_x9px)|O_w}y#Iz|1uDe4g=hT?VXs4Pf(vzQRws~fjdWO2z<#yp3z{JA# zX%gfQ2^o~AFEfSwcz#p~-^St&sC?^5p+?I>;9?ZmJdAg6D>hGn;I^bFiNz?)sy5}( zjE@sov!NRm0vfSgbukWzl)k!0tH4^tiF)X;LQTD7pNf*^uvyvxwRI%-4R%;E9>2G3 z;Ht+2EMRCXq5jRdPh2dc@&3#tL&B{~U>toVVB>Bur#sDi1pCP}&2A%aXs0C>n0$`Q zBMQgZ|5!dZW~V>lYO{*;9Ver#C~_K4%#J1w$m< AeE +Dot (containers.iter.CCKTree.Dot)

Module CCKTree.Dot

type attribute = [
| `Color of string
| `Shape of string
| `Weight of int
| `Style of string
| `Label of string
| `Id of string
| `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, Buffer.t, unit, attribute) Pervasives.format4 ‑> 'a

Using a formatter string, build an ID.

val mk_label : ('a, Buffer.t, unit, attribute) Pervasives.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 diff --git a/dev/containers.iter/CCKTree/class-type-pset/index.html b/dev/containers.iter/CCKTree/class-type-pset/index.html new file mode 100644 index 00000000..63f80230 --- /dev/null +++ b/dev/containers.iter/CCKTree/class-type-pset/index.html @@ -0,0 +1,2 @@ + +pset (containers.iter.CCKTree.pset)

Class type CCKTree.pset

Abstract Set structure

method add : 'a ‑> 'a pset
method mem : 'a ‑> bool
\ No newline at end of file diff --git a/dev/containers.iter/CCKTree/index.html b/dev/containers.iter/CCKTree/index.html new file mode 100644 index 00000000..ce81dc33 --- /dev/null +++ b/dev/containers.iter/CCKTree/index.html @@ -0,0 +1,22 @@ + +CCKTree (containers.iter.CCKTree)

Module CCKTree

Lazy Tree Structure

+This structure can be used to represent trees and directed +graphs (as infinite trees) in a lazy fashion. Like CCKList, it +is a structural type.

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a printer = 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 ] klist

Depth-first traversal of the tree.

val bfs : pset:'a pset ‑> 'a t ‑> 'a klist

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;;
+
+      let rec fib n = match n with
+        | 0 | 1 -> CCKTree.singleton (`Cst n)
+        | _ -> CCKTree.node2 (`Plus (mk_fib n)) (fib (n-1)) (fib (n-2));;
+
+      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 diff --git a/dev/containers.iter/CCLazy_list.odoc b/dev/containers.iter/CCLazy_list.odoc new file mode 100644 index 0000000000000000000000000000000000000000..98259e2c87b502f0046252766ccb78977bb08d1b GIT binary patch literal 2010 zcmb7EO>7%Q6t=Bd+CV83B%~6dPVmNYh+{h`Bt~kI4Q?udLO~EpC5o)EJ&sq|-7&lC zv?)Cx#NVM3la!<+J#-0_Ab}uig(_5mqE-SfoO%ExkhpL|0uEg0h4*IHKY|kn%Wr1C z_r33ZZ)QYQRE9^gquKmxs~>(9i^cNr)8Ka>{Pu02TM}nm%{m8!8rO+3BT{ zWqQ7mzw5TArr!Vh(a-Np)vv6+a(yJ^*mWuvOI(Y^cCEti;OEY>rEb9z2IGH#GNf}l`jwq-gX%3;}Lyy5BxHB z?3?ode&}iLF2dJE4xcZO-+ns(>)n|L9!{_Pe)`8vLv9y5x01sKb6x#qfxjo0s|%aw zJku6V?xb)RyaucAE?;t`a?`Y`xhk)*rse1NkNvqaeq$>WPn`YXyPHqUOdB#-*||jY zK3@igu@eNck4eKYsq>NUC-Dvu}N*9^cw4Y1(D(Qc1DkD3k*mirJ| z$WYGaxoa)aG#m}iTZ+JT1qsqpWqzs;JC@U`Ua-~M|dk~vj)};FApq`L(0CIk}Uhm zq3SCwLh=PfWtFVOds8*j0)LPodqjod)V*wU0}EYbSbPIc1O9*C=KEPiC`OA<={{TF z$Tl_y0cAe51@!0qmsPQ>Mr?nz*=}{Qy_jN+26vRL2i4mE)2P58VVGb^%PcLvMP}~GUIz<0%9dxP1^T1FJMQZW!4)cWC51YO? z5IqRkcfME`W`$GH;4brpi#{etvmL;hMHg2G>&1;3EmscMO1aS_@OJMZAjVx>~64TNUDirp5mb)_1f7=ueR4cYtYA zOXP_iOa~j1G?bl*0_Wdj;ENWT vg+3?n>@d_pdb^PC4n@e4%NK#$kI=<7I@^W*I0fiX@|zLxSR449iVWi)z8wc# literal 0 HcmV?d00001 diff --git a/dev/containers.iter/CCLazy_list/.jbuilder-keep b/dev/containers.iter/CCLazy_list/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.iter/CCLazy_list/Infix/index.html b/dev/containers.iter/CCLazy_list/Infix/index.html new file mode 100644 index 00000000..5e7f4174 --- /dev/null +++ b/dev/containers.iter/CCLazy_list/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.iter.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 diff --git a/dev/containers.iter/CCLazy_list/index.html b/dev/containers.iter/CCLazy_list/index.html new file mode 100644 index 00000000..019539e5 --- /dev/null +++ b/dev/containers.iter/CCLazy_list/index.html @@ -0,0 +1,3 @@ + +CCLazy_list (containers.iter.CCLazy_list)

Module CCLazy_list

Lazy List

  • Since: 0.17
type +'a t = 'a node lazy_t
type +'a node =
| Nil
| 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 diff --git a/dev/containers.iter/index-generated.mld b/dev/containers.iter/index-generated.mld new file mode 100644 index 00000000..c0b636e2 --- /dev/null +++ b/dev/containers.iter/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.iter} +This library exposes the following toplevel modules: {!modules:CCKList CCKTree CCLazy_list}. \ No newline at end of file diff --git a/dev/containers.iter/index.html b/dev/containers.iter/index.html new file mode 100644 index 00000000..408b61d4 --- /dev/null +++ b/dev/containers.iter/index.html @@ -0,0 +1,3 @@ + +index (containers.iter.index)

Library containers.iter

+This library exposes the following toplevel modules:

CCKList
CCKTree
CCLazy_list

.

\ No newline at end of file diff --git a/dev/containers.iter/page-index.odoc b/dev/containers.iter/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9e8e2cae712e7cd8e6dce6b0bd6927c1c486f391 GIT binary patch literal 282 zcmc~#$xqfb)HBjEXqmcf9|Hq}CJ?g%u?P_JZ_rQ9&nrpH%u6jQ*2^qOEt;U3nU|7U zVQ_VN+9m&<3C*b{wXOXJSSLd@?+0p92I49p&e*V!XzeUa6BaDk?&z>!g1Jv-Qc+@2 zr2?A8Kq*c$u8@q(Vuc*2iqwjN{NmJNg_4X^g|z&foc!|4ymW<<{DPd+veX=f-29Z% zoYZ0~g$1*KhA&iicJ}tkEG_|B0^x)drKW;8+Rn~CiB*;HIbd0!MT&Y34lJ?&A)l3*wpMv5%Q*;#kmnK|oRymTSx z@@6n(tB??5RM5rRdPoS0paU@#fptv>5o#ae?z32Xwsn5{?UV-iAwpO|IuH#U#%yZRk(KB%0tI!-6S= zPdSEctH`i;Xe4=*RZM6j)8bPm()m8c9EX-Vu2_;JffCPaibGvf4O=k{sC6Mzhju## zvgJmn9!+mu>VKT+*tc?GV0mtf=hYNmccb&*+o!qD+iLe76t4X^^Wm1{=1VIqQx?}G zBd!Z3f_Ewv#Wd0t(NZxJCy<%3vQSpULb76F#8I`Rm{d~G(d=lxyyxDP-y<^%_ZMF* z@;_H%lIz`YT~G36LinI0FPDD^szX9cHGU>Nm2SK4YzTi5{RuXc2jLNfG)mjTLUU`i z3w99-b~0D)JFuOazL3z2Nfjmg8L1&8ObHALew8Ll8W}lCNCPD%-U)XFx~VzFOb;<# z)LaS+t-cwg<`gr-#GIt&dX4K}2Of%vVG9!^#y`^@1sg86TDRpw~?Lj8rr6Fkh7l%atE-bV}{LINY)YDqCl_?*w z!X$g}fch_$IQOC#z;0&ukS1PH`v)giOluj968fIdV4w^qSZrg=b`txQ*(%&aanoRc z;X#7`GTdB=kEXbChGFF6U|`3(*w`p`Kx0%fkz?__tMkWV3kHU8Zse|dIXt|LeVPI- zg?I3Z$2-Rys712rDLjEt<8kJNiHrEJ@v33j3QR^MDTkAP(iX>qt|k>T;aI9MnqVao ot0iLeuz~?CEL6~4{i&%Zd$+9Fd&od`Q3J#OcYsT5paV(z2Of$O=l}o! literal 0 HcmV?d00001 diff --git a/dev/containers.monomorphic/CCMonomorphic/.jbuilder-keep b/dev/containers.monomorphic/CCMonomorphic/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.monomorphic/CCMonomorphic/index.html b/dev/containers.monomorphic/CCMonomorphic/index.html new file mode 100644 index 00000000..619da61c --- /dev/null +++ b/dev/containers.monomorphic/CCMonomorphic/index.html @@ -0,0 +1,2 @@ + +CCMonomorphic (containers.monomorphic.CCMonomorphic)

Module CCMonomorphic

Shadow unsafe functions and operators from Pervasives

  • 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 Pervasives.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • Since: 2.1
  • Deprecated Please use [not CCEqual.physical] or Pervasives.(!=) instead.
\ No newline at end of file diff --git a/dev/containers.monomorphic/index-generated.mld b/dev/containers.monomorphic/index-generated.mld new file mode 100644 index 00000000..eb74308f --- /dev/null +++ b/dev/containers.monomorphic/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.monomorphic} +This library exposes the following toplevel modules: {!modules:CCMonomorphic}. \ No newline at end of file diff --git a/dev/containers.monomorphic/index.html b/dev/containers.monomorphic/index.html new file mode 100644 index 00000000..480fc0cd --- /dev/null +++ b/dev/containers.monomorphic/index.html @@ -0,0 +1,3 @@ + +index (containers.monomorphic.index)

Library containers.monomorphic

+This library exposes the following toplevel modules:

CCMonomorphic

.

\ No newline at end of file diff --git a/dev/containers.monomorphic/page-index.odoc b/dev/containers.monomorphic/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..abc761f61974a63d1aaa8d6e161fc39fb5ea6f2b GIT binary patch literal 279 zcmc~#$xqfb)HBjEXqmcf9|Hq}0T8nSu^12wY%ojC&nrpH%u6jQ*2~S$%g@a(D#*x8 zo}ikUmy%jx@L~O^~VZnm!jt&bZ z*!g586(tr`Dqwd8Pz9$MS4c)?u|f`1VQNJ|esOBCLPPHM50!h%^qI~M9XJNqJh<>&x3P*KmpfkhMm{FP`Z literal 0 HcmV?d00001 diff --git a/dev/containers.sexp/CCSexp.odoc b/dev/containers.sexp/CCSexp.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8b8e09ede9a315c186ccf3ca0cbbaf498a902628 GIT binary patch literal 3528 zcmb7Ge~cVe9p9auG299iqdl?K_O-XSyZ3AN?mz|4@TETkH`_H3RL*uLA8Q1Wb%vAPp#*MjmPq%$LAg&Z~pr?2lpxVtM;c-nIEK5*>~Y-zao{&rQ-J?#5AHf zerBs3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r>sm#xiX@Yvj_{9Z`>9xko=J%P7B^nEb#UHb=vLJl;bGXb|B*3eQ@R+f%-(W~c6r0GG99WWGxlYI%u&VtQ}udrMM$7i zC#O1^U%0gnt&QQpBe=0SDt>xFt0cNBw;?N2w$VDK1fNSn^L1?;3R$^Ry?^1`rEqy; Nvy69?j<;nA{}-EiVh#WR literal 0 HcmV?d00001 diff --git a/dev/containers.sexp/CCSexp/.jbuilder-keep b/dev/containers.sexp/CCSexp/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.sexp/CCSexp/Decoder/index.html b/dev/containers.sexp/CCSexp/Decoder/index.html new file mode 100644 index 00000000..6a8a2937 --- /dev/null +++ b/dev/containers.sexp/CCSexp/Decoder/index.html @@ -0,0 +1,3 @@ + +Decoder (containers.sexp.CCSexp.Decoder)

Module CCSexp.Decoder

type t

Decoder

val of_lexbuf : 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.

\ No newline at end of file diff --git a/dev/containers.sexp/CCSexp/index.html b/dev/containers.sexp/CCSexp/index.html new file mode 100644 index 00000000..46e2b5fa --- /dev/null +++ b/dev/containers.sexp/CCSexp/index.html @@ -0,0 +1,8 @@ + +CCSexp (containers.sexp.CCSexp)

Module CCSexp

Handling S-expressions

type 'a or_error = ('a, string) Result.result
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option

Basics

type t = [
| `Atom of string
| `List of t list
]
type sexp = t
val equal : t ‑> t ‑> bool
val compare : t ‑> t ‑> int
val hash : t ‑> int
val atom : string ‑> t

Build an atom directly from a string.

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

Reverse the list.

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 : Buffer.t ‑> t ‑> unit
val to_string : t ‑> string
val to_file : string ‑> t ‑> unit
val to_file_seq : string ‑> t sequence ‑> unit

Print the given sequence of expressions to a file.

val to_chan : Pervasives.out_channel ‑> t ‑> unit
val pp : Format.formatter ‑> t ‑> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Format.formatter ‑> t ‑> unit

Raw, direct printing as compact as possible.

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| 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 parse_string : string ‑> t or_error

Parse a string.

val parse_chan : Pervasives.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 : Pervasives.in_channel ‑> t or_error gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Pervasives.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 diff --git a/dev/containers.sexp/CCSexp_lex.odoc b/dev/containers.sexp/CCSexp_lex.odoc new file mode 100644 index 0000000000000000000000000000000000000000..02fe605e9c2cb66cfda9f182c9064878e891b18d GIT binary patch literal 1057 zcmb7DT}TvB6dv>{S@xeIREW8|>6SaIrTCLDx~;KfuC*FS!ZbU3H@BVLac5?AEwYCK z!wRmVE@jYI{zO`7P|-`QM88m|4~8LVkcAoOOZZfDXJ*BGY~V7?ch2{n@0@dockygi zwkgMCzTDaWf*=SIpE!Jy@!2{|vb(Ys&vBV4W zhc4REw$Edq^eC~ho! z75K1JR<@8S%lQ_@$9en`6#NWV#tS}1DrH0uD!P?5UQnvB8bCHANld^<`Y39ELppGsv6}fQd7y_vYfiADHj^Y{-yhV{D>FaPM&BvC>kxjoVc z3iT52g?YDyRv=(Q8o1M_ zf|hc-!-{}Cil(Jo?KT9e@h2sBMD7DdZxsYyK%iDrPRG-tlo}vjdu1w_ox?+*K@YXe zz+6!k2&+Cpkzxz?p1LNUgFufKw<^U{-y=q4moy9n84iIV z)o7Pa!J?+)73*C(C(m;l<8_t*eS8C?13_NG*9wfP9fL|>k5XFHZd4VC J)x|d4=wE|@tYiQH literal 0 HcmV?d00001 diff --git a/dev/containers.sexp/CCSexp_lex/.jbuilder-keep b/dev/containers.sexp/CCSexp_lex/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.sexp/CCSexp_lex/index.html b/dev/containers.sexp/CCSexp_lex/index.html new file mode 100644 index 00000000..ae2b6348 --- /dev/null +++ b/dev/containers.sexp/CCSexp_lex/index.html @@ -0,0 +1,2 @@ + +CCSexp_lex (containers.sexp.CCSexp_lex)

Module CCSexp_lex

type token =
| ATOM of string
| LIST_OPEN
| LIST_CLOSE
| EOI
exception Error of int * int * string
val error : Lexing.lexbuf ‑> string ‑> 'a
type unescape_state =
| Not_escaped
| Escaped
| Escaped_int_1 of int
| Escaped_int_2 of int
val char_equal : char ‑> char ‑> bool
val remove_quotes : Lexing.lexbuf ‑> string ‑> string
val __ocaml_lex_tables : Lexing.lex_tables
val token : Lexing.lexbuf ‑> token
val __ocaml_lex_token_rec : Lexing.lexbuf ‑> int ‑> token
\ No newline at end of file diff --git a/dev/containers.sexp/index-generated.mld b/dev/containers.sexp/index-generated.mld new file mode 100644 index 00000000..559aaa65 --- /dev/null +++ b/dev/containers.sexp/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.sexp} +This library exposes the following toplevel modules: {!modules:CCSexp CCSexp_lex}. \ No newline at end of file diff --git a/dev/containers.sexp/index.html b/dev/containers.sexp/index.html new file mode 100644 index 00000000..3076792c --- /dev/null +++ b/dev/containers.sexp/index.html @@ -0,0 +1,3 @@ + +index (containers.sexp.index)

Library containers.sexp

+This library exposes the following toplevel modules:

CCSexp
CCSexp_lex

.

\ No newline at end of file diff --git a/dev/containers.sexp/page-index.odoc b/dev/containers.sexp/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e84cae87adaa516df59028a548f66713dffb1149 GIT binary patch literal 267 zcmc~#$xqfb)HBjEXqmcf9|Hq}CJ?g%u?P_JZ_rQ9&nrpH%u6jQ)+_9oSoS? z?g>yifzZ0pM1sq

@gsp_ksO-1;|wIB-F|P*og2;soEf>mO-ALL!pmncbQ9z3;s@ zW7(GOT*I2T>X)y6b*E4$EWoD(pJ(9n)Lz4tLQ^hSq%7@6jJB`YOH1bi>27eb{(8(} z=F~radT0Nd{HwS4?!B{5{4t?&q(|=;3dJt~%q$d)4<9QO%tHGA@Qg>2G`)S!NfT>W zndGHYcsB9Yn$H#4L@vaqick{pkZaZ^ieF+DS&5YoWa0T14PcEFMEh*8q3bh2xGn>N z7Y709a`@N6{wyc`#H?G51;=axXbawMF?jvC@#{~!zZ|VSccOab!KELrJIUTz6}fgUr#dXB1!X2| z+m|7;6%VDbyE58P9qKZBY=+%z#XM-+ZRXK9(DjS=uismLw*TkN%ggUQ`2OwR&pAnY zW&egzt!U6LnV4Fo9-GTc4m$T_lnbJW^oZ_t7)kpt%uvVKhaDC8#=rFH-c4h1+6C)1 zL#WeB*$~tetUG{${U|l;uZT3MTI3Cdf~WmiaVDhOP0$TETqHD zxB#~XP}TW&78+m(3l#xRz)Pudy~i~yB_RuC)SEq>?}rML;!FduPm~X1!`7DE20yh= z>I8ai5EihIVSO$XZ!<9X>-q%&q2TQ%jn-p)nI@Cm1KcS=UM7HCu^i`?^JS9kOhOkp zxMBDP#0~_?w2@{9@&(HDt2iK=WE&(PIA#ifDlnafiqHd0Hi0Xt8xgA5KU z8kMZdEeC2L0W$`j@}j$@rW=_Z6UWzJl!16WQhM0r!!-nBZPp$EFJ{01n|1KbERt;o zT;*ArT){qa3osdQR`6X74h|!&9)69GUK>!%_~EK-4l`puXL@%QnGV7GbE6p%1jLvj z_#o2>l5@Z!8EcGXF4@Qgqc^T+e1L8kcJ?G|%^0AZ7>F9u!O4Gz!bDbs ze9U0*krZA?HB5ci=dNFNsbXNufFx>W>L>=53s(7phi^Q}14UZQr7jXYoIcB%NjiI+}h^|9qRY_SN@M~B>vqX-Uk&_e}BhisVK zQgJGEFhHdu+yfcjr&X82HOqA`!!*a3+3!Z)P5v|E!o}swV05BN#gjucyfps?sBX-n literal 0 HcmV?d00001 diff --git a/dev/containers.thread/CCBlockingQueue/.jbuilder-keep b/dev/containers.thread/CCBlockingQueue/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.thread/CCBlockingQueue/index.html b/dev/containers.thread/CCBlockingQueue/index.html new file mode 100644 index 00000000..f2d80da4 --- /dev/null +++ b/dev/containers.thread/CCBlockingQueue/index.html @@ -0,0 +1,9 @@ + +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.

  • Since: 0.16
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 diff --git a/dev/containers.thread/CCLock.odoc b/dev/containers.thread/CCLock.odoc new file mode 100644 index 0000000000000000000000000000000000000000..5d5e3f52d2123f29a6f0025a607bbd4626ef994d GIT binary patch literal 3059 zcmbVOYls_F6i(I&ZMLE-1z%LWG1+XpB$H%YO4UAQyFO@XX>GSYKnORJo9?)ixnbtc z?nV>@OU2@k**-y0rfXLOMVJ1mAWEfR{}x41@JB)PhX~a_f}qrM?ww3F`#{^$ft@om z=ljlgzH@GPotwpqKBAY8o%!I)L?TgyD+SlRaNV;|F}WkCGzg)ek60AF&NZheLkx1`PB-TE+Hj&6B!dptC^#x&gY19aV zkt4#gJwjdXJ9V<(7i`7|A)eMp$rQDHMy6fbYOy-89Ki`yuM|jwyQIloMm*YJqOBX@ zscc!_W@vYZ;kGf_wBdE;I@ErOyG<%~Q_nKJpxplCt-CHA{&ez*hp&%6d-dG9FdUSa zLHVEiu3tO1X7Kq#Z~S`vs}t6{VK{t{xl{1n6oU`n(SG~!+|L7rhqi1ydE@0D=8Rxr ztLK^}C74%Ig6V*pE|n&Dla)NH$(_j>qEAjW5^dF-}5T3j|uN5-_WD0h6l<<64$^>FeTVevlu(3(TWq2t=4f!uTv+%LD zJ#RuA1;ej*jLARYWrt0Zmdgb*1!R!o>V|RAfNw7Z!MwId+aUAE6bCmUL=^!b%WN^e zBQ|M-L7uq2Wm21XK+xijPWCinfQ_UETxjp^~+~Oa87EzkiarOkZ_sJsK@HEP^ePd zEK9to$__F$_%G`{Q50^w8dr%mS9&5V*8SMZ)QN@6vA8lS;c(H9gn$NyQK8&w3f0_uMnzO6k;WQkof82*{VX;!^ayG`GJVMa`D-m?^wc+?~UgDRvo86tEg88d+S8k zYxm2k3FH^44T(qr8MtJQdFf_QH z3MCkf#xl9os^cBo?38QGZtMNyFf1wqX;BZHj2}mcS<>`9f%YQIGbuC#N2}pGa(*Pc zuI5sLR8mtK1VN^Okq?8pRPqJwct%7LcLpMrWF7fHfnlYjs(UN6v}MCeQ!|cxjX45I zfwOZYE+Vf4>FkJNfl$GlIO0$kE*{W7mE68UQ(lkSaXP}SHfakRp(`4AtEdbUlQ&y% zXkZsAGeZT^COb%jYy<-lds7$`3aE)g;2nJBk(nW+2>V9OR_~w4@UVaQNGGlbww zT5Jpp%!8+AbY`kG*0D$5fP{WrLTfuCWU~l(3K+9Xt>ZNxvDt8s2C4ylO4jV`1K fKR~1i<(P#Gt;S=pL2d6=iCmFFY*Hi&aHRbUAXk&l literal 0 HcmV?d00001 diff --git a/dev/containers.thread/CCLock/.jbuilder-keep b/dev/containers.thread/CCLock/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.thread/CCLock/LockRef/index.html b/dev/containers.thread/CCLock/LockRef/index.html new file mode 100644 index 00000000..510b27f7 --- /dev/null +++ b/dev/containers.thread/CCLock/LockRef/index.html @@ -0,0 +1,2 @@ + +LockRef (containers.thread.CCLock.LockRef)

Module CCLock.LockRef

Type allowing to manipulate the lock as a reference.

  • Since: 0.13
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 diff --git a/dev/containers.thread/CCLock/index.html b/dev/containers.thread/CCLock/index.html new file mode 100644 index 00000000..be00e1fa --- /dev/null +++ b/dev/containers.thread/CCLock/index.html @@ -0,0 +1,10 @@ + +CCLock (containers.thread.CCLock)

Module CCLock

Utils around Mutex

A value wrapped into a Mutex, for more safety.

  • Since: 0.8
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 diff --git a/dev/containers.thread/CCPool.odoc b/dev/containers.thread/CCPool.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e492aa8859bfe010d8df81f6f425c01c484de3db GIT binary patch literal 5814 zcmd5=eT*Ds8Nc0|G3;py+JG3Oyx05MYqxvXLTRD4o$EH0s+TnF#a4)(@9w^PJKpTf zIx~BBTN*VHA{Z0r3N0uq)21z^G)kQk!jKT#4e#P|;h_y?FsV*EYNJG-;} z5Ha=-FS*^>ndkfC_dM@-Rj;yPV{ub)@_}P#e%9C5w*mhq{%^wndsjAAJU5iKtNfrC z)_o$pz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j(7(My(rtI0x~4w88B^+X`(=yTofq}jONm$a zjFVTkYX^09>df0awOGd>OJh!m)@_fscd~;Y*EDNp=7w(CsQVjfg}$Zz{Ac3lT)yVW zaJC_NxbB?xTv@d%gmPTDG@&pYbTb4AYH1WQGX$!%esDS5m8#gu_o=tc%tLu>60?Ym zhW+idYNl{v`#i0=%Te`Q=7c9iFB}PIt#ecZg*{l$1Xi|>m333NS(|Vl>tzDjW5U^W zf%)J)9{B5-17;Cs`% z(1LO0nAZ?PU9iF#$rjR#WYZfoTVjY0`vt)NdsERG_y8#oNL zkUu^@n3-)>91T+^>+^(}J*(j)XuDVo`G}CrcwRKAd9w>_HD4aVC2yR@EexTh|6n>G zTrV-nI!^{m5vZobu?Gv_XS{L>AgRXXRO4eEjpxkl%R{nB^J#eu-}*ScMc~r0QFc_9 z34CeP!!dpnslVa@PT_PEO6LBBm^b8fgk^t`YJWD>-hab5RLx3?6xpz$`|E$QB)7hR zpbT6VlU#~FwZ>iCL?=jjM2^^((sOP@a3$S|Grjs$Y>140$yx^F_ zVIFyEcr86b^wA|xz1-<0F;@nmRGsrBE;?bH7zQM`WA?4KRk>(=b0$TR{RV)=E`NPfqT z?c=y}zYa_PdJaO*lG?wSW5EKqb;Dwe4ug{zA5R$X=`s?ju|b<~AZ7kU%DfwDkFeSw zCfukr96{2)VRe4W@yU_=ht{#a-zOZOzdV2a53>yB{3>(eL}r=B%M2F%f9SgUY9iqq zy*iog472g&Ilk1aZzR5&xrFn_T~4AkzNLNrb;|wQlpF6Gw6k#>jZZl?y)D5zD|)41 zW*+X%o!S3NS1zJ~c4A9j>yfoJ3B%Q7RWFfcTz7eVjQ6p0w)ke2$?-95`if4((TZuV bHBEt6543NZdDHxeY3?=6-H4)ji)H-_u2!Nu literal 0 HcmV?d00001 diff --git a/dev/containers.thread/CCPool/.jbuilder-keep b/dev/containers.thread/CCPool/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.thread/CCPool/Make/Fut/Infix/index.html b/dev/containers.thread/CCPool/Make/Fut/Infix/index.html new file mode 100644 index 00000000..30f43a14 --- /dev/null +++ b/dev/containers.thread/CCPool/Make/Fut/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.thread.CCPool.Make.Fut.Infix)

Module CCPool.Make.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
\ No newline at end of file diff --git a/dev/containers.thread/CCPool/Make/Fut/index.html b/dev/containers.thread/CCPool/Make/Fut/index.html new file mode 100644 index 00000000..83660e42 --- /dev/null +++ b/dev/containers.thread/CCPool/Make/Fut/index.html @@ -0,0 +1,22 @@ + +Fut (containers.thread.CCPool.Make.Fut)

Module CCPool.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 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
val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t
val (>>) : 'a t ‑> (unit ‑> 'b t) ‑> 'b t
val (>|=) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Alias to map.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

Alias to app.

\ No newline at end of file diff --git a/dev/containers.thread/CCPool/Make/argument-1-P/index.html b/dev/containers.thread/CCPool/Make/argument-1-P/index.html new file mode 100644 index 00000000..98a72428 --- /dev/null +++ b/dev/containers.thread/CCPool/Make/argument-1-P/index.html @@ -0,0 +1,2 @@ + +1-P (containers.thread.CCPool.Make.1-P)

Parameter CCPool.Make.1-P

val max_size : int

Maximum number of threads in the pool.

\ No newline at end of file diff --git a/dev/containers.thread/CCPool/Make/index.html b/dev/containers.thread/CCPool/Make/index.html new file mode 100644 index 00000000..b9b9783c --- /dev/null +++ b/dev/containers.thread/CCPool/Make/index.html @@ -0,0 +1,3 @@ + +Make (containers.thread.CCPool.Make)

Module CCPool.Make

Create a new Pool

Parameters

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
Futures
\ No newline at end of file diff --git a/dev/containers.thread/CCPool/index.html b/dev/containers.thread/CCPool/index.html new file mode 100644 index 00000000..eecc82a4 --- /dev/null +++ b/dev/containers.thread/CCPool/index.html @@ -0,0 +1,2 @@ + +CCPool (containers.thread.CCPool)

Module CCPool

Thread Pool, and Futures

Renamed and heavily updated from CCFuture.

  • Since: 0.16
type +'a state =
| Done of 'a
| Waiting
| Failed of exn
module type PARAM : sig ... end
exception Stopped
module Make : functor (P : PARAM) -> sig ... end

Create a new Pool

\ No newline at end of file diff --git a/dev/containers.thread/CCPool/module-type-PARAM/index.html b/dev/containers.thread/CCPool/module-type-PARAM/index.html new file mode 100644 index 00000000..d1ceb97a --- /dev/null +++ b/dev/containers.thread/CCPool/module-type-PARAM/index.html @@ -0,0 +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 diff --git a/dev/containers.thread/CCSemaphore.odoc b/dev/containers.thread/CCSemaphore.odoc new file mode 100644 index 0000000000000000000000000000000000000000..da1f3d4cc5e0d49c3a2e9e6ccec2f5eebba40883 GIT binary patch literal 1265 zcmb7@J#5oJ6vqu1i53YE46szZ(5MYfV!Iy#L@9C!0>Ol6g_wvA=S)s@&gJf$Dhy>| z1Io3fbU;W3QCRq>SlAE(Bt~W=gjm=>OiV1?*`^5y2CSTNzWcv-@ArS_uoimdL2Jlz zt}H!xVHn1c8XMKvsmAuzK`*2N5sDeNM4e$&yIZVOCU65y*F%O~=hN4@k8f5!*WVR) z9qc)|?OdA0ylxol_87*7%WA+T!^j))|K~E-%Q${M?#6Op?L_Xn@nYVw28Ug9a~vP2 zphiHbz>K2cSjZYk96_9TTso~M*S0*Lcsg}-_ovA-Z&>01nDis> zVnkR{crlv;1s+Qa&Ih44#UY}C1nT$!l@~Z19@Av|OCai)0uo_^cqj;3-5d+9WJL}K z#~{a{taXYgJ9i}eA5IF-M+!f!;YL5h0Y*HnA)BW)40hyK{{5c6_@C+iNnl!J9L{&Siuf_c6U)I|`ltFL*qv_?W>3{Hd?d#V342y_S4mzA+ ju0AIVj)s`iegTcJM*Nnxs14f5^E%^s)yZ=+<8j@eiAm(y literal 0 HcmV?d00001 diff --git a/dev/containers.thread/CCSemaphore/.jbuilder-keep b/dev/containers.thread/CCSemaphore/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.thread/CCSemaphore/index.html b/dev/containers.thread/CCSemaphore/index.html new file mode 100644 index 00000000..dfe11acb --- /dev/null +++ b/dev/containers.thread/CCSemaphore/index.html @@ -0,0 +1,6 @@ + +CCSemaphore (containers.thread.CCSemaphore)

Module CCSemaphore

Semaphores

  • Since: 0.13
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 diff --git a/dev/containers.thread/CCThread.odoc b/dev/containers.thread/CCThread.odoc new file mode 100644 index 0000000000000000000000000000000000000000..14c7a24bb6e9157ad5d0a6f6867d75b45a3e5711 GIT binary patch literal 2021 zcmb7FU2GIp6yBPt&|(0M#$ZA?3)|goyWO7_X)&QpTY?f3CA6T4CT4c#?(Vg-cgUUD zE=%Hrf)4~Rvmhmr2d@bFVx;kQr&^*@1(2STNmr%V;5G?#BG zQ(eG$-Vdyx=062BfmYFFrm0RR^4Y?eX*{gd))}knauF~oEO(lhEh()=n1BAx@dx+* zap&{5e!Y5n?L(92l$yAA<8Dt@tzg>nx$TGf#>XetF3(87@uu(#~nQ z{ajn_EC$w>%T>H8%lW+OiCo>2^Zr50X1Q*ba<3F?+;wseD_J!+$lv(++RHZ+f!uuJ zhr)~B%}q_2p*nTtqA?i{LS>p)Of$Uje$#j&9+;@)nWc}6X9p0oE-(SjRAfO(g?#`v zWNKKnz3L zgc2N5;UI7yTt3eb>`6_XF4Y90!pJ0T(datg+ai)MZs8OEk-~^;{9_t_l<+eV%qSg( z#!80q`!PV{z8pkR)I^a(m}ec zYQ?cQ5HTux_hGBHb|qf*cvMZIwo6xhT7AWWUc~8reCMxP{d0?U_im-h{?oRE~O}k9q)WJJDLnK+R_k z1RnSeVOOLl_+i!+{0i~uq(7R}-9X0+Gf`t;UlcWERR84e-@5QO8yobg8C>mnn+3F+Rp0E(_> z&l6ME@8~|Nqkxgq6oD6&5r)_;qn9+x3!3G~V4KAun&HljbQuK6f|}I#TOeypg#*A# z6zK|o3dq-1A_JCia6>A}cBF2qpO!J&mRR6(VY4jk5r7IX33!z|J}ESM4?VV?rc6PV jS;EJz>)#PGLoSq;YkW^F;Vn9H>y|TQ`7txO27y| literal 0 HcmV?d00001 diff --git a/dev/containers.thread/CCThread/.jbuilder-keep b/dev/containers.thread/CCThread/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.thread/CCThread/Arr/index.html b/dev/containers.thread/CCThread/Arr/index.html new file mode 100644 index 00000000..8e8a3a33 --- /dev/null +++ b/dev/containers.thread/CCThread/Arr/index.html @@ -0,0 +1,3 @@ + +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 diff --git a/dev/containers.thread/CCThread/Barrier/index.html b/dev/containers.thread/CCThread/Barrier/index.html new file mode 100644 index 00000000..5c8077d6 --- /dev/null +++ b/dev/containers.thread/CCThread/Barrier/index.html @@ -0,0 +1,6 @@ + +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 diff --git a/dev/containers.thread/CCThread/index.html b/dev/containers.thread/CCThread/index.html new file mode 100644 index 00000000..1b8a1dbe --- /dev/null +++ b/dev/containers.thread/CCThread/index.html @@ -0,0 +1,2 @@ + +CCThread (containers.thread.CCThread)

Module CCThread

Threads

status: unstable

  • Since: 0.13
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

Array of threads

Single-Use Barrier

module Barrier : sig ... end
\ No newline at end of file diff --git a/dev/containers.thread/CCTimer.odoc b/dev/containers.thread/CCTimer.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8d91ee79c5c631a0f5c3afa48540cb0a68c83f59 GIT binary patch literal 1645 zcmb7EPiP%Q7~kkde9u4V!3s)olDy=lNxJVP)usid8=npIAc$$igAnHJ&L&HCXO@}S zygae>V8x5zylC5lmr-m5DH?j|tpq(-yy&&iLj`jX6!9Ql{bpv925)(=Zst$S@REDI7N$xxS|0&|I2g7jdr(^)KK$%$4YL8w1%w1e4`q5q85r#d*#QYs0jI9p^q z$MRJy(nzRw|J#qBytVY*`fD%TKmXQ`S0B@Q>J7p-;Oho~&!78$+`GE_)XdQrC%683 z_wJXW+MX9YYB?4}t70L5@U>QJjpd{z(wxy&kMVU;;E1#yaMxPtmT4BZVv^u8lkGc4 zPTlz7**o7~n%e#8gQIn^5GuX3bIlJ%B$Tdda|=jBYa}i+!coFFB8CSMpmP%Ok_wbk zluChEk0J*s2*aJw{PgAR8~*8u2(*&K1e;kvl=K{jaO!6Gl~Pw4B~7JyyXK$spLdsD zZwVq-$R=G`!!(A>aCM;8aSRMK?0BOMcC+z>pP=B`b zjenuJBw10ASm`iS6%!wh;{+fYBIY_c%K#oh5xjJ9w7!RX4B12Wn@dm2ybIKWy95Cl zV*$4MdN00Kr_;n9wzyFb3nX0XeXvUv)bS)^ScW&18c8g8KM5`9)RDeDik;-69jh2H zlvpb}9?1sIN)S>wLPjT#Y4r*Mf=w9?>M~6?ttvv|yf`e*ixs)k2O)mqAZ|Hc?;bn5 znM&wH-dFxRd&J%!2T#I|)`PZvtDHg6MX*BCa%_yzNRR>DG#2K4!#LGyYM<7+9*iaC zK+RmC$XW&MCp2XnYHhtyKgtLcczrx38SZO!24pBW+el*)&)6eL%7wJK9br}W+K6$M zy=8q^wK4(xj16P1)3&OGKJD3k +CCTimer (containers.thread.CCTimer)

Module CCTimer

Event timer

Used to be part of CCFuture.

  • Since: 0.16
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 diff --git a/dev/containers.thread/index-generated.mld b/dev/containers.thread/index-generated.mld new file mode 100644 index 00000000..2ca8e050 --- /dev/null +++ b/dev/containers.thread/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.thread} +This library exposes the following toplevel modules: {!modules:CCBlockingQueue CCLock CCPool CCSemaphore CCThread CCTimer}. \ No newline at end of file diff --git a/dev/containers.thread/index.html b/dev/containers.thread/index.html new file mode 100644 index 00000000..3519f5f4 --- /dev/null +++ b/dev/containers.thread/index.html @@ -0,0 +1,3 @@ + +index (containers.thread.index)

Library containers.thread

+This library exposes the following toplevel modules:

CCBlockingQueue
CCLock
CCPool
CCSemaphore
CCThread
CCTimer

.

\ No newline at end of file diff --git a/dev/containers.thread/page-index.odoc b/dev/containers.thread/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e18b49090fbe2118e7021c564f868b51f6de5c93 GIT binary patch literal 334 zcmc~#$xqfb)HBjEXqmcf9|Hq}HW0G{u_zD=Y%omD&nrpH%u6jQ)+@;!J()j+>TD`F-^8AE@?^KyCU!ycmdkH!LK<02ZbR3l?m5bXYLK(kC;i zD6yzg0mE{jB&QiyNJeI{LJm|-YDGbQacZ$bNk*zdT7FJWetBkIx}W07wS7ZJLTjjX9Lv)mZp}b0 +Containers_top (containers.top.Containers_top)

Module Containers_top

type 'a printer = 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 diff --git a/dev/containers.top/containers_top.odoc b/dev/containers.top/containers_top.odoc new file mode 100644 index 0000000000000000000000000000000000000000..e4c37afdadca88a402809690ae465127e62afa45 GIT binary patch literal 1331 zcmb7DeNYr-9KK*JQE4(m1xX|hxJ$TOJ|xI=mXFRrNZ|O0W{TN6_PB+;-E((2IC5kn zQw9lMuKnF%F_in*QsLcV^#xp6B=R zyuTlp!)b#<6rl?INcG2GN+gm{bk?A=1)Yr@3N6QqB+XL1pb$A@lOp!fJsaH#JUl9| zb#Qg@`;vyn-gjT^s&PiahLL(jB5{qBNL*}dB@(Fw{{L8*3xEWHxk4z57DUl(qy&J= zGkTZ3w^n-k)LE8(%RD*&VL(iQPDk+o|ENA9>dKx%)wc(S7FDVRIfRk1q=BJXk>XjB zQE|M16k|w%)}lD(vlUPFs@wD9e5TVf25Q$s_)Ve?mqJ{x@*|Cz`(gb|ed_VQg!N$!2sE9Z^ml8yPH_S&?K1kvHnImfI)C)^J z5c<8$ngBlS9&VPmp6e-!wN&)9CEDwD76fpwE$TX{sybyca9@i0>IjkqzCsFmN2YaU zGdq6eN1}Jb(dpHJ4MPz6$LCNiO7!#>55Jl1E1Y6B?Mg5I#O*SKK@No0(WHi<03KWA zpWrvp*4S$V94$W^)1Vc97aI<HieXC?z=b`5d^;Klhq7T*0nH5@rsVp$va z5WQ9+rzJ(2V*xIzRa%dmlIr-MM9ubj_ua_GM2^j+oh_VLZBP9)g}fbB7Z{Y8Rh@&p zN+OK_KmOj#+sR(7N1rqHXLyDxZlM1MGv?;b z2|0xS{)cUk0X>bnKx23Fnzd=_yTMf3qJFWjs@3!}nuRpZ$Z#C8CDL6NeKA6xSy)xS z`Q#72%}ABzT#BaghPlQ!ul-v^Fc_uR!^dx$YSD!tvz3_d23(an0WXeni5$i z$+PH5QD+mcCFDHwXUn9m_rgmVOP$vV&=Do@S|!?S3 z$np7tk77+(lcUZBDGRj0U*;Ek=uzn;$ zcz__HfVqxusfObiCv#j$vw}!6O!lLER~!Otqn(QFaMEV+|Ih@0O*sQg88qV1&Xp1l INf@f)FN;J;bpQYW literal 0 HcmV?d00001 diff --git a/dev/containers.top/index-generated.mld b/dev/containers.top/index-generated.mld new file mode 100644 index 00000000..88259e26 --- /dev/null +++ b/dev/containers.top/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.top} +This library exposes the following toplevel modules: {!modules:Containers_top}. \ No newline at end of file diff --git a/dev/containers.top/index.html b/dev/containers.top/index.html new file mode 100644 index 00000000..64b90375 --- /dev/null +++ b/dev/containers.top/index.html @@ -0,0 +1,3 @@ + +index (containers.top.index)

Library containers.top

+This library exposes the following toplevel modules:

Containers_top

.

\ No newline at end of file diff --git a/dev/containers.top/page-index.odoc b/dev/containers.top/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9084745bdbdf122c2c703bae48e1b4f83b7d9e15 GIT binary patch literal 256 zcmc~#$xqfb)HBjEXqmcf9|Hq}1`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EgjKVHR5ku3r`g-GW9PyzHuWkW;W@3!@*L(NV3&q*3jL zWom3NHYsX#k}r`LhKc@Qfa>fSa9|Yi1}~|JlE~xa`{O)LZn;h#LsaHQa-VWSrgEcI z_Y9P%?YSO$bgWIr;2Tl<4AkT&&KH{Vji!i!xNwtClN)G>K_q63#kjj)gsV9a3C^4e!S7i&r^j<_} z0tE=J6myJ@an{x+kPO`K#Ry{Cap#reaGIuJ^qrQzr?H*X?r1%pg_);Y+{Ezg#RM)= zBpqcTWm2O%c9KdS200oFXk-%48q#T{m==bMBX zhq@^7*2u(bqAbBR?l|4>KxJS61GxxBAg+*&PfLdfQg<-%FS-%TJDM#+TIT$z>N2*s zyl!xCXjr4pQ6viEMSK1FsEm;ig5BG@Tbw9fE3{wDwouFw<5=q^HO)VCD z{%SB%`)vPyZ;W6xSqE#k)-h_P{)UFRxE0E_M%ml`M2iCSqWB&_FON6-AHAanNAFJ0 zd)Fz-G_IQYO|0In+AsCBKo=XI>VHqz#Z8LpB$|A?=1sm;or99xc|E0pMpK(ezA4&7 z`|-HM+fUV_Ky!lfK4n*PX)7O)IgGjA!Q}(jI;!x_ow&$Qc^`jLH1dL=sbWJ2C7+jU z8t1duWDc>3*q7yQX;L=~uWkeIR&HpCVeoP79I6OY{Xkra${46wk~6+bL@C}FXmUeN+1k_i2uEX0 z@Wydf`FW>!6R65Vv$Hg#DXC0$!{>UaQ2XR2lmLayOdCy*F zWK_N+uRiU+mh&Ph>+giJu6Naz{Ml8tz2n+E?}n(rNV+*Bza_L0u?B_kYjdiq!P!@4 m4`I4EuBvMkD;&UACdC#5s(OcFDHY{D`7odqlnqJ_TmK7}98~52 literal 0 HcmV?d00001 diff --git a/dev/containers.unix/CCUnix/.jbuilder-keep b/dev/containers.unix/CCUnix/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers.unix/CCUnix/Infix/index.html b/dev/containers.unix/CCUnix/Infix/index.html new file mode 100644 index 00000000..f990dc03 --- /dev/null +++ b/dev/containers.unix/CCUnix/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.unix.CCUnix.Infix)

Module CCUnix.Infix

val (?|) : ('a, Buffer.t, unit, call_result) Pervasives.format4 ‑> 'a

Infix version of call.

  • Since: 0.11
val (?|&) : ('a, Buffer.t, unit, async_call_result) Pervasives.format4 ‑> 'a

Infix version of async_call.

  • Since: 0.11
\ No newline at end of file diff --git a/dev/containers.unix/CCUnix/index.html b/dev/containers.unix/CCUnix/index.html new file mode 100644 index 00000000..c901d5b9 --- /dev/null +++ b/dev/containers.unix/CCUnix/index.html @@ -0,0 +1,18 @@ + +CCUnix (containers.unix.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.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 ‑> ('a, Buffer.t, unit, call_result) Pervasives.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.

  • 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.
val call : ?⁠bufsize:int ‑> ?⁠stdin:[ `Gen of string gen | `Str of string ] ‑> ?⁠env:string array ‑> ('a, Buffer.t, unit, string * string * int) Pervasives.format4 ‑> 'a

call cmd is similar to call_full cmd 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 ‑> ('a, Buffer.t, unit, string) Pervasives.format4 ‑> 'a
type line = string
type async_call_result = < stdout : line gen; stderr : line gen; stdin : line ‑> unit; close_in : unit; close_err : unit; close_out : unit; 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 ‑> ('a, Buffer.t, unit, async_call_result) Pervasives.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 ‑> string ‑> f:(Pervasives.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 ‑> string ‑> f:(Pervasives.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
val with_process_in : string ‑> f:(Pervasives.in_channel ‑> 'a) ‑> 'a

Open 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:(Pervasives.out_channel ‑> 'a) ‑> 'a

Open a subprocess and obtain a handle to its stdin.

  • Since: 0.16
type process_full = < stdin : Pervasives.out_channel; stdout : Pervasives.in_channel; stderr : Pervasives.in_channel; close : Unix.process_status; >

Handle to a subprocess.

  • Since: 0.16
val with_process_full : ?⁠env:string array ‑> string ‑> 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 with_connection : Unix.sockaddr ‑> f:(Pervasives.in_channel ‑> Pervasives.out_channel ‑> 'a) ‑> 'a

Wrap Unix.open_connection with a handler.

  • Since: 0.16
exception ExitServer
val establish_server : Unix.sockaddr ‑> f:(Pervasives.in_channel ‑> Pervasives.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
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, Buffer.t, unit, call_result) Pervasives.format4 ‑> 'a

Infix version of call.

  • Since: 0.11
val (?|&) : ('a, Buffer.t, unit, async_call_result) Pervasives.format4 ‑> 'a

Infix version of async_call.

  • Since: 0.11
\ No newline at end of file diff --git a/dev/containers.unix/index-generated.mld b/dev/containers.unix/index-generated.mld new file mode 100644 index 00000000..adee15d3 --- /dev/null +++ b/dev/containers.unix/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers.unix} +This library exposes the following toplevel modules: {!modules:CCUnix}. \ No newline at end of file diff --git a/dev/containers.unix/index.html b/dev/containers.unix/index.html new file mode 100644 index 00000000..39b33277 --- /dev/null +++ b/dev/containers.unix/index.html @@ -0,0 +1,3 @@ + +index (containers.unix.index)

Library containers.unix

+This library exposes the following toplevel modules:

CCUnix

.

\ No newline at end of file diff --git a/dev/containers.unix/page-index.odoc b/dev/containers.unix/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..f267064f09f27102037cc16029d0b93c3460c668 GIT binary patch literal 251 zcmc~#$xqfb)HBjEXqmcf9|Hq}CJ?g%u?P_JZ_rQ9&nrpH%u6jQ)+^1+teBvhnU|7U zVel)g;rZ33X)kt9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kwQ1WF#8L z)2k1lUCPmtF(gk9=?)yW-ZmACuzbeQan6ZqyS#uh9JjwP-fqsJ-zjjVn8J>ZMt-U; z0fK8p)L6n8Y8SbTw+E(0#<)1K&TAIOUHuBMAI^3#>!>kKdp@YD2~PE%Xzj UGyP$e9m5hlhTcxW!CT?~0Iynv@&Et; literal 0 HcmV?d00001 diff --git a/dev/containers/CCArray/.jbuilder-keep b/dev/containers/CCArray/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCArray/index.html b/dev/containers/CCArray/index.html new file mode 100644 index 00000000..fa4be80e --- /dev/null +++ b/dev/containers/CCArray/index.html @@ -0,0 +1,53 @@ + +CCArray (containers.CCArray)

Module CCArray

Array utils

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a random_gen = Random.State.t ‑> 'a
type 'a printer = Format.formatter ‑> 'a ‑> unit

Arrays

type 'a t = 'a array
val empty : 'a t

The empty array, physically equal to ||.

val equal : 'a equal ‑> 'a t equal

Hoist an equality test for elements to arrays. +Arrays are only equal if their lengths are the same and +corresponding elements test equal.

val compare : 'a ord ‑> 'a t ord
val swap : 'a t ‑> int ‑> int ‑> unit

swap arr i j swaps elements at indices i and j.

  • Since: 1.4
val get : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to (length a - 1).

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 set : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to length a - 1.

val length : _ t ‑> int

Return the length (number of elements) of the given array.

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

fold f x a computes f (... (f (f x a.(0)) a.(1)) ...) a.(n-1), +where n is the length of the array a.

val foldi : ('a ‑> int ‑> 'b ‑> 'a) ‑> 'a ‑> 'b t ‑> 'a

Fold left on array, with index.

val fold_while : ('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> 'a ‑> 'b t ‑> 'a

Fold left on array 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 acc a is a fold_left-like function, but it also maps the +array to another array.

  • Since: 1.2
val scan_left : ('acc ‑> 'a ‑> 'acc) ‑> 'acc ‑> 'a t ‑> 'acc t

scan_left f acc a returns the array + [|acc; f acc x0; f (f acc a.(0)) a.(1); …|] .

  • Since: 1.2
val iter : ('a ‑> unit) ‑> 'a 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 ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like Array.iter, but the function is applied to the index of the +element as first argument, and the element itself as second argument.

val blit : 'a t ‑> int ‑> 'a t ‑> int ‑> int ‑> unit

blit v1 o1 v2 o2 len copies len elements +from array v1, starting at element number o1, to array v2, +starting at element number o2. It works correctly even if +v1 and v2 are the same array, and the source and +destination chunks overlap.

Raise Invalid_argument "Array.blit" if o1 and len do not +designate a valid subarray of v1, or if o2 and len do not +designate a valid subarray of v2.

val reverse_in_place : 'a t ‑> unit

Reverse the array in place.

val sorted : ('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a array

sorted cmp a makes a copy of a and sorts it with cmp.

  • Since: 1.0
val sort_indices : ('a ‑> 'a ‑> int) ‑> 'a t ‑> int array

sort_indices cmp 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 cmp a +appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices cmp a) = sorted cmp 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 cmp a returns a new array b, with the same length as a, +such that b.(i) is the index at which the i-the element of a appears +in sorted cmp a. a is not modified.

In other words, map (fun i -> (sorted cmp a).(i)) (sort_ranking cmp 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 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, else it returns None.

  • Since: 1.3
val find : ('a ‑> 'b option) ‑> 'a t ‑> 'b option

Alias to find_map.

  • Deprecated since 1.3
val find_map_i : (int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Like find_map, but also pass the index to the predicate function.

  • Since: 1.3
val findi : (int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Alias to find_map_i.

  • Since: 0.3.4
  • Deprecated since 1.3
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.

  • Since: 0.3.4
val lookup : cmp:'a ord ‑> 'a ‑> 'a t ‑> int option

Lookup the index of some value in a sorted array. +Undefined behavior if the array is not sorted wrt cmp. +Complexity: O(log (n)) (dichotomic search).

  • Returns None if the key is not present, or +Some i (i the index of the key) otherwise.
val lookup_exn : cmp:'a ord ‑> 'a ‑> 'a t ‑> int

Like lookup, but

  • Raises Not_found: if the 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 x arr finds the index of the object x in the array arr, +provided arr is sorted using cmp. If the array is not sorted, +the result is not specified (may

  • Raises Invalid_argument: ).

    Complexity: O(log n) where n is the length of the array +(dichotomic search).

  • Returns

    • `At i if cmp arr.(i) x = 0 (for some i).
    • `All_lower if all elements of arr are lower than x.
    • `All_bigger if all elements of arr are bigger than x.
    • `Just_after i if arr.(i) < x < arr.(i+1).
    • `Empty if the array is empty.
  • Raises Invalid_argument: if the array is found to be unsorted w.r.t cmp.
  • Since: 0.13
val for_all : ('a ‑> bool) ‑> 'a t ‑> bool

for_all p [|a1; ...; an|] checks if all elements of the array +satisfy the predicate p. That is, it returns +(p a1) && (p a2) && ... && (p an).

val for_all2 : ('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Forall on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val exists : ('a ‑> bool) ‑> 'a t ‑> bool

exists p [|a1; ...; an|] checks if at least one element of +the array satisfies the predicate p. That is, it returns +(p a1) || (p a2) || ... || (p an).

val exists2 : ('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Exists on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val fold2 : ('acc ‑> 'a ‑> 'b ‑> 'acc) ‑> 'acc ‑> 'a t ‑> 'b t ‑> 'acc

Fold on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val iter2 : ('a ‑> 'b ‑> unit) ‑> 'a t ‑> 'b t ‑> unit

Iterate on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val shuffle : 'a t ‑> unit

Shuffle randomly the array, in place.

val shuffle_with : Random.State.t ‑> 'a t ‑> unit

Like shuffle but using a specialized random state.

val random_choose : 'a t ‑> 'a random_gen

Choose an element randomly.

  • Raises Not_found: if the array/slice is empty.
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of an array. +The input array is shared with the sequence and modifications of it will result +in modification of the sequence.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of an array.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of an array.

IO

val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print an array of items with printing function.

val pp_i : ?⁠sep:string ‑> (int ‑> 'a printer) ‑> 'a t printer

Print an array, giving the printing function both index and item.

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

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 map2 : ('a ‑> 'b ‑> 'c) ‑> 'a t ‑> 'b t ‑> 'c t

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 they have distinct lengths.
  • Since: 0.20
val rev : 'a t ‑> 'a t

Copy + reverse in place.

  • Since: 0.20
val filter : ('a ‑> bool) ‑> 'a t ‑> 'a t

Filter elements out of the array. Only the elements satisfying +the given predicate will be kept.

val filter_map : ('a ‑> 'b option) ‑> 'a t ‑> 'b t

Map each element into another value, or discard it.

val flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b array

Transform each element into an array, then flatten.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Infix version of flat_map.

val (>>|) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Infix version of map.

  • Since: 0.8
val (>|=) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Infix version of map.

  • Since: 0.8
val except_idx : 'a t ‑> int ‑> 'a list

Remove given index, obtaining the list of the other elements.

val (--) : int ‑> int ‑> int t

Range array. Bounds included.

val (--^) : int ‑> int ‑> int t

Range array, excluding right bound.

  • Since: 0.17
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) ‑> 'arr ‑> unit

Sort the array, without allocating (eats stack space though). Performance +might be lower than Array.sort.

  • Since: 0.14
\ No newline at end of file diff --git a/dev/containers/CCArray/module-type-MONO_ARRAY/index.html b/dev/containers/CCArray/module-type-MONO_ARRAY/index.html new file mode 100644 index 00000000..81b820cf --- /dev/null +++ b/dev/containers/CCArray/module-type-MONO_ARRAY/index.html @@ -0,0 +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 diff --git a/dev/containers/CCArrayLabels.odoc b/dev/containers/CCArrayLabels.odoc new file mode 100644 index 0000000000000000000000000000000000000000..2c30aee55631086430e2add89d8415d5379283ac GIT binary patch literal 12065 zcmc&)Ymgk(b>2shc4t=QfMbkJ47vN5*_qYs?Ch=t(n>345fTW41QOUG6pVUidUo5} zGd*;o&r_)#P&C+>v^0yv>dNfPBc9e)ajB zO)u{Ir|ZA{`o4XyW`Y3hU1rzqn(Z{^%(9>V`Q;Ce-F5JZH2wD+>mA zxl4QPrQ2UQEqnIX^ez8&!}mT9UJmK?ie2;bPgoNV^u7FI?5j6FGWe6d@B2ScysA8> zLmyXL``!0F^7Yt9FM9k1@5Y}$Tks#8a-H&6*>;SvRffw!2l277IlE?zxn|9-k1g8H zyxY*r21bY09xIlbrd1iM7*)M#d3p1?J05!K(n0T~U!48)f1a^pdZyq9x12no?N7VL z^-ZH*HvFJaI2i4k6m{Q!L77xfbS=?k7?&98sTC$56&8OU)#NQsVSm)Tgq;Drd?Na znEKsGu&i6Y_M!GEpwMEuWZPD_{-cAoQ}MOhsRj?isNvXek2q|qBD3_#_9@5jxo1VY zCwbV@J)_?vg=gReq!ET?)Qr04(vnQg z%_XD=_-P2c9?>+b!kaTpM_5LE)|+$rJKhLauNhdpk^sCN!)@60idmm+TbXDv-{AFO z#qAF5PUaT8Ydr)e?QE$K$^Iq7WxLh@2Y#%xGn{jUcGsFY+uG-phTKKH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n7`wr z;{SOXbwZoeM&!8j_@-HG^B>A_A{_T4`JnwSue$jf-0oFMeOw-_p*|zgIIv!K80}9E zn~WiOY)M!4uvxazCMV0M4IO8!D22=OsF8754dd2sP91pYk*)*=1Jzo0$p!nJiu=o6v|{UMcYPGJci K!@ur?-v1vMY0+;0 literal 0 HcmV?d00001 diff --git a/dev/containers/CCArrayLabels/.jbuilder-keep b/dev/containers/CCArrayLabels/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCArrayLabels/index.html b/dev/containers/CCArrayLabels/index.html new file mode 100644 index 00000000..96a30518 --- /dev/null +++ b/dev/containers/CCArrayLabels/index.html @@ -0,0 +1,52 @@ + +CCArrayLabels (containers.CCArrayLabels)

Module CCArrayLabels

Array utils

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a random_gen = Random.State.t ‑> 'a
type 'a printer = Format.formatter ‑> 'a ‑> unit

Arrays

type 'a t = 'a array
val empty : 'a t

The empty array, physically equal to ||.

val equal : 'a equal ‑> 'a t equal

Hoist an equality test for elements to arrays. +Arrays are only equal if their lengths are the same and +corresponding elements test equal.

val compare : 'a ord ‑> 'a t ord
val swap : 'a t ‑> int ‑> int ‑> unit

swap arr i j swaps elements at indices i and j.

  • Since: 1.4
val get : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to (length a - 1).

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 set : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to length a - 1.

val length : _ t ‑> int

Return the length (number of elements) of the given array.

val fold : f:('a ‑> 'b ‑> 'a) ‑> init:'a ‑> 'b t ‑> 'a

fold f x a computes f (... (f (f x a.(0)) a.(1)) ...) a.(n-1), +where n is the length of the array a.

val foldi : f:('a ‑> int ‑> 'b ‑> 'a) ‑> init:'a ‑> 'b t ‑> 'a

Fold left on array, with index.

val fold_while : f:('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> init:'a ‑> 'b t ‑> 'a

Fold left on array 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 acc a is a fold_left-like function, but it also maps the +array to another array.

  • Since: 2.1
val scan_left : f:('acc ‑> 'a ‑> 'acc) ‑> init:'acc ‑> 'a t ‑> 'acc t

scan_left f acc a returns the array + [|acc; f acc x0; f (f acc a.(0)) a.(1); …|] .

  • Since: 2.1
val iter : f:('a ‑> unit) ‑> 'a 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 ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like Array.iter, but the function is applied to the index of the +element as first argument, and the element itself as second argument.

val blit : 'a t ‑> int ‑> 'a t ‑> int ‑> int ‑> unit

blit v1 o1 v2 o2 len copies len elements +from array v1, starting at element number o1, to array v2, +starting at element number o2. It works correctly even if +v1 and v2 are the same array, and the source and +destination chunks overlap.

Raise Invalid_argument "Array.blit" if o1 and len do not +designate a valid subarray of v1, or if o2 and len do not +designate a valid subarray of v2.

val reverse_in_place : 'a t ‑> unit

Reverse the array in place.

val sorted : f:('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a array

sorted cmp a makes a copy of a and sorts it with cmp.

  • Since: 1.0
val sort_indices : f:('a ‑> 'a ‑> int) ‑> 'a t ‑> int array

sort_indices cmp 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 cmp a +appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices cmp a) = sorted cmp 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 cmp a returns a new array b, with the same length as a, +such that b.(i) is the index at which the i-the element of a appears +in sorted cmp a. a is not modified.

In other words, map (fun i -> (sorted cmp a).(i)) (sort_ranking cmp 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 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, else it returns None.

  • Since: 2.1
val find : f:('a ‑> 'b option) ‑> 'a t ‑> 'b option

find f a returns Some y if there is an element x such +that f x = Some y, else it returns None.

  • Deprecated since 2.1
val find_map_i : f:(int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Like find_map, but also pass the index to the predicate function.

  • Since: 2.1
val findi : f:(int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Like find, but also pass the index to the predicate function.

  • Since: 0.3.4
  • Deprecated since 2.1
val find_idx : f:('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.

  • Since: 0.3.4
val lookup : cmp:'a ord ‑> key:'a ‑> 'a t ‑> int option

Lookup the index of some value in a sorted array. +Undefined behavior if the array is not sorted wrt cmp. +Complexity: O(log (n)) (dichotomic search).

  • Returns None if the 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

Like lookup, but

  • Raises Not_found: if the 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 arr finds the index of the object key in the array arr, +provided arr 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 +(dichotomic search).

  • Returns

    • `At i if cmp arr.(i) key = 0 (for some i).
    • `All_lower if all elements of arr are lower than key.
    • `All_bigger if all elements of arr are bigger than key.
    • `Just_after i if arr.(i) < key < arr.(i+1).
    • `Empty if the array is empty.
  • Raises Invalid_argument: if the array is found to be unsorted w.r.t cmp.
  • Since: 0.13
val for_all : f:('a ‑> bool) ‑> 'a t ‑> bool

for_all p [|a1; ...; an|] checks if all elements of the array +satisfy the predicate p. That is, it returns +(p a1) && (p a2) && ... && (p an).

val for_all2 : f:('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Forall on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val exists : f:('a ‑> bool) ‑> 'a t ‑> bool

exists p [|a1; ...; an|] checks if at least one element of +the array satisfies the predicate p. That is, it returns +(p a1) || (p a2) || ... || (p an).

val exists2 : f:('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Exists on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val fold2 : f:('acc ‑> 'a ‑> 'b ‑> 'acc) ‑> init:'acc ‑> 'a t ‑> 'b t ‑> 'acc

Fold on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val iter2 : f:('a ‑> 'b ‑> unit) ‑> 'a t ‑> 'b t ‑> unit

Iterate on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val shuffle : 'a t ‑> unit

Shuffle randomly the array, in place.

val shuffle_with : Random.State.t ‑> 'a t ‑> unit

Like shuffle but using a specialized random state.

val random_choose : 'a t ‑> 'a random_gen

Choose an element randomly.

  • Raises Not_found: if the array/slice is empty.
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of an array.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of an array.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of an array.

IO

val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print an array of items with printing function.

val pp_i : ?⁠sep:string ‑> (int ‑> 'a printer) ‑> 'a t printer

Print an array, giving the printing function both index and item.

val map : f:('a ‑> 'b) ‑> 'a t ‑> 'b t

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 map2 : f:('a ‑> 'b ‑> 'c) ‑> 'a t ‑> 'b t ‑> 'c t

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 they have distinct lengths.
  • Since: 0.20
val rev : 'a t ‑> 'a t

Copy + reverse in place.

  • Since: 0.20
val filter : f:('a ‑> bool) ‑> 'a t ‑> 'a t

Filter elements out of the array. Only the elements satisfying +the given predicate will be kept.

val filter_map : f:('a ‑> 'b option) ‑> 'a t ‑> 'b t

Map each element into another value, or discard it.

val flat_map : f:('a ‑> 'b t) ‑> 'a t ‑> 'b array

Transform each element into an array, then flatten.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Infix version of flat_map.

val (>>|) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Infix version of map.

  • Since: 0.8
val (>|=) : 'a t ‑> ('a ‑> 'b) ‑> 'b t

Infix version of map.

  • Since: 0.8
val except_idx : 'a t ‑> int ‑> 'a list

Remove given index, obtaining the list of the other elements.

val (--) : int ‑> int ‑> int t

Range array. Bounds included.

val (--^) : int ‑> int ‑> int t

Range array, excluding right bound.

  • Since: 0.17
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) ‑> 'arr ‑> unit

Sort the array, without allocating (eats stack space though). Performance +might be lower than Array.sort.

  • Since: 0.14
\ No newline at end of file diff --git a/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html b/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html new file mode 100644 index 00000000..132c122c --- /dev/null +++ b/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html @@ -0,0 +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 diff --git a/dev/containers/CCArray_slice.odoc b/dev/containers/CCArray_slice.odoc new file mode 100644 index 0000000000000000000000000000000000000000..b95b668c585c0bb6da860a397cbdb3b7e8102fa3 GIT binary patch literal 9619 zcmc&)Yiu0Xb>?H2ajE{xe8>-7VQ*D(5z;6XUVB% zXVx>bq-Yz4TNrR#xaiQX0oHopbNZ4k@a&0|faYaUS<^9^X0VyJyyJ+KtKS@=UpM*Qt+xsjshZ691C;cPak8 z^UOrUwmi+SbjN*oa$#ZKakRCXYZ?u`TKVAIt22M{Z|`;I-udxAT71{Slw2S;+t-)+ zL0{i{p6ly-_xDHo`m%k&TUsVD;0M7o^VPuL#@mTS-mY3rj08dc+HR|*JAUP%2X|ca z_j^_k{LL*d{`A0se=P<9#Jk?M?6&Q6mW_sAdEp19}j&n!N9;&-n6{!Qo;7?!r_Wj4c)qeThnsJ4Evt!n;y#AGev*k}@ z9{a$Tw1w9%{nUC86c1~jv7%#lzjE8?aOSzMJ^5q*e=a%s**lJ%4uXjrbY}&ktmu&C z!NiZhcmEIHQF_m8;ojG7{mvth<)~&g?Y3X}qB--#+y3!<^0~X8&iu>%%l{iY-rQK$ zV2@+wLHF{fpHJR)-4|Z=?s(&yRsYN`*J(^OY)7Bk;J7kukeZrWw%huYYqV`^YSng5 zxE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A0`Q!WP14ZCp9fn%uJpNVzfNtFgPHj`5j>a?CDRb6!9Jy6Y zua=!M0WQWtsds%<7=as^=+LV&l}esHBuO_PtBaAf>1;hgchVAk+f!XO9EW}Zsn6zE zH5xEB@5vX#L*b{H;ct$^r8PK>!sr@xjU4=e+qG$RB-X6ke;){&!+}R{;J~wmlY0=*Rv27C?fjnnu|RPGFL$zElnT0U9;p`R{_d|uGi3|~?AMm->i%fm@j_lEbV zTs(9>N)E%u^)aI^55)O2-b5;HF;X0bMEh zNHLG-c0E2_?39;VI%9v_86+5eRsuZ;Lk}u)s*$jiPNCB|IqI#u<@Vb{x8RE0q8@DJ zmQ$gsbe@!rk>QUi?H0$SO42L)S<_#mSDp<;Jr?)M@t#*+RC50z_wQKh-P~CNlDt)P z>8VeE{)(q}h(}xmP3m*V#lW-?H5oM7df@TZt^C7C3F|c9P{$2@MtaRvapZH{dSXfU z9YhW!HvOv;RyI8u;v;To%rC@^c`h>M$X&{quZ+9P_^pNNROS}t4eB2K5`n&cgteF& z;Ig|OH3)`Z;>Ah#kq@c$-YBW{YIM-2c#pFYQAO&?bEi!fYVa&7xcDM^D@v~1m6}l= z+(#(bg*d;`fbFUUH))vc{4fk!`SjJea(}<+1Rv!{3XYm-2yyc zWt&u5F8_cJk)OF1{vSJdB&>I-2gW)bQYAHY1N}CF+$3`(%!ICO+m-Di{^11iy55Ng zwR#;Nhlnko&b#;wiyj0c12%giIr6no0QtLw +CCArray_slice (containers.CCArray_slice)

Module CCArray_slice

Array Slice

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a random_gen = Random.State.t ‑> 'a
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a t

Array slice, containing elements of type 'a.

val empty : 'a t

The empty array slice.

val equal : 'a equal ‑> 'a t equal
val compare : 'a ord ‑> 'a t ord
val get : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to (length a - 1).

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 make : 'a array ‑> int ‑> len:int ‑> 'a t

Create a slice from given offset and length.

  • Raises Invalid_argument: if the slice isn't valid.
val of_slice : ('a array * int * int) ‑> 'a t

Make a sub-array from a triple (arr, i, len) where arr is the array, +i the offset in arr, and len the number of elements of the slice.

  • Raises Invalid_argument: if the slice isn't valid (See make).
val to_slice : 'a t ‑> 'a array * int * int

Convert into a triple (arr, i, len) where len is the length of +the sub-array of arr starting at offset i.

val to_list : 'a t ‑> 'a list

Convert directly to a list.

  • Since: 1.0
val full : 'a array ‑> 'a t

Slice that covers the full array.

val underlying : 'a t ‑> 'a array

Underlying array (shared). Modifying this array will modify the slice.

val copy : 'a t ‑> 'a array

Copy into a new array.

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

Sub-slice.

val set : 'a t ‑> 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.

Raise Invalid_argument "index out of bounds" +if n is outside the range 0 to length a - 1.

val length : _ t ‑> int

Return the length (number of elements) of the given array.

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

fold f x a computes f (... (f (f x a.(0)) a.(1)) ...) a.(n-1), +where n is the length of the array a.

val foldi : ('a ‑> int ‑> 'b ‑> 'a) ‑> 'a ‑> 'b t ‑> 'a

Fold left on array, with index.

val fold_while : ('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> 'a ‑> 'b t ‑> 'a

Fold left on array until a stop condition via ('a, `Stop) is +indicated by the accumulator.

  • Since: 0.8
val iter : ('a ‑> unit) ‑> 'a 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 ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like Array.iter, but the +function is applied with the index of the element as first argument, +and the element itself as second argument.

val blit : 'a t ‑> int ‑> 'a t ‑> int ‑> int ‑> unit

blit v1 o1 v2 o2 len copies len elements +from array v1, starting at element number o1, to array v2, +starting at element number o2. It works correctly even if +v1 and v2 are the same array, and the source and +destination chunks overlap.

Raise Invalid_argument "Array.blit" if o1 and len do not +designate a valid subarray of v1, or if o2 and len do not +designate a valid subarray of v2.

val reverse_in_place : 'a t ‑> unit

Reverse the array in place.

val sorted : ('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a array

sorted cmp a makes a copy of a and sorts it with cmp.

  • Since: 1.0
val sort_indices : ('a ‑> 'a ‑> int) ‑> 'a t ‑> int array

sort_indices cmp 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 cmp a +appears in a. a is not modified.

In other words, map (fun i -> a.(i)) (sort_indices cmp a) = sorted cmp 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 cmp a returns a new array b, with the same length as a, +such that b.(i) is the index at which the i-the element of a appears +in sorted cmp a. a is not modified.

In other words, map (fun i -> (sorted cmp a).(i)) (sort_ranking cmp 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 find : ('a ‑> 'b option) ‑> 'a t ‑> 'b option

find f a returns Some y if there is an element x such +that f x = Some y, else it returns None.

val findi : (int ‑> 'a ‑> 'b option) ‑> 'a t ‑> 'b option

Like find, but also pass the index to the predicate function.

  • Since: 0.3.4
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.

  • Since: 0.3.4
val lookup : cmp:'a ord ‑> 'a ‑> 'a t ‑> int option

Lookup the index of some value in a sorted array.

  • Returns None if the key is not present, or +Some i (i the index of the key) otherwise.
val lookup_exn : cmp:'a ord ‑> 'a ‑> 'a t ‑> int

Like lookup, but

  • Raises Not_found: if the 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 x arr finds the index of the object x in the array arr, +provided arr 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 +(dichotomic search).

  • Returns

    • `At i if cmp arr.(i) x = 0 (for some i).
    • `All_lower if all elements of arr are lower than x.
    • `All_bigger if all elements of arr are bigger than x.
    • `Just_after i if arr.(i) < x < arr.(i+1).
    • `Empty if the array is empty.
  • Raises Invalid_argument: if the array is found to be unsorted w.r.t cmp.
  • Since: 0.13
val for_all : ('a ‑> bool) ‑> 'a t ‑> bool

for_all p [|a1; ...; an|] checks if all elements of the array +satisfy the predicate p. That is, it returns +(p a1) && (p a2) && ... && (p an).

val for_all2 : ('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Forall on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val exists : ('a ‑> bool) ‑> 'a t ‑> bool

exists p [|a1; ...; an|] checks if at least one element of +the array satisfies the predicate p. That is, it returns +(p a1) || (p a2) || ... || (p an).

val exists2 : ('a ‑> 'b ‑> bool) ‑> 'a t ‑> 'b t ‑> bool

Exists on pairs of arrays.

  • Raises Invalid_argument: if they have distinct lengths. +Allow different types.
  • Since: 0.20
val fold2 : ('acc ‑> 'a ‑> 'b ‑> 'acc) ‑> 'acc ‑> 'a t ‑> 'b t ‑> 'acc

Fold on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val iter2 : ('a ‑> 'b ‑> unit) ‑> 'a t ‑> 'b t ‑> unit

Iterate on two arrays stepwise.

  • Raises Invalid_argument: if they have distinct lengths.
  • Since: 0.20
val shuffle : 'a t ‑> unit

Shuffle randomly the array, in place.

val shuffle_with : Random.State.t ‑> 'a t ‑> unit

Like shuffle but using a specialized random state.

val random_choose : 'a t ‑> 'a random_gen

Choose an element randomly.

  • Raises Not_found: if the array/slice is empty.
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of a slice.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of a slice.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of a slice.

IO

val pp : ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print an array of items with printing function.

val pp_i : ?⁠sep:string ‑> (int ‑> 'a printer) ‑> 'a t printer

Print an array, giving the printing function both index and item.

\ No newline at end of file diff --git a/dev/containers/CCBool.odoc b/dev/containers/CCBool.odoc new file mode 100644 index 0000000000000000000000000000000000000000..5d765f7e98795da9c46ee007587b8a222574b81e GIT binary patch literal 866 zcma)4O-NKx6dvpjXhOIU(jt8R%{Zd-p7}#T(bcJu7L}q!uH^dWj`Q%%z2kdtMl5jE zqD8^gP$?s>meC?|C`611LqY;A`av*S1ktKMH?|3)^WHSzvc-YRJ>NO!`@VB{jO&d} z;iF;g+T_ERKA$fD;fE-ND9P6AoH@i`)Usy-kw^#UCf3&1`^z_eNBx`S>Q+LKTe-@8 z`=J6l6!bwHF7)|oeDeS5QGt+hsU1tv(m`xPSKKj5Jk4~+;LOGtqe3YI9qD+ST0*-! z({}vB$&u*m;f1s+7kfBxxGV zp%x=%lv_#Sc%y8gjXt??V5w(e=yb)`-b-uK#V{!c5Za-GJ-2J3lifSP&hDO19~Y&p z@1j-)IA$nR&Y+)ProWdo9BHYW*uJtgCuQwLJwbqCpLy0UTU_;D?Ofh;#&+Lhk!`ju zUDdfo)trrC;8Uck37({?Z6rBUN4Pa)r-)7gmN#APA4nT!OpVbvNt=%LYvBb?d@Hnz z|J;1_Zo6ru9Sb?JGLKp-9U(DZ!B{*HVyb4qT@=Q0GW!@sf;vy8h(*C=Q55Xu4lxyO z#i(VlL4`BL1yjQ81_g*1Cb1NUEAo+;o82Q9=exj~D#I8*#V}|dT}IWpC-S==Q`KN{ zZY-^(!)am)q%yuY=<>{jn9+y+t^YBhE1&+Xp z2t-%Fs!9S53Lt-f99<8^y`zCF$bgjRa+(>?IH%-URVpRWm}kl|s*tY8I3)33k$+iD literal 0 HcmV?d00001 diff --git a/dev/containers/CCBool/.jbuilder-keep b/dev/containers/CCBool/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCBool/index.html b/dev/containers/CCBool/index.html new file mode 100644 index 00000000..fb335818 --- /dev/null +++ b/dev/containers/CCBool/index.html @@ -0,0 +1,2 @@ + +CCBool (containers.CCBool)

Module CCBool

Basic Bool functions

type t = bool
val compare : t ‑> t ‑> int

Total ordering on booleans, similar to Pervasives.compare.

val equal : t ‑> t ‑> bool
val negate : t ‑> t

Negation on booleans (functional version of not).

  • Deprecated since 1.3, simply use not instead.
type 'a printer = Format.formatter ‑> 'a ‑> unit
val pp : t printer
\ No newline at end of file diff --git a/dev/containers/CCChar.odoc b/dev/containers/CCChar.odoc new file mode 100644 index 0000000000000000000000000000000000000000..3f7dc4a193c865a6f503355daf3f147eca42ac17 GIT binary patch literal 2236 zcmbVOU2GIp6y7DXhL%7YqX;Iz)NU8Hw7b*t6Nr*bSzWAz2rM-cjrDfsPWOh{xx?I< zmSQwMK-5H%Tc9OaqnB!hD3Qj55PdKuV2BSGMPnk8NKAN9iM-%XeDT~nyIadoqCQO1 z^q%{j?|kQ+@0Qxs>gddM<&1r!?|qs`Br@=&;JXjLrl~fIdLben4%o3wp-?EJz%-VW zUw-ZQ{JBjRmt8*p!`Xd%)LnaO2JKwd*f!7%G0Y`{Ipa@#m}%9fiUc>d^`f z{4%k)adYcbe*DQ#hCdG;yKwofFU|?Eu7D~o@j@JU$Su;Kg2Ii65sPtS_`}y1oGG2! z_2{yzJD$351Tv*%sodyUWIglB*q0y7e|G1?hw}%12MX~`Zanxv>1et*y6wjDP1{P} ze0^GowyiiA1jIoMkmK4fSB_k3YG1N?#lc_qem5aRYp*Pb8#~<|w&?V^)C-$F{x*E+ z=2s@4TEzk@Z_xnfV~uk_v>~4_(+bWrQlVachz7fuk1PyfwT|Tb`Xl1nc^f+@azkTv z(`f&n`v)c$|8||6y8rt2Zj+0n)7m3knC8ggkr6RAeNro?Eox(~&HKoFm-Df-5?TJ% z0@9cw+e&Qgg(Ms{#pu*YZD)&B4!E{dMQaP>9c^KJ`cz1+ct{sWdYe5TT&{(>kQrA?iyVe$Y z3^}+@wdDOc`V9p&F{^W?=+;gt7B{QdLhubc%2-#KbSLtxkWf!|XrQ)?)g+%xB@^1_ zSu9s5mZ{{tdO-lzut}oD6%rOffdV@HC#E^9WoWoQ7P~u54BxJH@WDvQMUVUz7qS_lH z2HU0pdP^PMr9w~7%&E?Bn2Rm6%c$~tPVqujUiNKM{y%ut7iA{%f9Dk_UQw0To;K?A zfhG0fJsvy{JlpLO=oDz8v{$_}r8z-Q8ai{0+i@5Lo{~XYTC8Aw_+n|R;(-5wCdZ8) z4`d~FU#+2T-3XRaz~DjE0s?JD<) zOw3*KHcGIuI`o*yg`@_{N9OC;jy+gjTXzCl0VN*teZg1iFm@K! z;Xj9X^4}RrC9gJz)gk*sm6DD;0*?y#VQNkSuH6Z()rZ#t7W$5WKV`w9;GqUDiGfo| LWsBNU@Y%ls>Fa6` literal 0 HcmV?d00001 diff --git a/dev/containers/CCChar/.jbuilder-keep b/dev/containers/CCChar/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCChar/index.html b/dev/containers/CCChar/index.html new file mode 100644 index 00000000..34ab697a --- /dev/null +++ b/dev/containers/CCChar/index.html @@ -0,0 +1,9 @@ + +CCChar (containers.CCChar)

Module CCChar

Utils around char

  • Since: 0.14
include module type of sig ... end
external code : char ‑> int = "%identity"
val chr : int ‑> char
val escaped : char ‑> string
val lowercase : char ‑> char
  • Deprecated Use Char.lowercase_ascii instead.
val uppercase : char ‑> char
  • Deprecated Use Char.uppercase_ascii instead.
val lowercase_ascii : char ‑> char
val uppercase_ascii : char ‑> char
type t = char
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external unsafe_chr : int ‑> char = "%identity"
val equal : t ‑> t ‑> bool

The equal function for chars.

val compare : t ‑> t ‑> int

The comparison function for characters, with the same specification as +Pervasives.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 lowercase_ascii : t ‑> t

Convert the given character to its equivalent lowercase character, +using the US-ASCII character set.

  • Since: 0.20
val uppercase_ascii : t ‑> t

Convert the given character to its equivalent uppercase character, +using the US-ASCII character set.

  • Since: 0.20
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 pp_buf : Buffer.t ‑> t ‑> unit

Renamed from pp since 2.0.

val pp : Format.formatter ‑> t ‑> unit

Renamed from print since 2.0.

\ No newline at end of file diff --git a/dev/containers/CCEqual.odoc b/dev/containers/CCEqual.odoc new file mode 100644 index 0000000000000000000000000000000000000000..b15c5d5959502faa4807c47d5380c3cd2a2db8cb GIT binary patch literal 1602 zcma)6L17~YL@@Gad6_qx z?vv`NAZib@4YAmwOskb1M3*221U1k@=|w&0L8%~$hp3t5SRvpM^~qt&877&_UyXYTzIba z^VeLxc{Ovpvc8-^b9LBlPPA@JrY=BQmLIqTgiqgK}C$3%x}>E3&tbc zwygt79d0&Huz>lDhaKw3`rju9wJXnj7T@Mew|;o{tD8za*2KO?13`Fzy=BIIERN!c zI+3i$A6igc|9tuTYqlIT zBJR{2#z`%`con$EYqbvZNiCv23uUyDNQ5Xif$Q|+ZzmwN45o4B~^iTcr3e_U>S zJ2AFP?pr!D5Wg?lQeBo(*=lnVgtyhj-RoAhAV2{*ZV#{Tb^}LH7F5xRZX{5PAi;4E zQ33r{P!#(<5u7>|go8HX#PvuIB30Yo1)c&1$>g>ThWYotly4PVjCtTzTZ0d+W5tkp zu`ao=B7gz&HqxF{TSWArVG6(p*z4AcRWhswe7YQVVo()(nqYoJkb3u_;f}Ccn!`Fc zBJd|+MxcQ47nJT!d(z%snTp_M!K$<-G_G#qsV_~rU@jxALptF}onW0xLvNQ{k6|IL ziuOKjz=5 zYQOnzddp=CQy^sM5ovvrWPi60dBumlnKORM0AHWPn)f3~@w+RKL(uvSbz(>{!XUNK zQJGX%tEm&i&coYmBbO4dJ!43rl_2jhKg68q##ls9$`67^=qwc-V0&0MKUd8!^{@}( z9LcNxoVgV|GuT2UA4fxy4eWJ+i@8X|Ap!7g8B)+Jn#MCq9zm^G3qX0^r5xZI#{v=v zcsJYd2lIgO7>#q;c_TQiQZBm)CQhZjTq-Y|dtydErN*(qr9CYtg~C9i3#%Ivw(mt7 zAcoZtoHkse62=KCX;%5ywOsbglHr0{r}};KYRB)X&g=iK^V)yaF?$BTB=8dh=O0kz Bdk+8r literal 0 HcmV?d00001 diff --git a/dev/containers/CCEqual/.jbuilder-keep b/dev/containers/CCEqual/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCEqual/Infix/index.html b/dev/containers/CCEqual/Infix/index.html new file mode 100644 index 00000000..a69ba8ed --- /dev/null +++ b/dev/containers/CCEqual/Infix/index.html @@ -0,0 +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 diff --git a/dev/containers/CCEqual/index.html b/dev/containers/CCEqual/index.html new file mode 100644 index 00000000..77d10d54 --- /dev/null +++ b/dev/containers/CCEqual/index.html @@ -0,0 +1,7 @@ + +CCEqual (containers.CCEqual)

Module CCEqual

Equality Combinators

  • Since: 1.2
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 (>|=) : 'b t ‑> ('a ‑> 'b) ‑> 'a t

Infix equivalent of map.

module Infix : sig ... end
\ No newline at end of file diff --git a/dev/containers/CCFloat.odoc b/dev/containers/CCFloat.odoc new file mode 100644 index 0000000000000000000000000000000000000000..a374701f1c3a58d8a4ccc3c717492b7a50386b2c GIT binary patch literal 4264 zcma)9e~c7Y9pBx16FE>yjIESfeaGzH&fe|q?j0wk2z21!D7L+${4fF2oO83Yw^L?k zwllN$qczk-BU&|?MScjh_CX7XQb1cc`ore1Xdx7|g<=m$+r-v{f&#IPsg2R^`!V!5 zj@mzVGw;36_xF$YeNNudo0>B%ncVl*?|3m1i6r4C!S4(3o3yV%cWhrXZNv4pCfnND zEl2a!-0TJ22miKt&&e~-e|YrYlhSu_(n+0>2zoaXnYcU>`P`Cmkw`p3J|zPb3kVsU ztCFC$VV>rhI(Ev2tNEs5d)TpYfyy=Qo~E*6+CH``rEbtjRmo2ixyU;#dvwe6+h3dA*Z%tlj$dkTKc6C`sjclE$977NTP~V+)qMZ6$4u;<4U2bb<$HUBGbFZ;&J8>u7?2y#=txO7vz zef_}h}X2d}EZzE;oGv%2FNSrOC>SYMmX7M+rj^~{oEXZsv?l~>ku18`vuWV^a6 zrj^g;je=IO{M_kVmJJ_0*PmEY`SA7X@DF}BR}IM8q3!7IIzJ$)I;5(>lR>Z{!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|HaAwDl1uT>U^`8)z&Ce(KtbfKFbKv4RF1{M52;SLlSx_ zkkGfP>!8%PN$44vzQ|liNGXbFdP(R7*pZ?U^bubUp-bo@dXFy-qqoqTXqYdKpcCjg zI>HyPpx>ew&>&y@3GGI|LOb~46ugx-qqThT23mu@k5===S>z!X-Om?qBOP_4m3;9I M>O>vzz);oy0prVcNdN!< literal 0 HcmV?d00001 diff --git a/dev/containers/CCFloat/.jbuilder-keep b/dev/containers/CCFloat/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCFloat/Infix/index.html b/dev/containers/CCFloat/Infix/index.html new file mode 100644 index 00000000..6d8c0861 --- /dev/null +++ b/dev/containers/CCFloat/Infix/index.html @@ -0,0 +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 diff --git a/dev/containers/CCFloat/index.html b/dev/containers/CCFloat/index.html new file mode 100644 index 00000000..8b74ab5b --- /dev/null +++ b/dev/containers/CCFloat/index.html @@ -0,0 +1,8 @@ + +CCFloat (containers.CCFloat)

Module CCFloat

Basic operations on floating-point numbers

  • Since: 0.6.1
type t = float
type fpclass = Pervasives.fpclass =
| FP_normal
| FP_subnormal
| FP_zero
| FP_infinite
| FP_nan
val nan : t

Equal to Pervasives.nan.

val max_value : t

Positive infinity. Equal to Pervasives.infinity.

val min_value : t

Negative infinity. Equal to Pervasives.neg_infinity.

val max_finite_value : t

Equal to Pervasives.max_float.

val epsilon : t

The smallest positive float x such that 1.0 +. x <> 1.0. +Equal to Pervasives.epsilon_float.

val is_nan : t ‑> bool

is_nan f returns true if f is NaN, false otherwise.

val add : t ‑> t ‑> t

Equal to (+.).

val sub : t ‑> t ‑> t

Equal to (-.).

val neg : t ‑> t

Equal to (~-.).

val abs : t ‑> t

The absolute value of a floating-point number. +Equal to Pervasives.abs_float.

val scale : t ‑> t ‑> t

Equal to ( *. ).

val min : t ‑> t ‑> t
val max : t ‑> t ‑> t
val equal : t ‑> t ‑> bool
val compare : t ‑> t ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = 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 f returns the closest integer value, either above or below.

  • 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 : string ‑> t

Alias to float_of_string.

  • Deprecated since 1.2, use of_string_exn instead.
  • Raises Failure: in case of failure.
val equal_precision : epsilon:t ‑> t ‑> t ‑> bool

Equality with allowed error up to a non negative epsilon value.

val classify : t ‑> fpclass

Return the class of the given floating-point number: +normal, subnormal, zero, infinite or nan (not a number).

Infix Operators

  • Since: 0.17
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 diff --git a/dev/containers/CCFormat.odoc b/dev/containers/CCFormat.odoc new file mode 100644 index 0000000000000000000000000000000000000000..993e0ef84dd433166efeeb9b21d5e467bdfd4906 GIT binary patch literal 18641 zcmcIs3wRsVv9{!0$x@t$V^dxqbS>Mm<=C?0I3bDiP!jSguRsF1B_w7ot!!ag5?U#a z385ECfj%f}5<-C%#3O`K3L%tIxCK%urL?p>OKuBXD22X&0Jk^oEwuE`oSCz`vJ(jX zZrjgjwdbEXb7tnu%y}r;L^j?&J=zuRy!fhHAF8ORXn{W!{tkn`nq95&Y^I>6GDhCK zv1Q4UW!e0YUWj!*^X;=AS`m3+&HAD5O+5NdWdhNz7zVOyD=HTJqM~B%m#Zo&8Y@bN z%0cm3rP6(iVkN6<9coj<(n zv2%a+?y_ZXMoOjjB}-1qX0k)sd~P5Ww>tN)+SPI0DG!W1kze}wude_3qova9CHhc0 zl_?ncjGiXui*+*#9zWHuT=C@D z&$VuPb5YDHUAbq6GQY(%&Mg|5xM7uIu|1`dRj7~hcMKkHv8?Tl#Z0OYgC|9W zmeMtQl+!Kc@X>9fqk_YR2p9!C0Q6@m^?QK!mYYYF;}t)GuiABolA4yw^=5NMrnfJ< z$x_;OBd;AwPMHdQUodnv<+|Co=TL`?rl|&=t_Xv5ZK-?`5s>d6( z`DF?A7{RV#hF=r#M;Kl^jW{y)1;XwSn5P({bpXp;9_-g^7T}}bQhr0Y`-tcEFufO4 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P|) zweBCx|2Sx;-3!nB5{9_L>KTL$LPvG2ay{c2Y9s5=4osP{D;(DC(8r|?0H&O?HRQRNI|UiBv$_n32-6Mz{txk_4sQSe literal 0 HcmV?d00001 diff --git a/dev/containers/CCFormat/.jbuilder-keep b/dev/containers/CCFormat/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCFormat/Dump/index.html b/dev/containers/CCFormat/Dump/index.html new file mode 100644 index 00000000..b488489f --- /dev/null +++ b/dev/containers/CCFormat/Dump/index.html @@ -0,0 +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.result t
val result' : 'a t ‑> 'e t ‑> ('a'e) Result.result t
val to_string : 'a t ‑> 'a ‑> string
\ No newline at end of file diff --git a/dev/containers/CCFormat/index.html b/dev/containers/CCFormat/index.html new file mode 100644 index 00000000..cdb21fb0 --- /dev/null +++ b/dev/containers/CCFormat/index.html @@ -0,0 +1,44 @@ + +CCFormat (containers.CCFormat)

Module CCFormat

Helpers for Format

  • Since: 0.8
type 'a sequence = ('a ‑> unit) ‑> unit
include module type of sig ... end
type formatter = Format.formatter
val pp_open_box : formatter ‑> int ‑> unit
val open_box : int ‑> unit
val pp_close_box : formatter ‑> unit ‑> unit
val close_box : unit ‑> unit
val pp_open_hbox : formatter ‑> unit ‑> unit
val open_hbox : unit ‑> unit
val pp_open_vbox : formatter ‑> int ‑> unit
val open_vbox : int ‑> unit
val pp_open_hvbox : formatter ‑> int ‑> unit
val open_hvbox : int ‑> unit
val pp_open_hovbox : formatter ‑> int ‑> unit
val open_hovbox : int ‑> unit
val pp_print_string : formatter ‑> string ‑> unit
val print_string : string ‑> unit
val pp_print_as : formatter ‑> int ‑> string ‑> unit
val print_as : int ‑> string ‑> unit
val pp_print_int : formatter ‑> int ‑> unit
val print_int : int ‑> unit
val pp_print_float : formatter ‑> float ‑> unit
val print_float : float ‑> unit
val pp_print_char : formatter ‑> char ‑> unit
val print_char : char ‑> unit
val pp_print_bool : formatter ‑> bool ‑> unit
val print_bool : bool ‑> unit
val pp_print_space : formatter ‑> unit ‑> unit
val print_space : unit ‑> unit
val pp_print_cut : formatter ‑> unit ‑> unit
val print_cut : unit ‑> unit
val pp_print_break : formatter ‑> int ‑> int ‑> unit
val print_break : int ‑> int ‑> unit
val pp_force_newline : formatter ‑> unit ‑> unit
val force_newline : unit ‑> unit
val pp_print_if_newline : formatter ‑> unit ‑> unit
val print_if_newline : unit ‑> unit
val pp_print_flush : formatter ‑> unit ‑> unit
val print_flush : unit ‑> unit
val pp_print_newline : formatter ‑> unit ‑> unit
val print_newline : unit ‑> unit
val pp_set_margin : formatter ‑> int ‑> unit
val set_margin : int ‑> unit
val pp_get_margin : formatter ‑> unit ‑> int
val get_margin : unit ‑> int
val pp_set_max_indent : formatter ‑> int ‑> unit
val set_max_indent : int ‑> unit
val pp_get_max_indent : formatter ‑> unit ‑> int
val get_max_indent : unit ‑> int
val pp_set_max_boxes : formatter ‑> int ‑> unit
val set_max_boxes : int ‑> unit
val pp_get_max_boxes : formatter ‑> unit ‑> int
val get_max_boxes : unit ‑> int
val pp_over_max_boxes : formatter ‑> unit ‑> bool
val over_max_boxes : unit ‑> bool
val pp_open_tbox : formatter ‑> unit ‑> unit
val open_tbox : unit ‑> unit
val pp_close_tbox : formatter ‑> unit ‑> unit
val close_tbox : unit ‑> unit
val pp_set_tab : formatter ‑> unit ‑> unit
val set_tab : unit ‑> unit
val pp_print_tab : formatter ‑> unit ‑> unit
val print_tab : unit ‑> unit
val pp_print_tbreak : formatter ‑> int ‑> int ‑> unit
val print_tbreak : int ‑> int ‑> unit
val pp_set_ellipsis_text : formatter ‑> string ‑> unit
val set_ellipsis_text : string ‑> unit
val pp_get_ellipsis_text : formatter ‑> unit ‑> string
val get_ellipsis_text : unit ‑> string
type tag = string
val pp_open_tag : formatter ‑> string ‑> unit
val open_tag : tag ‑> unit
val pp_close_tag : formatter ‑> unit ‑> unit
val close_tag : unit ‑> unit
val pp_set_tags : formatter ‑> bool ‑> unit
val set_tags : bool ‑> unit
val pp_set_print_tags : formatter ‑> bool ‑> unit
val set_print_tags : bool ‑> unit
val pp_set_mark_tags : formatter ‑> bool ‑> unit
val set_mark_tags : bool ‑> unit
val pp_get_print_tags : formatter ‑> unit ‑> bool
val get_print_tags : unit ‑> bool
val pp_get_mark_tags : formatter ‑> unit ‑> bool
val get_mark_tags : unit ‑> bool
val pp_set_formatter_out_channel : formatter ‑> Pervasives.out_channel ‑> unit
val set_formatter_out_channel : Pervasives.out_channel ‑> unit
val pp_set_formatter_output_functions : formatter ‑> (string ‑> int ‑> int ‑> unit) ‑> (unit ‑> unit) ‑> unit
val set_formatter_output_functions : (string ‑> int ‑> int ‑> unit) ‑> (unit ‑> unit) ‑> unit
val pp_get_formatter_output_functions : formatter ‑> unit ‑> (string ‑> int ‑> int ‑> unit) * (unit ‑> unit)
val get_formatter_output_functions : unit ‑> (string ‑> int ‑> int ‑> unit) * (unit ‑> unit)
type formatter_out_functions = Format.formatter_out_functions = {
out_string : string ‑> int ‑> int ‑> unit;
out_flush : unit ‑> unit;
out_newline : unit ‑> unit;
out_spaces : int ‑> unit;
out_indent : int ‑> unit;
}
val pp_set_formatter_out_functions : formatter ‑> formatter_out_functions ‑> unit
val set_formatter_out_functions : formatter_out_functions ‑> unit
val pp_get_formatter_out_functions : formatter ‑> unit ‑> formatter_out_functions
val get_formatter_out_functions : unit ‑> formatter_out_functions
type formatter_tag_functions = Format.formatter_tag_functions = {
mark_open_tag : tag ‑> string;
mark_close_tag : tag ‑> string;
print_open_tag : tag ‑> unit;
print_close_tag : tag ‑> unit;
}
val pp_set_formatter_tag_functions : formatter ‑> formatter_tag_functions ‑> unit
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
val formatter_of_out_channel : Pervasives.out_channel ‑> formatter
val std_formatter : formatter
val err_formatter : formatter
val formatter_of_buffer : Buffer.t ‑> formatter
val stdbuf : Buffer.t
val str_formatter : formatter
val flush_str_formatter : unit ‑> string
val make_formatter : (string ‑> int ‑> int ‑> unit) ‑> (unit ‑> unit) ‑> formatter
val formatter_of_out_functions : formatter_out_functions ‑> formatter
type symbolic_output_item = Format.symbolic_output_item =
| Output_flush
| Output_newline
| Output_string of string
| Output_spaces of int
| Output_indent of int
type symbolic_output_buffer = Format.symbolic_output_buffer
val make_symbolic_output_buffer : unit ‑> symbolic_output_buffer
val clear_symbolic_output_buffer : symbolic_output_buffer ‑> unit
val get_symbolic_output_buffer : symbolic_output_buffer ‑> symbolic_output_item list
val flush_symbolic_output_buffer : symbolic_output_buffer ‑> symbolic_output_item list
val add_symbolic_output_item : symbolic_output_buffer ‑> symbolic_output_item ‑> unit
val formatter_of_symbolic_output_buffer : symbolic_output_buffer ‑> formatter
val pp_print_list : ?⁠pp_sep:(formatter ‑> unit ‑> unit) ‑> (formatter ‑> 'a ‑> unit) ‑> formatter ‑> 'a list ‑> unit
val pp_print_text : formatter ‑> string ‑> unit
val fprintf : formatter ‑> ('aformatter, unit) Pervasives.format ‑> 'a
val printf : ('aformatter, unit) Pervasives.format ‑> 'a
val eprintf : ('aformatter, unit) Pervasives.format ‑> 'a
val sprintf : ('a, unit, string) Pervasives.format ‑> 'a
val asprintf : ('aformatter, unit, string) Pervasives.format4 ‑> 'a
val ifprintf : formatter ‑> ('aformatter, unit) Pervasives.format ‑> 'a
val kfprintf : (formatter ‑> 'a) ‑> formatter ‑> ('bformatter, unit, 'a) Pervasives.format4 ‑> 'b
val ikfprintf : (formatter ‑> 'a) ‑> formatter ‑> ('bformatter, unit, 'a) Pervasives.format4 ‑> 'b
val ksprintf : (string ‑> 'a) ‑> ('b, unit, string, 'a) Pervasives.format4 ‑> 'b
val kasprintf : (string ‑> 'a) ‑> ('bformatter, unit, 'a) Pervasives.format4 ‑> 'b
val bprintf : Buffer.t ‑> ('aformatter, unit) Pervasives.format ‑> 'a
val kprintf : (string ‑> 'a) ‑> ('b, unit, string, 'a) Pervasives.format4 ‑> 'b
  • Deprecated Use Format.ksprintf instead.
val set_all_formatter_output_functions : out:(string ‑> int ‑> int ‑> unit) ‑> flush:(unit ‑> unit) ‑> newline:(unit ‑> unit) ‑> spaces:(int ‑> unit) ‑> unit
  • Deprecated Use Format.set_formatter_out_functions instead.
val get_all_formatter_output_functions : unit ‑> (string ‑> int ‑> int ‑> unit) * (unit ‑> unit) * (unit ‑> unit) * (int ‑> unit)
  • Deprecated Use Format.get_formatter_out_functions instead.
val pp_set_all_formatter_output_functions : formatter ‑> out:(string ‑> int ‑> int ‑> unit) ‑> flush:(unit ‑> unit) ‑> newline:(unit ‑> unit) ‑> spaces:(int ‑> unit) ‑> unit
  • Deprecated Use Format.pp_set_formatter_out_functions instead.
val pp_get_all_formatter_output_functions : formatter ‑> unit ‑> (string ‑> int ‑> int ‑> unit) * (unit ‑> unit) * (unit ‑> unit) * (int ‑> unit)
  • Deprecated Use Format.pp_get_formatter_out_functions instead.
type t = Format.formatter
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 newline : unit printer

Force newline (see Format.pp_force_newline).

  • Since: 1.2
val substring : (string * int * int) printer

Print 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 char : char printer
  • Since: 0.14
val int32 : int32 printer
  • Since: 0.14
  • Since: 0.14
val int64 : int64 printer
  • Since: 0.14
  • Since: 0.14
val nativeint : nativeint printer
  • Since: 0.14
  • 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 sequence 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 ‑> 'a printer ‑> 'b printer ‑> 'c printer ‑> 'd printer ‑> ('a * 'b * 'c * 'd) printer
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) Pervasives.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 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;;
+
+      Format.printf
+        "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 ‑> ('at, unit, unit) Pervasives.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 ‑> ('at, unit, string) Pervasives.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 ‑> ('at, unit, 'b) Pervasives.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

IO

val output : t ‑> 'a printer ‑> 'a ‑> unit
val to_string : 'a printer ‑> 'a ‑> string
val of_chan : Pervasives.out_channel ‑> t

Alias to Format.formatter_of_out_channel.

  • Since: 1.2
val with_out_chan : Pervasives.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 : ('at, unit, string) Pervasives.format4 ‑> 'a

Print into a string any format string that would usually be compatible +with fprintf. Like Format.asprintf.

val sprintf_no_color : ('at, unit, string) Pervasives.format4 ‑> 'a

Like sprintf but never prints colors.

  • Since: 0.16
val sprintf_dyn_color : colors:bool ‑> ('at, unit, string) Pervasives.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 ‑> ('at, unit) Pervasives.format ‑> 'a

Alias to Format.fprintf.

  • Since: 0.14
val fprintf_dyn_color : colors:bool ‑> t ‑> ('at, unit) Pervasives.format ‑> 'a

Like fprintf but enable/disable colors depending on colors.

  • Since: 0.21
val ksprintf : ?⁠margin:int ‑> f:(string ‑> 'b) ‑> ('a, Format.formatter, unit, 'b) Pervasives.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 ‑> ('at, unit, unit) Pervasives.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
\ No newline at end of file diff --git a/dev/containers/CCFun.odoc b/dev/containers/CCFun.odoc new file mode 100644 index 0000000000000000000000000000000000000000..81786fc98eed8a0406fca7389d2a13bc72ae21c9 GIT binary patch literal 3536 zcmbtXU1%KF6<*1s)GIf}4=pJH)4S2GcGuR<{x~U$6^l_eacW42Y28q0UH59{j`r5G zGut~emNqyc4~4$;VdRhm8feE((&nMKLVhp=QrxCAX+( zv(kzrxKwDhckaD&&iT&y?su*NC$L*xvuAdG^wKYWQ!15e_{`z+C47$UoUj8w;?fr? zyk6_~&&Iyh>3=-?roa2&!$1D+Z~t`YzL~eP7w;XHN{3!6m5$s~DwY3zxKyf^(z|-y zm`&33_L`L@?MHbiZ3ZWHBm+OREXz2YrmcSeslX40ff@~@opk4nN}+kp~ojn{xuZ+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JIU^7?xKi7ksuU zBXncjF}84)onVOnG|*lJ!!?^zlkn+8p+nn2wg@##lMipq9Xg&FOj66*zLD(QGRkX} zZ*Qm9?z~}qp%Nv=(L4C(0Y8bAO@4(Y@4J(x2#=;I>Nk^H#^RcByb_TTz%pIXTZ`G{ z2Z1LI9W?$U!Tl|p#p}hb3aH;OETf?<>Q|qrHCC^lX(q+ZGuK?dZb}qPmLEWLs`}*bhIqt literal 0 HcmV?d00001 diff --git a/dev/containers/CCFun/.jbuilder-keep b/dev/containers/CCFun/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCFun/Monad/argument-1-X/index.html b/dev/containers/CCFun/Monad/argument-1-X/index.html new file mode 100644 index 00000000..2aecaebc --- /dev/null +++ b/dev/containers/CCFun/Monad/argument-1-X/index.html @@ -0,0 +1,2 @@ + +1-X (containers.CCFun.Monad.1-X)

Parameter CCFun.Monad.1-X

type t
\ No newline at end of file diff --git a/dev/containers/CCFun/Monad/index.html b/dev/containers/CCFun/Monad/index.html new file mode 100644 index 00000000..67350d69 --- /dev/null +++ b/dev/containers/CCFun/Monad/index.html @@ -0,0 +1,2 @@ + +Monad (containers.CCFun.Monad)

Module CCFun.Monad

Parameters

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 diff --git a/dev/containers/CCFun/index.html b/dev/containers/CCFun/index.html new file mode 100644 index 00000000..744a839b --- /dev/null +++ b/dev/containers/CCFun/index.html @@ -0,0 +1,18 @@ + +CCFun (containers.CCFun)

Module CCFun

Basic Functions

val (|>) : 'a ‑> ('a ‑> 'b) ‑> 'b

A 'pipe' operator. x |> f is the same as f x.

val compose : ('a ‑> 'b) ‑> ('b ‑> 'c) ‑> 'a ‑> 'c

Composition. compose f g x is g (f x).

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 (%>) : ('a ‑> 'b) ‑> ('b ‑> 'c) ‑> 'a ‑> 'c

Alias to compose.

val (@@) : ('a ‑> 'b) ‑> 'a ‑> 'b

f @@ x is the same as f x, but right-associative.

  • Since: 0.5
val id : 'a ‑> 'a

Identity function.

val const : 'a ‑> 'b ‑> 'a

Produce a function that just returns its first argument. +const x y = x for any y.

val flip : ('a ‑> 'b ‑> 'c) ‑> 'b ‑> 'a ‑> 'c

Reverse the order of arguments for a binary function.

val curry : (('a * 'b) ‑> 'c) ‑> 'a ‑> 'b ‑> 'c

Convert a function which accepts a pair of arguments into a function which accepts two arguments. +curry f x y is f (x,y).

val uncurry : ('a ‑> 'b ‑> 'c) ‑> ('a * 'b) ‑> 'c

Convert a function which accepts a two arguments into a function which accepts a pair of arguments. +uncurry f (x,y) is f x y.

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 Pervasives.compare
val (%) : ('b ‑> 'c) ‑> ('a ‑> 'b) ‑> 'a ‑> 'c

Mathematical composition. (%) f g x is f (g x).

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.

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.

  • 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.

  • 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

Monad

Functions with a fixed domain are monads in their codomain.

module Monad : functor (X : sig ... end) -> sig ... end
\ No newline at end of file diff --git a/dev/containers/CCHash.odoc b/dev/containers/CCHash.odoc new file mode 100644 index 0000000000000000000000000000000000000000..d9dad901437ff604c534f8fc1420c7d2f2ebe897 GIT binary patch literal 2950 zcmb_eYm5{{5Z=eE!jh0PDnXOeK6Y>K!QJfM6A(z|I8ZS164XQzpl`SDc5<^b>&)!I z5;QS^A0+%3ARG#jjJ#rq!a-tC@qt2u1_S6HqcKDcXfP6ui9d`Itm?5OfiD5y1Mt<2wdNh$r>4zZ@AXW7|5EA|jod5m z%(!sR#@ls0NB;cjPRqN03FI_A5{X}pM3NuF*EA&(Nk_u}hSy?27@p}f!XSqZNZu(8 zm^Sqt*E0-5n-YfY{r$@w+bKD2xoGBt+#jpPvIkbaSN+Uga`Bskm(Pdc+$6uI<$57m-e&~i{s2>51gXwm%mz){^i9XcEW_RBj%vAd z5%LF%U}~z5piD-nRbj;R2qk651M?9WL7GF%)eYmEVFX8lU^E3&ilnc>pTsa&vGeGK z3_7l$^N2G@{A!tzaM!FR8U_tW1zsB{kOZd<5P8uYT^

0wKT^X7Q) zbNj4KwCWL;`4!hDIZicLv3L^ZknOmpJw%wrO3d~>J-K8vEtM_y7`UE?HKaF}sp%5W z=XQd)1?mf;u`E)eWrBJS%$u8M(OGSz1GJ4vY8NJ^I$>&R6M=mEA|oCxF`jN48L0Tg zcKnHHDv1Up5u_RJNpK0mrcdZ8}aaLe(grk?M2l ze380=R*&k{LX9(0eWekIyE+4{4fPwjUQ9`YYdGrd4z&4b;EWsec1wd>EpXnTwlF~L zNi=$i8%<10!@nCn%gi&ZgDx%+kC?<_Hmo)ESr~Mxn&69uwy>hQ*+z6-C+2LhZ0`tz zG?pNgi5CW$Bsj&IX_O4(MKYQZ`zK50M+4&;!??6tBAi6DP1*$74xImhYadqHd1=dp zqSZ!4(Ou#tj&@)0?6_8xJr;Q)`g9|8U0MyalLByk9Pl#-2z4!DIOUYV!KcFhwz5w| z;~bCyE!2H2Vp|$ZFVMc{kVJF_SIR*>3eV%@yLJL6FA|dN*$zU%b6sfT|P7Ywx8VZ8BI+>X(B>SC| zIklmNs`xt9TmmRChoj0uoHkS=mEb2lFwW{(GnH-0n40mNvOEzP1LcfKg#YW-} zSUPXSFpq`FU42sHYGDhO*ao<>O6YG+KL`~#3fQPe;M&B_i?#knfSX!pKu_t@$y0#w zAW`ZQ>N3J$BP>!WW3wqUR}eUMl6R{j1*%CcNVb=pT7_#o9v<5DkpJD!XT(m#@~yn8 z|7(o(7~>+H^x;wX--3*3<3YxfB1j^GoVXNw;La9Z_O3^O*w#I8_2AP055RAt7-Nl` zL=K*S6%m(LBDP#+f4o_OI)g;)UTOH8T)NmgzN4}A()g@0?gHbP(zvLMEhUr%%9E(8 z3e^p$c8PjX8NaNA?Mm1o;5#M!rh@mtNqSB;xa$J*Zx0!<~?bjn=**)K-k9 zEAY-iHZ6hA2@YGG8e%pePShgMdPCHPv>s|4=8ZfNyKuMtY-2Ah+NsnE(}EY| zsdPWSr({ +CCHash (containers.CCHash)

Module CCHash

Hash combinators

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 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 if_ : bool ‑> 'a t ‑> 'a t ‑> 'a t

Decide which hash function to use depending on the boolean.

val poly : 'a t

The regular polymorphic hash function. +poly x is Hashtbl.hash x.

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 sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
val seq : 'a t ‑> 'a sequence t
val gen : 'a t ‑> 'a gen t
val klist : 'a t ‑> 'a klist t
\ No newline at end of file diff --git a/dev/containers/CCHashtbl.odoc b/dev/containers/CCHashtbl.odoc new file mode 100644 index 0000000000000000000000000000000000000000..3e67b9d29e8c50fcfb06533154f253ed7958e821 GIT binary patch literal 9687 zcmeHN4Uk+_m7dpq?@YSIz*-BzpU9g`&tEdr(-UGsh*>&}PKX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(6UO|7o1^Q}5(9ad% zvl;531hV~g)cper@%My{yMVI&)M)L;ObcDmekPxj+8L`$RvAaf>G5vaoLR6v5Tp5g z6OG)BdEj3vFvp z*|fL&lQ>Q9eo&}om{}%vIJ)7oZX{dZ1CSR1!H5=Cc`FG5IR#zdsK(Qr->kXE-KJ}# zhMFt37qp+QmD*K`?NfPOkw5ne?C-%wHZ)li=jIo*^$akrczf{W_vQrY(;-=ge2_Va zY;sna8*Ox)rc5TW^ws9jNo@{wbVb6xpB2!tDth9H``Ifxu88D*`Jz3cOA*>%**&3- zZ4v*^DgG~w`F~FFUyu0z_(|-BQ#91s&^a33#W!m!qWG5h(*L&!PWaAg;(LUL?Cgnq zU%tI>qWXPdp2gh$Pf7;wi)HZG$!&PkT`K#t#9JhkeCAno4;F z!}zhBZD}i>&~G^i`GE$mj!W<==L^50Dl288$qRq0ZdZpLWBqo7m9IdFfo#dfl$`vX zxA}ZX-nLZ_#k;ct+g{mn3o$B}EllfXW!2_)R-)gbcrnp)wD{j)!9ne=yQ8 zqZdnmKP@&;kUU6|`U7>?I-ZW%N6(sMqJ+J#>2+fLtF5(@-dZEIx2rg#`e|f}$&@Mu zWa`X@d8X70n7cv@vz!%_`jYYjvG3KsS|qe2+J~@Tk`(%rEGsLIm8R%inzDDxHbh_J3LB17HO+VIUh30zl(#Sytknv`AxOAlUMS2DZfU46e80*GFy!)v_;aJ>brvd zUlvO?b^duvvt=dy4&N+po2{Dp-RQXOk!id@-Wu-Q8RV(`GLNp@9&CJBoV7_T>%?Ej b@K&ea=)hpRrKP8C6KC+R+vzWN)W81)MCDeZ literal 0 HcmV?d00001 diff --git a/dev/containers/CCHashtbl/.jbuilder-keep b/dev/containers/CCHashtbl/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCHashtbl/Poly/index.html b/dev/containers/CCHashtbl/Poly/index.html new file mode 100644 index 00000000..a3321b61 --- /dev/null +++ b/dev/containers/CCHashtbl/Poly/index.html @@ -0,0 +1,21 @@ + +Poly (containers.CCHashtbl.Poly)

Module CCHashtbl.Poly

val get : ('a'b) Hashtbl.t ‑> 'a ‑> 'b option

Safe version of Hashtbl.find.

val get_or : ('a'b) 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) Hashtbl.t ‑> 'a sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : ('a'b) Hashtbl.t ‑> 'b sequence

Iterate on values in the table.

val keys_list : ('a'b) Hashtbl.t ‑> 'a list

keys_list t is the list of keys in t. +If the key is in the Hashtable multiple times, all occurrences will be returned.

  • Since: 0.8
val values_list : ('a'b) Hashtbl.t ‑> 'b list

values_list t is the list of values in t.

  • Since: 0.8
val map_list : ('a ‑> 'b ‑> 'c) ‑> ('a'b) Hashtbl.t ‑> 'c list

Map on a hashtable's items, collect into a list.

val incr : ?⁠by:int ‑> ('a, int) 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) Hashtbl.t ‑> 'a ‑> unit

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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) sequence

Iterate on bindings in the table.

val add_list : ('a'b list) 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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val of_seq : ('a * 'b) sequence ‑> ('a'b) Hashtbl.t

From the given bindings, added in order.

val add_seq_count : ('a, int) Hashtbl.t ‑> 'a sequence ‑> 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.

  • Since: 0.16
val of_seq_count : 'a sequence ‑> ('a, int) Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : ('a'b) Hashtbl.t ‑> ('a * 'b) list

List of bindings (order unspecified).

val of_list : ('a * 'b) list ‑> ('a'b) Hashtbl.t

Build a table from the given list 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 update : ('a'b) 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) 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 : 'a printer ‑> 'b printer ‑> ('a'b) Hashtbl.t printer
\ No newline at end of file diff --git a/dev/containers/CCHashtbl/index.html b/dev/containers/CCHashtbl/index.html new file mode 100644 index 00000000..8ebc49c4 --- /dev/null +++ b/dev/containers/CCHashtbl/index.html @@ -0,0 +1,21 @@ + +CCHashtbl (containers.CCHashtbl)

Module CCHashtbl

Extension to the standard Hashtbl

  • Since: 0.4
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a eq = 'a ‑> 'a ‑> bool
type 'a hash = 'a ‑> int
type 'a printer = 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) Hashtbl.t ‑> 'a ‑> 'b option

Safe version of Hashtbl.find.

val get_or : ('a'b) 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) Hashtbl.t ‑> 'a sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : ('a'b) Hashtbl.t ‑> 'b sequence

Iterate on values in the table.

val keys_list : ('a'b) Hashtbl.t ‑> 'a list

keys_list t is the list of keys in t. +If the key is in the Hashtable multiple times, all occurrences will be returned.

  • Since: 0.8
val values_list : ('a'b) Hashtbl.t ‑> 'b list

values_list t is the list of values in t.

  • Since: 0.8
val map_list : ('a ‑> 'b ‑> 'c) ‑> ('a'b) Hashtbl.t ‑> 'c list

Map on a hashtable's items, collect into a list.

val incr : ?⁠by:int ‑> ('a, int) 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) Hashtbl.t ‑> 'a ‑> unit

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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) sequence

Iterate on bindings in the table.

val add_list : ('a'b list) 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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val of_seq : ('a * 'b) sequence ‑> ('a'b) Hashtbl.t

From the given bindings, added in order.

val add_seq_count : ('a, int) Hashtbl.t ‑> 'a sequence ‑> 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.

  • Since: 0.16
val of_seq_count : 'a sequence ‑> ('a, int) Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : ('a'b) Hashtbl.t ‑> ('a * 'b) list

List of bindings (order unspecified).

val of_list : ('a * 'b) list ‑> ('a'b) Hashtbl.t

Build a table from the given list 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 update : ('a'b) 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) 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 : 'a printer ‑> 'b printer ‑> ('a'b) Hashtbl.t printer

Functor

module type S : sig ... end
module Make : functor (X : Hashtbl.HashedType) -> S with type Make.key = X.t and type 'a Make.t = 'a Hashtbl.Make(X).t
\ No newline at end of file diff --git a/dev/containers/CCHashtbl/module-type-S/index.html b/dev/containers/CCHashtbl/module-type-S/index.html new file mode 100644 index 00000000..54d7a5df --- /dev/null +++ b/dev/containers/CCHashtbl/module-type-S/index.html @@ -0,0 +1,21 @@ + +S (containers.CCHashtbl.S)

Module type CCHashtbl.S

include Hashtbl.S
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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> Hashtbl.statistics
val get : 'a t ‑> key ‑> 'a option

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

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 sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : 'a t ‑> 'a sequence

Iterate on values in the table.

val keys_list : _ t ‑> key list

keys_list t is the list of keys in t. +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_seq : 'a t ‑> (key * 'a) sequence

Iterate on values in the table.

val of_seq : (key * 'a) sequence ‑> 'a t

From the given bindings, added in order.

val add_seq : 'a t ‑> (key * 'a) sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val add_seq_count : int t ‑> key sequence ‑> 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.

  • Since: 0.16
val of_seq_count : key sequence ‑> int t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : 'a t ‑> (key * 'a) list

List of bindings (order unspecified).

val of_list : (key * 'a) list ‑> 'a t

Build a table from the given list 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 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 : key printer ‑> 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/dev/containers/CCHeap.odoc b/dev/containers/CCHeap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..bc90042105d0282027e0115a26a3f5584882d912 GIT binary patch literal 6505 zcmbVQ3vd(rvHqvGo(KdUtYH(}6{Y zPc}83sPg^VDN|-zrj@bmY=@EX>b{=S8(%;Bp@Ya6cpEO0wqz%*6ZBt7( zS$0Nq8#TvBI9^@%b3eae_x$HOr;hr#<;H^#Q%_vLtGn!y`Hw`K*33OwF@5g*-yM0u z_p9gV_F`0AtfS_7^7juPK0dtWigA^zzF7MHCf_f+A<>~B#GBL2&d3+`!=2Ojyyq_a z`W@Bl9qZVMc*3&vI43oRc!tE|9act14Hpj$%Ow;;n5tBb|&V^^}%N zyLIal`~I;iK6LBfKJ^pHVRtk%sGh&7uZK*kbo50z-Aw47ud02%?-gsRs(L%r9V$L< z@w~OsoN2f!J`un#OlxjwyKZ{q(t+|+;36uvw%p3PhGhyD@+#m!|ban8Eo9{8g4H-M$x7oDMCWR&3qP*{0&>qpqFP ze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QIF24{idFu@Fyh@~n-_9`B1Bnkj zoEz(MBc%i66U+^+NGvH66sd2sA+}8qkQG2Ca=oa4mk{dri;8+yKIoP7oY@dLC{GjK zmJ4rB(Hx|A+cT)(#?O(6b(9E^esUtqm_lhI7-IbF*F^T$fE z*?b=%zTep7H_r5Wf$a0cp%qQ^znL|z){fm_R!?AI-r?m-9X*R6*OogjUU}PjR`vkM zK(6P8f5Dg`gZb(xx5A2l-82?@ltfp?Dfzk+uL_31k+Ym-I4u zK9CteeuVZIwPZMuW+2zGle>pp1mp(clw1aQodOb9H*+HsfmHh&z0E4Uq2g`S+u}Xt z?IdFwNOiG`IPjmh(f4{uJ&6lvsL};wF_0X0b`200h$Eb#@w)?O(}3KI^IMQMigFG| zNy_-Ng@Xh#o!eOeqzTA0WU7bU24pUOyATMPxK>!#Is9wbrPcs42~!!!1TLBZG9Jh{ zA!-8&sHS++G?G2!P9Rw>eHV~1K+6SZp zNV$+W0OVzL3-ImKLk?N`?)>6H%OklaJy!g5w<=Z{s+O;}DM5aU8^P0LOkDuiegz%3+eiGy-s5rOmjTegy;@{ z=K|3eL7ofpoIrFhKrdwrCQGc~gkCLj(_D zzN}7&EEK>kklqC8P~gIah(Xc3CbX79WO0CI8AyE~y&8!A6e3Hg=nF#h0f^iih^_=_ uSH2G$XzZnT<1 +1-E (containers.CCHeap.Make.1-E)

Parameter CCHeap.Make.1-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 diff --git a/dev/containers/CCHeap/Make/index.html b/dev/containers/CCHeap/Make/index.html new file mode 100644 index 00000000..31a9e3c1 --- /dev/null +++ b/dev/containers/CCHeap/Make/index.html @@ -0,0 +1,13 @@ + +Make (containers.CCHeap.Make)

Module CCHeap.Make

Parameters

Signature

type elt = E.t
type t
val empty : t

Empty heap.

val is_empty : t ‑> bool

Is the heap empty?

exception Empty
val merge : t ‑> t ‑> t

Merge two heaps.

val insert : elt ‑> t ‑> t

Insert a value in the heap.

val add : t ‑> elt ‑> t

Synonym to insert.

val filter : (elt ‑> bool) ‑> t ‑> t

Filter values, only retaining the ones that satisfy the predicate. +Linear time at least.

val find_min : t ‑> elt option

Find minimal element.

val find_min_exn : t ‑> elt

Like find_min but can fail.

  • Raises Empty: if the heap is empty.
val take : t ‑> (t * elt) option

Extract and return the minimum element, and the new heap (without +this element), or None if the heap is empty.

val take_exn : t ‑> t * elt

Like take, but can fail.

  • Raises Empty: if the heap is empty.
val delete_one : (elt ‑> elt ‑> bool) ‑> elt ‑> t ‑> t

Delete one occurrence of a value if it exist in the heap. +delete_one eq x h, use eq to find one x in 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 occurrences of a value in the heap. +delete_all eq x h, use 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

Iterate on elements.

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

Fold on all values.

val size : t ‑> int

Number of elements (linear complexity).

Conversions

The interface of of_gen, of_seq, of_klist +has changed since 0.16 (the old signatures +are now add_seq, add_gen, add_klist).

val to_list : t ‑> elt list

Return the elements of the heap, in no particular order.

val to_list_sorted : t ‑> elt list

Return the elements in increasing order.

  • Since: 1.1
val add_list : t ‑> elt list ‑> t

Add the elements of the list to the heap. 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_seq : t ‑> elt sequence ‑> t
  • Since: 0.16
val of_seq : elt sequence ‑> t

Build a heap from a given sequence. Complexity: O(n log n).

val to_seq : t ‑> elt sequence

Return a sequence of the elements of the heap.

val to_seq_sorted : t ‑> elt sequence

Iterate on the elements, in increasing order.

  • Since: 1.1
val add_klist : t ‑> elt klist ‑> t
  • Since: 0.16
val of_klist : elt klist ‑> t

Build a heap from a given klist. Complexity: O(n log n).

val to_klist : t ‑> elt klist

Return a klist of the elements of the heap.

val add_gen : t ‑> elt gen ‑> t
  • Since: 0.16
val of_gen : elt gen ‑> t

Build a heap from a given gen. Complexity: O(n log n).

val to_gen : t ‑> elt gen

Return a gen of the elements of the heap.

val to_tree : t ‑> elt ktree

Return a ktree of the elements of the heap.

val pp : ?⁠sep:string ‑> elt printer ‑> t printer
\ No newline at end of file diff --git a/dev/containers/CCHeap/index.html b/dev/containers/CCHeap/index.html new file mode 100644 index 00000000..1d0591ff --- /dev/null +++ b/dev/containers/CCHeap/index.html @@ -0,0 +1,2 @@ + +CCHeap (containers.CCHeap)

Module CCHeap

Leftist Heaps

following Okasaki

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a ktree = unit ‑> [ `Nil | `Node of 'a * 'a ktree list ]
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type PARTIAL_ORD : sig ... end
module type S : sig ... end
module Make : functor (E : PARTIAL_ORD) -> S with type elt = E.t
\ No newline at end of file diff --git a/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html b/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html new file mode 100644 index 00000000..b5e693f3 --- /dev/null +++ b/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html @@ -0,0 +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 diff --git a/dev/containers/CCHeap/module-type-S/index.html b/dev/containers/CCHeap/module-type-S/index.html new file mode 100644 index 00000000..43577598 --- /dev/null +++ b/dev/containers/CCHeap/module-type-S/index.html @@ -0,0 +1,13 @@ + +S (containers.CCHeap.S)

Module type CCHeap.S

type elt
type t
val empty : t

Empty heap.

val is_empty : t ‑> bool

Is the heap empty?

exception Empty
val merge : t ‑> t ‑> t

Merge two heaps.

val insert : elt ‑> t ‑> t

Insert a value in the heap.

val add : t ‑> elt ‑> t

Synonym to insert.

val filter : (elt ‑> bool) ‑> t ‑> t

Filter values, only retaining the ones that satisfy the predicate. +Linear time at least.

val find_min : t ‑> elt option

Find minimal element.

val find_min_exn : t ‑> elt

Like find_min but can fail.

  • Raises Empty: if the heap is empty.
val take : t ‑> (t * elt) option

Extract and return the minimum element, and the new heap (without +this element), or None if the heap is empty.

val take_exn : t ‑> t * elt

Like take, but can fail.

  • Raises Empty: if the heap is empty.
val delete_one : (elt ‑> elt ‑> bool) ‑> elt ‑> t ‑> t

Delete one occurrence of a value if it exist in the heap. +delete_one eq x h, use eq to find one x in 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 occurrences of a value in the heap. +delete_all eq x h, use 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

Iterate on elements.

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

Fold on all values.

val size : t ‑> int

Number of elements (linear complexity).

Conversions

The interface of of_gen, of_seq, of_klist +has changed since 0.16 (the old signatures +are now add_seq, add_gen, add_klist).

val to_list : t ‑> elt list

Return the elements of the heap, in no particular order.

val to_list_sorted : t ‑> elt list

Return the elements in increasing order.

  • Since: 1.1
val add_list : t ‑> elt list ‑> t

Add the elements of the list to the heap. 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_seq : t ‑> elt sequence ‑> t
  • Since: 0.16
val of_seq : elt sequence ‑> t

Build a heap from a given sequence. Complexity: O(n log n).

val to_seq : t ‑> elt sequence

Return a sequence of the elements of the heap.

val to_seq_sorted : t ‑> elt sequence

Iterate on the elements, in increasing order.

  • Since: 1.1
val add_klist : t ‑> elt klist ‑> t
  • Since: 0.16
val of_klist : elt klist ‑> t

Build a heap from a given klist. Complexity: O(n log n).

val to_klist : t ‑> elt klist

Return a klist of the elements of the heap.

val add_gen : t ‑> elt gen ‑> t
  • Since: 0.16
val of_gen : elt gen ‑> t

Build a heap from a given gen. Complexity: O(n log n).

val to_gen : t ‑> elt gen

Return a gen of the elements of the heap.

val to_tree : t ‑> elt ktree

Return a ktree of the elements of the heap.

val pp : ?⁠sep:string ‑> elt printer ‑> t printer
\ No newline at end of file diff --git a/dev/containers/CCIO.odoc b/dev/containers/CCIO.odoc new file mode 100644 index 0000000000000000000000000000000000000000..76c3dd6acff3fc99461f5e79684c8563c0ab4ccd GIT binary patch literal 7528 zcmcIpdyE`)9lzbqM0OD=4-quTuebNuy~o}iebDyWvb}?14Yh^x5TS17c7J;}-t5eF zX7=_Lu@FN7AvKw6Z81P}=t~2NZDSzv2R3R%jIS8q8s!hM7)>M^{6{f?%uV< zBhe<;-JO}=_x=5RALEpr((qXR`uym_hfciI)z#I5KOKKp;&0{2fs$kUhG|RJd%9fE)Lbfj(5zz^kb6QIVVfez< zLKtMX?-Y0XrsWkv{7SvF+pN|sDeAan`lj@R?})NAEYUFi88KyeW=U+fYjuBQXWhq# z@C|R)6Q(T;;Y!b`yCpg785Nms7|p!c=D5Nr&lz?}mIYYx(?i0a0SiyM!u062>ESLI z;gay2s`O_}dpd2Ivr^pJ@C9gW^_q5x&KbTiTq!DsE2<8@l$>hKl{3=z%sH7S9db9% z8>EA`5x)+FP%7h0ku{mCWqKf35f-fL(HBEhOiOMo6v6|kO@jYrge84piOqs+pU;x& zMV#**@vF5F60k^Tx}mU9E;6Ou_;|$aM&C7TuL9j18*<_~7zer;wgatQW|Z#gN({!l z6pys}N&hcqXOgkIJ8lb+t<-G+KMZeKbQwoU?$S)%hDSCl>7rkF+O(HG&5RuQa9_nT zroD~#?yO0>IAz*~+uS4eRh_cjIO?ohvnJ9UkDen7i_HQ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_473lg}RZ|D~d3`{|L-Ohz4@4;BH3Y@N zc2S&Wn8>_G9=&uRe&ELs$sXLYoQ)uB2A0H*=JD)Jm&YTDEMYiK0V$c;(=% z<&pt}7m-K9#00Ss%FtrgfkrZ^ebJ>JNv(`Y5im?&^QFD4``iFOvN$7rjZ##=ag zZN&W+uR+u-r@afF=*y?0w*^O@&Ta$LlbD4Z3qVncM`*fZ)aBJ(OEyX!U1Aao`jjd7 bg2fk +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.
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

Like read_dir (with recurse=true), this function walks +a directory recursively and yields either files or directories. +Is a file anything that doesn't satisfy is_directory (including +symlinks, etc.)

  • Raises Sys_error: in case of error (e.g. permission denied) during iteration.
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 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 diff --git a/dev/containers/CCIO/index.html b/dev/containers/CCIO/index.html new file mode 100644 index 00000000..d71a58b9 --- /dev/null +++ b/dev/containers/CCIO/index.html @@ -0,0 +1,23 @@ + +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);;
  • transfer one file into another:
      # CCIO.(
+          with_in "/tmp/input"
+            (fun ic ->
+               let chunks = read_chunks ic in
+               with_out ~flags:[Open_binary] ~mode:0o644 "/tmp/output"
+                 (fun oc ->
+                    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.result
type 'a gen = unit ‑> 'a option

See Gen in the gen library.

Input

val with_in : ?⁠mode:int ‑> ?⁠flags:Pervasives.open_flag list ‑> string ‑> (Pervasives.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 : ?⁠size:int ‑> Pervasives.in_channel ‑> string gen

Read the channel's content into chunks of size size.

val read_line : Pervasives.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 : Pervasives.in_channel ‑> string gen

Read all lines. The generator should be traversed only once.

val read_lines_l : Pervasives.in_channel ‑> string list

Read all lines into a list.

val read_all : ?⁠size:int ‑> Pervasives.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 ‑> Pervasives.in_channel ‑> 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:Pervasives.open_flag list ‑> string ‑> (Pervasives.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:Pervasives.open_flag list ‑> string ‑> (Pervasives.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 : Pervasives.out_channel ‑> string ‑> unit

Write the given string on the channel, followed by "\n".

val write_gen : ?⁠sep:string ‑> Pervasives.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_lines : Pervasives.out_channel ‑> string gen ‑> unit

Write every string on the output, followed by "\n".

val write_lines_l : Pervasives.out_channel ‑> string list ‑> unit

Both

val with_in_out : ?⁠mode:int ‑> ?⁠flags:Pervasives.open_flag list ‑> string ‑> (Pervasives.in_channel ‑> Pervasives.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

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.

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 diff --git a/dev/containers/CCInt.odoc b/dev/containers/CCInt.odoc new file mode 100644 index 0000000000000000000000000000000000000000..85ae23be03c1585526fea1d6451d43e8edaa7dbf GIT binary patch literal 4526 zcmbtX3vg6d8P3_9BP5+7b+kna_JrL{cJtW1oABx+z(OE2V=0gDD1$WK-MyP!*u8hT z_ii?kPO8ETPN&wp)dVRW=kgLNNGTYxwPHF@DT-x~$F#I{I$9ZPkpg3NbVU8nIroO3 z3DX&e+3fxI{NMk7=YQQFJ*6k>Vv+iYw7Kv5$4W{{g76{m`7C_KAF593nkB26VwgLE z&CRWv6_<8BwC@ zQ`g+QNZ0hNZsa=Eq%D2CXrfj2MZ?L1dl6{oifB@b*9yvFmRk~T=>#OtM}uxar;ocX(Xdb-B6-D zVG+1{Sv1pH7^KMQJ9GfAs!HnFoNOqNPrGdX@=k?{ zA5>G zve{|l1>7YLb3ZNOYms;8+_4AsSIsZ>j2!&u{HZsNzHM@w)1Vj6q)8ST|3;&8GlYMFd{MdrU}_p zsM4JS9-8IYVQMH=-q0Yd#Q-~V?3vV%RZ~e(OXpbtlw!D?Zvm%7%AH~zvnbO9@Q@!% zIQ9&l$eeDftiEq$)G1cTjvb^>x!|V)G{cedWy}lnE46A}kcU*eY;@$aoK}FUEJk4& zEHmqpV+SbIhyVv^6P4JN15zXwbML&{{ocp#zMqGXpo!shM%Rt@l-k8YP&Xt2Z4D~2 zh2_MpJPJyx$*RoI^IA&PIv@lE*+`jg==qh>ss<$!DQ~r)J}uQutNapk7}YGTrnh;Z zH4xvd@FkK2W7Q@4n)`i<6F%({ZuA3yQLP#R&So50Kfo_Ac2go7j4bCUf*YWT9u^+B z)Xdu3Td15DAnP1{{NFroxIF&KdHg-jTAHBFs+_^%V%P*dFbG9hAwy5wQ0cph1g#81 z$HK^jb3nrx?~FV|hBZDn@U?1#532SKMFSf%Z@0mWtO~YSvZYj5%zy{$51G)Qik4IW zv}icU^Mk87(K>g;5OknYcmhC@cOpSDQ-NFj7*BKHiJ-+|9uah`)}>`;^;Zfv zqO5#4tfz+@yPe|#@OYuG=h%c5gb%ocefNiRx%Pz0<`0`h)0eQKU{iRCl#rwt|2M^D zP%kk82NkZUa$;w90ZVDTu{djjn>EhPsN zd7Wc7LdFyWDw|FFA-*(i=vmf+Fs}n_w!$MQm(2lQ>Oe!YZ3#gJ&*qnsP#pgD2?bxwM`3jirFxU8d0@Prniz6|YWmYkU0;>f~ zwv1|85W>A93|~K=y-+_&ZWavQVe`Vaxj`0QUy~akpZmrozWFRtdx-A{L6aS>^RQO~ zKMjgTf{=yz)BhJK8lfTh}K?+W$fLcPHsY8pZNs;7NJXum16AM%Gruw7c}YL|`? z+J6?>Yk|rL%u6SD>XW#7sZXdIfza%c)ayL;m{7k@sBZ~`>gs?xtSNIdDhxZ;tvvaE zflvH9r{2>Zwt2*sB&Sss)$3xV4p`49tYl zfsN8QmBi=Puj?KPYfbF78|4u=`HHM?8ni1aO55+y_8Sw?_Ba zA@tX|`ac7LW@dEt$2~uMZVK!yOU+o^x>@1w-8I+6(KMkQWp54T821 zR1k6-Y`p|^5R?$|Dp*lr)rB=w$ZH6iN6=i@Wrf^MP>djnpei9J37SOE{m>FZ21{cI z`V_t?#P#?FzK;JW1RcMN-@)gEVB**DNqkHQ1$+b_#?K33Bi@O3;O`3I3H(j`6y79+ MO}HBuum-{X58?f +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 sequence

Alias to range.

  • Since: 1.2
val (--^) : t ‑> t ‑> t sequence

Alias to range'.

  • Since: 1.2
val (+) : t ‑> t ‑> t
  • Since: 2.1
val (-) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (~-) : t ‑> t
  • Since: 2.1
  • Since: 2.1
val (*) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (/) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (mod) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (land) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lor) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lxor) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lnot) : t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lsl) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
val (lsr) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
val (asr) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
\ No newline at end of file diff --git a/dev/containers/CCInt/index.html b/dev/containers/CCInt/index.html new file mode 100644 index 00000000..a36547a3 --- /dev/null +++ b/dev/containers/CCInt/index.html @@ -0,0 +1,10 @@ + +CCInt (containers.CCInt)

Module CCInt

Basic Int functions

type t = int
val compare : t ‑> t ‑> int

The comparison function for integers with the same specification as Pervasives.compare.

val equal : t ‑> t ‑> bool

Equality function for integers.

val hash : t ‑> int
val sign : t ‑> int

sign i is one of -1, 0, 1.

val neg : t ‑> t

Unary negation. neg i = - i.

  • Since: 0.5
val pow : t ‑> t ‑> t

pow base exponent returns base raised to the power of exponent. +pow a b = a^b for positive integers a and b. +Raises Invalid_argument if a = b = 0 or b < 0.

  • Since: 0.11
val floor_div : t ‑> t ‑> t

floor_div a n is integer division rounding towards negative infinity. +It satisfies a = m * floor_div a n + rem a n.

  • Since: 1.2
val rem : t ‑> t ‑> t

rem a n is the remainder of dividing a by n, with the same +sign as n.

  • Since: 1.2
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = Random.State.t ‑> 'a
type 'a sequence = ('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
val to_string : t ‑> string

Return the string representation of its argument, in signed decimal.

  • Since: 0.13
val of_string : string ‑> t option
  • Since: 0.13
val pp_binary : t printer

Print as "0b00101010".

  • Since: 0.20
val to_string_binary : t ‑> string
  • Since: 0.20
val min : t ‑> t ‑> t

The minimum of two integers.

  • Since: 0.17
val max : t ‑> t ‑> t

The maximum of two integers.

  • Since: 0.17
val range_by : step:t ‑> t ‑> t ‑> t sequence

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 sequence

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 sequence

Like range but the second bound is excluded. +For instance range' 0 5 = Sequence.of_list [0;1;2;3;4].

  • Since: 1.2

Infix Operators

  • Since: 0.17
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 sequence

Alias to range.

  • Since: 1.2
val (--^) : t ‑> t ‑> t sequence

Alias to range'.

  • Since: 1.2
val (+) : t ‑> t ‑> t
  • Since: 2.1
val (-) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (~-) : t ‑> t
  • Since: 2.1
  • Since: 2.1
val (*) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (/) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (mod) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (land) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lor) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lxor) : t ‑> t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lnot) : t ‑> t
  • Since: 2.1
  • Since: 2.1
val (lsl) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
val (lsr) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
val (asr) : t ‑> int ‑> t
  • Since: 2.1
  • Since: 2.1
\ No newline at end of file diff --git a/dev/containers/CCInt32.odoc b/dev/containers/CCInt32.odoc new file mode 100644 index 0000000000000000000000000000000000000000..217219fb0a770d2e29037a80958b5c0b5c3a2c3e GIT binary patch literal 7236 zcmb_h3yfS<8Qz(_w|1wA6=ws-Db z?!D99K>-yLg+RDlN&ykP)ItOsYyfF^C~J5$D1s_gXzq7Z@BZ9EiElQ_)+n*2tS|M+ncv7Pctmtac}Qg zyLP?h4Gm^9TMmBjiet{d@6o4TT4tQ^;O@6c^!PVhTIN05(z1A2OUp5d`7JG-Ey4e& zK#BT6ux~UQ_+4Zoz{im@b#nrSS>_iGaZ4{8p)t1EGL5YOLm*c%OfO|vTu4aw z&DI0E;}y-(;16_pHp}TupVIQ4S&d0wC*ckEKr>A?VQL=2D7$Gkia#~S@JeOfGxAN| zZqps;9tneHZn}W{g zD-%^D3R=rLepQ(}p+U+kX_gd;HHh>v%_@AHlOid|BzJLKM`a*B=rip}c+VBayprvT z$dSD?+lr`w)+EC^Pt)ygJp>W-zEXYdqxYc$u$yMCs6 z&o!UkxAA9N*PVQ5)A{>vTo43Qaen5{Gl}Tc&mXw)Ykw%eFjF;-4T4@IcpK!l=@7g{ zdF$YfuYacR#NovDcP@QtSJvM<>^k}WJd)ZkcSagk+xq)Uc3JOtjk0a^Puk8_k!s+= zjnqHJ%d5~|(2H8d^fDhl(RJO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dZ*Uc@XM7a&$%D`LLLq#{%= zl@BF?myKQVTs{HjdN3y**V%okvsHAf`m!$SOPp$j!XMEfef23F{6m( z^l>l}qNBldN2US?PD=`$#Y)&iQVm4&9!dZTa)xLsNl#1~o~;L@PV^rg8MJ(oxOQZ6 zfuH6~7j2n`)5xrfX?!O?hC|~c=y^~nQzDMA!J4Reyq&|q9psq4f(XwiNjF86ph;SB zAzH1$-r7)^28l}tE)M+VX@|S-ylXNAi4! z`$Y#Wen{JV*9t0^U?9tK^hv-u(?bn-A&WOViHw{XOcu8C7{3 Tb{nD*lVVkQnY3NVY019 +Infix (containers.CCInt32.Infix)

Module CCInt32.Infix

val (+) : t ‑> t ‑> t
val (-) : t ‑> t ‑> t
val (~-) : t ‑> t
val (*) : t ‑> t ‑> t
val (/) : t ‑> t ‑> t
val (mod) : t ‑> t ‑> t
val (land) : t ‑> t ‑> t
val (lor) : t ‑> t ‑> t
val (lxor) : t ‑> t ‑> t
val (lnot) : t ‑> t
val (lsl) : t ‑> int ‑> t
val (lsr) : t ‑> int ‑> t
val (asr) : t ‑> int ‑> t
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 diff --git a/dev/containers/CCInt32/index.html b/dev/containers/CCInt32/index.html new file mode 100644 index 00000000..3bf31545 --- /dev/null +++ b/dev/containers/CCInt32/index.html @@ -0,0 +1,39 @@ + +CCInt32 (containers.CCInt32)

Module CCInt32

Int32

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.

  • Since: 2.1
include module type of sig ... end
val zero : int32
val one : int32
val minus_one : int32
external neg : int32 ‑> int32 = "%int32_neg"
external add : int32 ‑> int32 ‑> int32 = "%int32_add"
external sub : int32 ‑> int32 ‑> int32 = "%int32_sub"
external mul : int32 ‑> int32 ‑> int32 = "%int32_mul"
external div : int32 ‑> int32 ‑> int32 = "%int32_div"
external rem : int32 ‑> int32 ‑> int32 = "%int32_mod"
val succ : int32 ‑> int32
val pred : int32 ‑> int32
val abs : int32 ‑> int32
val max_int : int32
val min_int : int32
external logand : int32 ‑> int32 ‑> int32 = "%int32_and"
external logor : int32 ‑> int32 ‑> int32 = "%int32_or"
external logxor : int32 ‑> int32 ‑> int32 = "%int32_xor"
val lognot : int32 ‑> int32
external shift_left : int32 ‑> int ‑> int32 = "%int32_lsl"
external shift_right : int32 ‑> int ‑> int32 = "%int32_asr"
external shift_right_logical : int32 ‑> int ‑> int32 = "%int32_lsr"
external of_int : int ‑> int32 = "%int32_of_int"
external to_int : int32 ‑> int = "%int32_to_int"
external of_float : float ‑> int32 = "caml_int32_of_float" "caml_int32_of_float_unboxed"
external to_float : int32 ‑> float = "caml_int32_to_float" "caml_int32_to_float_unboxed"
external of_string : string ‑> int32 = "caml_int32_of_string"
val of_string_opt : string ‑> int32 option
val to_string : int32 ‑> string
external bits_of_float : float ‑> int32 = "caml_int32_bits_of_float" "caml_int32_bits_of_float_unboxed"
external float_of_bits : int32 ‑> float = "caml_int32_float_of_bits" "caml_int32_float_of_bits_unboxed"
type t = int32
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external format : string ‑> int32 ‑> string = "caml_int32_format"
val (+) : t ‑> t ‑> t

Addition.

val (-) : t ‑> t ‑> t

Subtraction.

val (~-) : t ‑> t

Unary negation.

val (*) : t ‑> t ‑> t

Multiplication.

val (/) : 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 Pervasives.(/).

val (mod) : t ‑> t ‑> t

x mod y is the integer remainder. +If y <> zero, the result of x mod y satisfies the following property: +x = ((x / y) * y) + (x mod y). +If y = 0, x mod y raises Division_by_zero.

val (land) : t ‑> t ‑> t

Bitwise logical and.

val (lor) : t ‑> t ‑> t

Bitwise logical or.

val (lxor) : t ‑> t ‑> t

Bitwise logical exclusive or.

val (lnot) : t ‑> t

Bitwise logical negation.

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.

module Infix : sig ... end
val equal : t ‑> t ‑> bool

The equal function for 32-bit integers. +Like Pervasives.(=) x y).

val hash : t ‑> int

Like Pervasives.abs (to_int x).

Conversion

val to_int : t ‑> 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 of_int : int ‑> t

Alias to Int32.of_int.

val to_float : t ‑> float

Convert the given 32-bit integer to a floating-point number.

val of_float : float ‑> t

Alias to Int32.of_float. +Convert the given floating-point number to a 32-bit integer, +discarding the fractional part (truncate towards 0). +The result of the conversion is undefined if, after truncation, the number +is outside the range [CCInt32.min_int, CCInt32.max_int].

val to_string : t ‑> string

Return the string representation of its argument, in signed decimal.

val of_string_exn : string ‑> t

Alias to Int32.of_string. +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*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 of_string : string ‑> t option

Safe version of of_string_exn. +Like of_string_exn, but return None instead of raising.

val of_string_opt : string ‑> t option

Alias to of_string.

\ No newline at end of file diff --git a/dev/containers/CCInt64.odoc b/dev/containers/CCInt64.odoc new file mode 100644 index 0000000000000000000000000000000000000000..2e6334705c4a4f7b0ace515a665169a52d370dab GIT binary patch literal 8822 zcmcIq32+g}~6J{E2+XjwH*Lah#A4g#<`Cgk(rU3k;|$X=QJacE#>0 zv6-Pm2k1}+${I)@rG+I8=g<-YGqk0Jlp_=hEdzxfKw+Si4x|H=qc9ZO@BiPwI*c8T z(wR7scfWVP|GoD=#VT0&L|?K$nL2;V4fnLPv~=M|#m_AK9I&$|Z<(%Un7Zv;*R_24 zD$^Yt$fP#jp1FUFHmhmrdPbK@(8D)RpPb^=)+A^)O zWmiUwyq9`s?atn-*Zh3!Vf)yJ{(Q}E@Av(oC(09cS5P%{@kQjJ)He#(r|~ z%)8dzcIJvBURZzfLs!o5eNw?oy}2iRd-BHUj??bZmcKds=5gQeS*zQdK(|Q;;nm9C zXRmzufcTt&*k!Mu{ip32Z|8tx=X>*(t@lb-B_Xw~w|B%U>%ERqw#?qmmVKsE(egTQ zfoFTOxvEhr^cM7@RxP=y#4W7-wVU3%W9;dZ%l1`|M3!Ydf7@=Q&+{{x@his1{Vh9h zRgP*uTemGwnX$w3wsyca1V+3#E^3*&r_9E4Wd=Q3(_J>qs*@Ejj^Hn5W&EwXZ&kh# zHT7XniS5ephhG(c&&~Kf#4n4Ngd2`(g@UInAY39t|Mm$y#0GeP2!D3espdT8YlO>4 z{0f0TzK#co@Rvl()sm;2PWW{a|8;>swT=gf@P4#lZ1R)};foT#QQ*sUJV1oMBWmkq zPdSh9V-kOkz@J;kmo4beox7*qspj*ZvXuxf7QjpC-IMJVTZc1#MDMnVcR!$aFGRJR z<0(7o)eYj+&GhOYU1e=Fi#U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@F&^8mlQTfw4sdH5 zoh<34*TkV~Zhn-o@;wp`yFIbakltf4Y;@$e#Bsig30AP;tBOcYAI9CDrfGkCUaATO zmUauA$wp8xB^!|DU7Q;*$Qfd_Onf3z@I*e?D~W~Zyc8C{as@OmmGiwM6yy^>|E{Jq zmh@q9JMZX$@Wl)(N!<8_9W<;PW(8vppT|wUX2K4JpFKH;%EgU1S`mMI=rmjc`g>~M zrPKGP^ZQQsy#+~zg)Kja#1M-(UB}K?p1bKMG@iRIESUN6rK8VRLU28&Z59uSZTPPQ ztN7P$N%^fTn=b_eXuMFNtmI*_R;lQk z4co^ykLY4$MS4*D#Bv5}E_}U;Zfx!(w#_{VXL F`7guf`g8yQ literal 0 HcmV?d00001 diff --git a/dev/containers/CCInt64/.jbuilder-keep b/dev/containers/CCInt64/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCInt64/Infix/index.html b/dev/containers/CCInt64/Infix/index.html new file mode 100644 index 00000000..f50f1a50 --- /dev/null +++ b/dev/containers/CCInt64/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.CCInt64.Infix)

Module CCInt64.Infix

Infix operators

  • Since: 2.1
val (+) : t ‑> t ‑> t
val (-) : t ‑> t ‑> t
val (~-) : t ‑> t
val (*) : t ‑> t ‑> t
val (/) : t ‑> t ‑> t
val (mod) : t ‑> t ‑> t
val (land) : t ‑> t ‑> t
val (lor) : t ‑> t ‑> t
val (lxor) : t ‑> t ‑> t
val (lnot) : t ‑> t
val (lsl) : t ‑> int ‑> t
val (lsr) : t ‑> int ‑> t
val (asr) : t ‑> int ‑> t
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 diff --git a/dev/containers/CCInt64/index.html b/dev/containers/CCInt64/index.html new file mode 100644 index 00000000..ba969ec3 --- /dev/null +++ b/dev/containers/CCInt64/index.html @@ -0,0 +1,46 @@ + +CCInt64 (containers.CCInt64)

Module CCInt64

Int64

Helpers for 64-bit integers

  • Since: 0.13
include module type of sig ... end
val zero : int64
val one : int64
val minus_one : int64
external neg : int64 ‑> int64 = "%int64_neg"
external add : int64 ‑> int64 ‑> int64 = "%int64_add"
external sub : int64 ‑> int64 ‑> int64 = "%int64_sub"
external mul : int64 ‑> int64 ‑> int64 = "%int64_mul"
external div : int64 ‑> int64 ‑> int64 = "%int64_div"
external rem : int64 ‑> int64 ‑> int64 = "%int64_mod"
val succ : int64 ‑> int64
val pred : int64 ‑> int64
val abs : int64 ‑> int64
val max_int : int64
val min_int : int64
external logand : int64 ‑> int64 ‑> int64 = "%int64_and"
external logor : int64 ‑> int64 ‑> int64 = "%int64_or"
external logxor : int64 ‑> int64 ‑> int64 = "%int64_xor"
val lognot : int64 ‑> int64
external shift_left : int64 ‑> int ‑> int64 = "%int64_lsl"
external shift_right : int64 ‑> int ‑> int64 = "%int64_asr"
external shift_right_logical : int64 ‑> int ‑> int64 = "%int64_lsr"
external of_int : int ‑> int64 = "%int64_of_int"
external to_int : int64 ‑> int = "%int64_to_int"
external of_float : float ‑> int64 = "caml_int64_of_float" "caml_int64_of_float_unboxed"
external to_float : int64 ‑> float = "caml_int64_to_float" "caml_int64_to_float_unboxed"
external of_int32 : int32 ‑> int64 = "%int64_of_int32"
external to_int32 : int64 ‑> int32 = "%int64_to_int32"
external of_nativeint : nativeint ‑> int64 = "%int64_of_nativeint"
external to_nativeint : int64 ‑> nativeint = "%int64_to_nativeint"
external of_string : string ‑> int64 = "caml_int64_of_string"
val of_string_opt : string ‑> int64 option
val to_string : int64 ‑> string
external bits_of_float : float ‑> int64 = "caml_int64_bits_of_float" "caml_int64_bits_of_float_unboxed"
external float_of_bits : int64 ‑> float = "caml_int64_float_of_bits" "caml_int64_float_of_bits_unboxed"
type t = int64
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external format : string ‑> int64 ‑> string = "caml_int64_format"
val (+) : t ‑> t ‑> t

Addition.

val (-) : t ‑> t ‑> t

Subtraction.

val (~-) : t ‑> t

Unary negation.

val (*) : t ‑> t ‑> t

Multiplication.

val (/) : 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 Pervasives.(/).

val (mod) : t ‑> t ‑> t

Integer remainder. +If y = 0, x mod y raises Division_by_zero.

val abs : t ‑> t

Return the absolute value of its argument.

val max_int : t

The greatest representable 64-bit integer, 263 - 1 = 9_223_372_036_854_775_807.

val min_int : t

The smallest representable 64-bit integer, -263 = -9_223_372_036_854_775_808.

val (land) : t ‑> t ‑> t

Bitwise logical and.

val (lor) : t ‑> t ‑> t

Bitwise logical or.

val (lxor) : t ‑> t ‑> t

Bitwise logical exclusive or.

val (lnot) : t ‑> t

Bitwise logical negation.

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.

module Infix : sig ... end

Infix operators

val equal : t ‑> t ‑> bool

The equal function for 64-bit integers. +Like Pervasives.(=) x y).

val compare : t ‑> t ‑> int

The comparison function for 64-bit integers, with the same specification as +Pervasives.compare. Along with the type t, this function compare +allows the module CCInt64 to be passed as argument to the functors +Set.Make and Map.Make.

val hash : t ‑> int

Like Pervasives.abs (to_int x).

Conversion

val to_int : t ‑> 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 of_int : int ‑> t

Alias to Int64.of_int. +NOTE: used to return an option, but the function actually never fails.

val of_int_exn : int ‑> t

Alias to Int64.of_int.

  • Deprecated since 2.1
val to_int32 : t ‑> 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_int32 : int32 ‑> t

Alias to Int64.of_int32. +NOTE: use to return an option, but the function actually never fails.

val of_int32_exn : int32 ‑> t

Alias to Int64.of_int32.

  • Deprecated since 2.1
val to_nativeint : t ‑> 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_nativeint : nativeint ‑> t

Alias to Int64.of_nativeint. +NOTE: use to return an option, but the function actually never fails.

val of_nativeint_exn : nativeint ‑> t

Alias to Int64.of_nativeint.

  • Deprecated since 2.1
val to_float : t ‑> float

Convert the given 64-bit integer to a floating-point number.

val of_float : float ‑> t

Alias to Int64.of_float. +Convert the given floating-point number to a 64-bit integer, +discarding the fractional part (truncate towards 0). +The result of the conversion is undefined if, after truncation, +the number is outside the range [CCInt64.min_int, CCInt64.max_int]. +NOTE: used to return an option, but the function never fails.

val of_float_exn : float ‑> t

Alias to Int64.of_float.

  • Deprecated since 2.1
val to_string : t ‑> string

Return the string representation of its argument, in decimal.

val of_string : string ‑> t option

Safe version of of_string_exn.

val of_string_opt : string ‑> t option

Alias to of_string.

  • Since: 2.1
val of_string_exn : string ‑> t

Alias to Int64.of_string. +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*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.

\ No newline at end of file diff --git a/dev/containers/CCList.odoc b/dev/containers/CCList.odoc new file mode 100644 index 0000000000000000000000000000000000000000..6b54c2aeb5e64662642cedc84d489b8aa5810248 GIT binary patch literal 26812 zcmd6Q33wdUm98aKVRu`$B`=a~uqjzBsatNfHg8y7WXm>~u`$?&01gqYR!M5y>Xy4( zwnV@~65b<_WTwO#1}1411Ids8&dV_2%VL(7ZAf5VcqD;5CNBgC17S$WK7_pgoO5qg zbxQ)0;eFrmea2PQ_ndpqx#ynko+@YhGl`b=SVyew${X(b>WmpP8u7=(pN05Sb$@dr zlg`JJX*-*{t+A(PS2CCHZu|YMuO0dBH($9gb)@qTA9}8Lt3VF*&zN!QFJ{bm|LHSk zocrNfGiHQl6y6=YQSKB94{qr$IGsJ2;gOU*Y^U=%E1$7aG+%eOF{@B$+&VfiU}v4S zTW?u&+W*>kWXJzJ^qtpt?06+oD75tS?9QY!!

JP%`1P{rc?tTW{I((D=8q+rRP5 zr@s4Wp|GweKAcLX^L92JPwmKLhvWIJ@mw;IbK1r~|M9sG?z`{cwo`w+|GaP9G#fL? z0H`do7JDj#>PlU^_dFp@PbiwzApFT03Tq3`$ zS>?3-;_KxP#O|)Y^T1c*J-?{=%tWCOBB42LmmWOz+U%U)+E1)|`me8@we77!A#zqc zpFC`XET`>*bu;T9e*C^yoj)xa``pnBZY&g<&$hFNLE~W?MBZY&`lFj(sERII6~6Z0 zFa6=|AaZX!-JcnD+8#=Ee17(G&zKKi^~L&^w=e!9{bc7xQ$V`fxbXU~bzO7%6Xt0@ zJATE_-T;;7CWhjW;RUIkxy4_6)coM-UwS%!^w znPIy%mmJQdTaRS22XiCwgpFZZDO!8`Mw6-j)_!{+jyc=*Kim84-TN1PrRLn-Pkif< z2XkAxox-&zjv4#HIs4G4ole+Jp}YG;q2ScTv9QkZ?&ICKywh=R42`Cf`EFbpCVpY4 zRQ;fxc8n$d@ibr&4ZE>1Gm=kc(h3y=T-k7tRK_vd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d)UW@d4u^Lq6qdR2lCx&O6?1{1sEU$QU$sGI>jk9maN+ z;W1;mF=BKP3C21e6*3MRYxyc{TxzWDo)Csm@RiSS_u>nnr{FuJ7-H63R=Cr-$N7TM zy~S8p$9*=WqxTqyBJm3b{0-PpZDGbfKHy+@^$Aj_A2WWBQOD5YPSvSNjXrg{$LLVM zGAUyXaP*7?16>3?E&`tSpLt#)`e&cE5DWwuW z!Z(%8vKF%}D$M`bENkM=Ses=h^FqI1maR3*maueRHp^rLY#xKFy#q3^@9=-K_J|*HTz^O%RUXG&Cg1Ef zPq_|^5J;yx?P&shtsnUM7By{RD1&M+8^NZ%Og^lvJj8-)n}`IR(+#qErK!j?Z(;}; zX6jJ=gnn~kIH|;Yi4?q^;_v<{;mU}+E82_3KY#6 z*p0Itk(MYwzCxzI@Q3J~s?CIWYi2ZyVp0)qF~=klDahf< zTs+$&c=;TX3Vm3=L@M-e1-x5Om|_kcQ-I-HzKg@Gysh= z^s)(+9+F(wl4B$sF5#u!{18>XQCGt^_3^Jmun(|u2@C-!K0Js1!dnalIbHiFM}#UF(6^?PW{ zFSB^XSS@~?Zy33RYRtr5@9oD3V%7h|%a2Q{3LF3s-7@8prS6nVERUbd+;<-xA4g^2 zNR&ilQAjp>NVa=OZgYdWKjY2CCB2Nx_2tM;lZ=w2vLxeS|L1p86z#yv<5Z-jvwu~h z)rrOO8?~}eKsRp~HV0WJXq38K0nde@a=WCdU zHkB%`uSFD%c-$=b0)rJh_uv`(xKkfqF+wMu&c?IppGx69qw*AfgG*8w@#Q|QMu2I;2Hj*2i&1H$2V0%+cERh=gm{8R>P)R#THAXpBE(jKVyIHuK)l5 literal 0 HcmV?d00001 diff --git a/dev/containers/CCList/.jbuilder-keep b/dev/containers/CCList/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCList/Assoc/index.html b/dev/containers/CCList/Assoc/index.html new file mode 100644 index 00000000..7c33af60 --- /dev/null +++ b/dev/containers/CCList/Assoc/index.html @@ -0,0 +1,4 @@ + +Assoc (containers.CCList.Assoc)

Module CCList.Assoc

type ('a, 'b) t = ('a * 'b) list
val get : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a'bt ‑> 'b option

Find the element.

val get_exn : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a'bt ‑> 'b

Like get, but unsafe.

  • Raises Not_found: if the element is not present.
val set : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> 'b ‑> ('a'bt ‑> ('a'bt

Add the binding into the list (erase it if already present).

val mem : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a_t ‑> bool

mem x l returns true iff x is a key in l.

  • Since: 0.16
val update : eq:('a ‑> 'a ‑> bool) ‑> f:('b option ‑> 'b option) ‑> 'a ‑> ('a'bt ‑> ('a'bt

update k ~f l updates l on the key k, by calling f (get l 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'bt ‑> ('a'bt

remove x l removes the first occurrence of k from l.

  • Since: 0.17
\ No newline at end of file diff --git a/dev/containers/CCList/Infix/index.html b/dev/containers/CCList/Infix/index.html new file mode 100644 index 00000000..4ede567e --- /dev/null +++ b/dev/containers/CCList/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.CCList.Infix)

Module CCList.Infix

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

Infix version of map with reversed arguments.

val (@) : 'a t ‑> 'a t ‑> 'a t

As append. Concatenate two lists.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

fun <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a ‑> 'b) ‑> 'a t ‑> 'b t

As map.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

l >>= f is flat_map f l.

val (--) : int ‑> int ‑> int t

Infix alias for range. Bounds included.

val (--^) : int ‑> int ‑> int t

Infix alias for range'. Second bound excluded.

  • Since: 0.17
\ No newline at end of file diff --git a/dev/containers/CCList/Ref/index.html b/dev/containers/CCList/Ref/index.html new file mode 100644 index 00000000..56413548 --- /dev/null +++ b/dev/containers/CCList/Ref/index.html @@ -0,0 +1,3 @@ + +Ref (containers.CCList.Ref)

Module CCList.Ref

type 'a t = 'a list Pervasives.ref
val push : 'a t ‑> 'a ‑> unit
val pop : 'a t ‑> 'a option
val pop_exn : 'a t ‑> 'a

Unsafe version of pop.

  • Raises Failure: if the list is empty.
val create : unit ‑> 'a t

Create a new list reference.

val clear : _ t ‑> unit

Remove all elements.

val lift : ('a list ‑> 'b) ‑> 'a t ‑> 'b

Apply a list function to the content.

val push_list : 'a t ‑> 'a list ‑> unit

Add elements of the list at the beginning of the list ref. Elements +at the end of the list will be at the beginning of the list ref.

\ No newline at end of file diff --git a/dev/containers/CCList/Traverse/argument-1-M/index.html b/dev/containers/CCList/Traverse/argument-1-M/index.html new file mode 100644 index 00000000..07caa0b7 --- /dev/null +++ b/dev/containers/CCList/Traverse/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (containers.CCList.Traverse.1-M)

Parameter CCList.Traverse.1-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 diff --git a/dev/containers/CCList/Traverse/index.html b/dev/containers/CCList/Traverse/index.html new file mode 100644 index 00000000..5b32801a --- /dev/null +++ b/dev/containers/CCList/Traverse/index.html @@ -0,0 +1,4 @@ + +Traverse (containers.CCList.Traverse)

Module CCList.Traverse

Parameters

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
val map_m_par : ('a ‑> 'b M.t) ‑> 'a t ‑> 'b t M.t

Like map_m but map_m_par f (x::l) evaluates f x and +f l "in parallel" before combining their result (for instance +in Lwt).

\ No newline at end of file diff --git a/dev/containers/CCList/index.html b/dev/containers/CCList/index.html new file mode 100644 index 00000000..92938bf2 --- /dev/null +++ b/dev/containers/CCList/index.html @@ -0,0 +1,96 @@ + +CCList (containers.CCList)

Module CCList

Complements to list

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = Random.State.t ‑> 'a
include module type of List
val length : 'a list ‑> int
val compare_lengths : 'a list ‑> 'b list ‑> int
val compare_length_with : 'a list ‑> int ‑> int
val cons : 'a ‑> 'a list ‑> 'a list
val hd : 'a list ‑> 'a
val tl : 'a list ‑> 'a list
val nth : 'a list ‑> int ‑> 'a
val nth_opt : 'a list ‑> int ‑> 'a option
val rev : 'a list ‑> 'a list
val init : int ‑> (int ‑> 'a) ‑> 'a list
val append : 'a list ‑> 'a list ‑> 'a list
val rev_append : 'a list ‑> 'a list ‑> 'a list
val concat : 'a list list ‑> 'a list
val flatten : 'a list list ‑> 'a list
val iter : ('a ‑> unit) ‑> 'a list ‑> unit
val iteri : (int ‑> 'a ‑> unit) ‑> 'a list ‑> unit
val map : ('a ‑> 'b) ‑> 'a list ‑> 'b list
val mapi : (int ‑> 'a ‑> 'b) ‑> 'a list ‑> 'b list
val rev_map : ('a ‑> 'b) ‑> 'a list ‑> 'b list
val fold_left : ('a ‑> 'b ‑> 'a) ‑> 'a ‑> 'b list ‑> 'a
val fold_right : ('a ‑> 'b ‑> 'b) ‑> 'a list ‑> 'b ‑> 'b
val iter2 : ('a ‑> 'b ‑> unit) ‑> 'a list ‑> 'b list ‑> unit
val map2 : ('a ‑> 'b ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c list
val rev_map2 : ('a ‑> 'b ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c list
val fold_left2 : ('a ‑> 'b ‑> 'c ‑> 'a) ‑> 'a ‑> 'b list ‑> 'c list ‑> 'a
val fold_right2 : ('a ‑> 'b ‑> 'c ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c ‑> 'c
val for_all : ('a ‑> bool) ‑> 'a list ‑> bool
val exists : ('a ‑> bool) ‑> 'a list ‑> bool
val for_all2 : ('a ‑> 'b ‑> bool) ‑> 'a list ‑> 'b list ‑> bool
val exists2 : ('a ‑> 'b ‑> bool) ‑> 'a list ‑> 'b list ‑> bool
val mem : 'a ‑> 'a list ‑> bool
val memq : 'a ‑> 'a list ‑> bool
val find : ('a ‑> bool) ‑> 'a list ‑> 'a
val find_opt : ('a ‑> bool) ‑> 'a list ‑> 'a option
val filter : ('a ‑> bool) ‑> 'a list ‑> 'a list
val find_all : ('a ‑> bool) ‑> 'a list ‑> 'a list
val partition : ('a ‑> bool) ‑> 'a list ‑> 'a list * 'a list
val assoc : 'a ‑> ('a * 'b) list ‑> 'b
val assoc_opt : 'a ‑> ('a * 'b) list ‑> 'b option
val assq : 'a ‑> ('a * 'b) list ‑> 'b
val assq_opt : 'a ‑> ('a * 'b) list ‑> 'b option
val mem_assoc : 'a ‑> ('a * 'b) list ‑> bool
val mem_assq : 'a ‑> ('a * 'b) list ‑> bool
val remove_assoc : 'a ‑> ('a * 'b) list ‑> ('a * 'b) list
val remove_assq : 'a ‑> ('a * 'b) list ‑> ('a * 'b) list
val split : ('a * 'b) list ‑> 'a list * 'b list
val combine : 'a list ‑> 'b list ‑> ('a * 'b) list
val sort : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val stable_sort : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val fast_sort : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val sort_uniq : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val merge : ('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list
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 : ('a ‑> 'b) ‑> 'a t ‑> 'b t

Safe version of List.map.

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

Infix version of map with reversed arguments.

  • Since: 0.5
val cons : 'a ‑> 'a t ‑> 'a t

cons x l is x::l.

  • Since: 0.12
val append : 'a t ‑> 'a t ‑> 'a t

Safe version of List.append. +Concatenate two lists.

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 (@) : 'a t ‑> 'a t ‑> 'a t

Like append. +Concatenate two lists.

val filter : ('a ‑> bool) ‑> 'a t ‑> 'a t

Safe version of List.filter. +filter p l returns all the elements of the list l +that satisfy the predicate p. The order of the elements +in the input list is preserved.

val fold_right : ('a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b

Safe version of fold_right. +fold_right f [a1; ...; an] b is +f a1 (f a2 (... (f an b) ...)). Not tail-recursive.

val fold_while : ('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> 'a ‑> 'b t ‑> 'a

Fold 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 acc l is a fold_left-like function, but it also maps the +list to another list.

  • Since: 0.14
val scan_left : ('acc ‑> 'a ‑> 'acc) ‑> 'acc ‑> 'a list ‑> 'acc list

scan_left f acc l returns the list [acc; f acc x0; f (f acc x0) x1; ...] +where x0, x1, etc. are the elements of l.

  • Since: 1.2
val fold_map2 : ('acc ‑> 'a ‑> 'b ‑> 'acc * 'c) ‑> 'acc ‑> 'a list ‑> 'b list ‑> 'acc * 'c list

fold_map2 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 ‑> 'acc * 'b list

fold_filter_map f acc 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_flat_map : ('acc ‑> 'a ‑> 'acc * 'b list) ‑> 'acc ‑> 'a list ‑> 'acc * 'b list

fold_flat_map f acc 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 count : ('a ‑> bool) ‑> 'a list ‑> int

count f l counts how much elements of l comply with the function f.

  • Since: 1.5
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

Like List.combine but tail-recursive. +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 lists have distinct lengths.
  • Since: 1.2
val combine_gen : 'a list ‑> 'b list ‑> ('a * 'b) gen

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
val split : ('a * 'b) t ‑> 'a t * 'b t

A tail-recursive version of List.split. +Transform a list of pairs into a pair of lists: +split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]).

val compare : ('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a t ‑> int
val compare_lengths : 'a t ‑> 'b t ‑> int

Equivalent to compare (length l1) (length l2) but more efficient. +Compare the lengths of two lists.

  • Since: 1.5
val compare_length_with : 'a t ‑> int ‑> int

Equivalent to compare (length l) x but more efficient. +Compare the length of a list to an integer.

  • Since: 1.5
val equal : ('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> bool
val flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b t

Map and flatten at the same time (safe). Evaluation order is not guaranteed.

val flatten : 'a t t ‑> 'a t

Safe flatten. Concatenate a list of lists.

val product : ('a ‑> 'b ‑> 'c) ‑> 'a t ‑> 'b t ‑> 'c t

Cartesian product of the two lists, with the given combinator.

val fold_product : ('c ‑> 'a ‑> 'b ‑> 'c) ‑> 'c ‑> 'a t ‑> 'b t ‑> 'c

Fold on the cartesian product.

val cartesian_product : 'a t t ‑> 'a t t

Produce 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
val map_product_l : ('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
val diagonal : 'a t ‑> ('a * 'a) t

All pairs of distinct positions of the list. list_diagonal l will +return the list of List.nth i l, List.nth j l if i < j.

val partition_map : ('a ‑> [< `Left of 'b | `Right of 'c | `Drop ]) ‑> 'a list ‑> 'b list * 'c list

partition_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 sublists_of_len : ?⁠last:('a list ‑> 'a list option) ‑> ?⁠offset:int ‑> int ‑> 'a list ‑> 'a list list

sublists_of_len 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:CCOpt.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 = CCOpt.return, it will simply keep the last group. +By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.
  • Raises Invalid_argument: if offset <= 0 or n <= 0.
  • Since: 1.0
val intersperse : 'a ‑> 'a list ‑> 'a list

Insert the first argument between every element of the list

  • Since: 2.1
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
val pure : 'a ‑> 'a t

pure is return.

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

(<$>) = map.

val return : 'a ‑> 'a t

return x is x.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

l >>= f is flat_map f l.

val take : int ‑> 'a t ‑> 'a t

Take the n first elements, drop the rest.

val drop : int ‑> 'a t ‑> 'a t

Drop the n first elements, keep the rest.

val hd_tl : 'a t ‑> 'a * 'a t

hd_tl (x :: l) returns hd, 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
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

First element.

  • Since: 0.20
val tail_opt : 'a t ‑> 'a t option

Return the given list without its first element.

  • Since: 2.0
val last_opt : 'a t ‑> 'a option

Last element.

  • 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

Safe version of find.

  • Since: 1.5
val find_pred_exn : ('a ‑> bool) ‑> 'a t ‑> 'a

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

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) ‑> x:'a ‑> 'a t ‑> 'a t

remove ~x l removes every instance of x 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
val keep_ok : ('a_) Result.result t ‑> 'a t

keep_ok l retains only elements of the form Ok x.

  • Since: 1.3
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
val all_ok : ('a'err) Result.result t ‑> ('a t'err) Result.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
val sorted_merge : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list

Merge elements from both sorted list.

val sort_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list

Sort the list and remove duplicate elements.

val sorted_merge_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list

sorted_merge_uniq l1 l2 merges the sorted lists l1 and l2 and +removes duplicates.

  • Since: 0.10
val is_sorted : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> bool

is_sorted l returns true iff l is sorted (according to given order).

  • Parameter cmp: the comparison function (default Pervasives.compare).
  • Since: 0.17
val sorted_insert : cmp:('a ‑> 'a ‑> int) ‑> ?⁠uniq:bool ‑> 'a ‑> 'a list ‑> 'a list

sorted_insert 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 uniq_succ : eq:('a ‑> 'a ‑> bool) ‑> 'a list ‑> 'a list

uniq_succ 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 : (int ‑> 'a ‑> 'b) ‑> 'a t ‑> 'b t

Like 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.

val iteri : (int ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like 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.

val iteri2 : (int ‑> 'a ‑> 'b ‑> unit) ‑> 'a t ‑> 'b t ‑> unit

Iter on two lists.

  • Raises Invalid_argument: when lists do not have the same length.
  • Since: 2.0
val foldi : ('b ‑> int ‑> 'a ‑> 'b) ‑> 'b ‑> 'a t ‑> 'b

Like fold but it also passes in the index of each element to the folded function. Tail-recursive.

val foldi2 : ('c ‑> int ‑> 'a ‑> 'b ‑> 'c) ‑> 'c ‑> 'a t ‑> 'b t ‑> 'c

Fold on two lists, with index.

  • Raises Invalid_argument: when lists do not have the same length.
  • Since: 2.0
val get_at_idx : int ‑> 'a t ‑> 'a option

Get by index in the list. +If the index is negative, it will get element starting from the end +of the list.

val nth_opt : 'a t ‑> int ‑> 'a option

Safe version of nth.

  • Raises Invalid_argument: if the int is negative.
  • Since: 1.5
val get_at_idx_exn : int ‑> 'a t ‑> 'a

Get the i-th element, or

  • Raises Not_found: if the index is invalid. +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 i-th element (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 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 element at given index. 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 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 x set removes one occurrence of x from set. Linear time.

  • Since: 0.11
val mem : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> 'a t ‑> bool

Membership to the list. Linear time.

val subset : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> bool

Test for inclusion.

val uniq : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t

Remove duplicates w.r.t the equality predicate. +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

List union. Complexity is product of length of inputs.

val inter : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> 'a t

List intersection. 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

Like range but the second bound is excluded. +For instance range' 0 5 = [0;1;2;3;4].

val (--) : int ‑> int ‑> int t

Infix alias for range.

val (--^) : int ‑> int ‑> int t

Infix alias for range'.

  • Since: 0.17
val replicate : int ‑> 'a ‑> 'a t

Replicate the given element n times.

val repeat : int ‑> 'a t ‑> 'a t

Concatenate the list with itself n times.

Association Lists

module Assoc : sig ... end
val assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> 'b

Like Assoc.get_exn.

  • Since: 2.0
val assoc_opt : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> 'b option

Like Assoc.get.

  • Since: 1.5
val assq_opt : 'a ‑> ('a * 'b) t ‑> 'b option

Safe version of assq.

  • Since: 1.5
val mem_assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * _) t ‑> bool

Like Assoc.mem.

  • Since: 2.0
val remove_assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> ('a * 'b) t

Like Assoc.remove.

  • Since: 2.0

References on Lists

  • Since: 0.3.3
module Ref : sig ... end
module type MONAD : sig ... end

Monadic Operations

module Traverse : functor (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

Randomly choose an element in the list.

  • Raises Not_found: if the list is empty.
val random_sequence : 'a random_gen t ‑> 'a t random_gen
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of the list.

val of_seq : 'a sequence ‑> 'a t

Build a list from a given sequence. +In the result, elements appear in the same order as they did in the source sequence.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of the list.

val of_gen : 'a gen ‑> 'a t

Build a list from a given gen. +In the result, elements appear in the same order as they did in the source gen.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of the list.

val of_klist : 'a klist ‑> 'a t

Build a list from a given klist. +In the result, elements appear in the same order as they did in the source klist.

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

IO

val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print the contents of a list.

\ No newline at end of file diff --git a/dev/containers/CCList/module-type-MONAD/index.html b/dev/containers/CCList/module-type-MONAD/index.html new file mode 100644 index 00000000..732eec61 --- /dev/null +++ b/dev/containers/CCList/module-type-MONAD/index.html @@ -0,0 +1,2 @@ + +MONAD (containers.CCList.MONAD)

Module type CCList.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 diff --git a/dev/containers/CCListLabels.odoc b/dev/containers/CCListLabels.odoc new file mode 100644 index 0000000000000000000000000000000000000000..ab3408b07129e867473243012999ab82af955d4b GIT binary patch literal 21796 zcmd6Pd3;>eb-zb?&(@4&OSUZAGQ@e3W~3QQ8f~_*EiYpm3?ep*4KzTE7-`-}gGV!B zW@JlF;w1cNlaMY?5KIY>42!{S6T%Wg!l$LqO4BCvS4wD`tt3tJgM_v~n=Uj>e&2J> zz3;t|WN^BCKK;Y;TkbjcZ1-&UzR9QZquqV+{&?@rw?FvwqD70k@Xy4*Rrt63k@chb zTq&8!*@fc0U3>QI%M?rdk|TDunCLyW+h~8=JD*$kwb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FAvIBDmeHkuDxqx`A|dzln|}tXHdlVR=zdw~ zu9GGV!t#?f+H@h`F!KE(c4Fdy_uWnm$?crac6REXew5z5`FA@_V`a^Op7KU-%A>ec zxy5_j&vqOiN1r2NRUQqhFCmpHTzT}r`|BHFoT>m+TBI@>R!2+V6n6*l~h zozy<08)r7cJH?RK3AFub>Ci*8`t$SyOZbUB+@YDrHw{ADN%Pzev+6S}c^V@jb(Q#V HknsNjtX#y^ literal 0 HcmV?d00001 diff --git a/dev/containers/CCListLabels/.jbuilder-keep b/dev/containers/CCListLabels/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCListLabels/Assoc/index.html b/dev/containers/CCListLabels/Assoc/index.html new file mode 100644 index 00000000..03850fd6 --- /dev/null +++ b/dev/containers/CCListLabels/Assoc/index.html @@ -0,0 +1,4 @@ + +Assoc (containers.CCListLabels.Assoc)

Module CCListLabels.Assoc

type ('a, 'b) t = ('a * 'b) list
val get : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a'bt ‑> 'b option

Find the element.

val get_exn : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a'bt ‑> 'b

Like get, but unsafe.

  • Raises Not_found: if the element is not present.
val set : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> 'b ‑> ('a'bt ‑> ('a'bt

Add the binding into the list (erase it if already present).

val mem : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a_t ‑> bool

mem x l returns true iff x is a key in l.

  • Since: 0.16
val update : eq:('a ‑> 'a ‑> bool) ‑> f:('b option ‑> 'b option) ‑> 'a ‑> ('a'bt ‑> ('a'bt

update k ~f l updates l on the key k, by calling f (get l 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'bt ‑> ('a'bt

remove x l removes the first occurrence of k from l.

  • Since: 0.17
\ No newline at end of file diff --git a/dev/containers/CCListLabels/Infix/index.html b/dev/containers/CCListLabels/Infix/index.html new file mode 100644 index 00000000..db928795 --- /dev/null +++ b/dev/containers/CCListLabels/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.CCListLabels.Infix)

Module CCListLabels.Infix

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

Infix version of map with reversed arguments.

val (@) : 'a t ‑> 'a t ‑> 'a t

As append. Concatenate two lists.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

fun <*> l is product (fun f x -> f x) funs l.

val (<$>) : ('a ‑> 'b) ‑> 'a t ‑> 'b t

As map.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

l >>= f is flat_map f l.

val (--) : int ‑> int ‑> int t

Infix alias for range. Bounds included.

val (--^) : int ‑> int ‑> int t

Infix alias for range'. Second bound excluded.

  • Since: 0.17
\ No newline at end of file diff --git a/dev/containers/CCListLabels/Ref/index.html b/dev/containers/CCListLabels/Ref/index.html new file mode 100644 index 00000000..0d34dd03 --- /dev/null +++ b/dev/containers/CCListLabels/Ref/index.html @@ -0,0 +1,3 @@ + +Ref (containers.CCListLabels.Ref)

Module CCListLabels.Ref

type 'a t = 'a list Pervasives.ref
val push : 'a t ‑> 'a ‑> unit
val pop : 'a t ‑> 'a option
val pop_exn : 'a t ‑> 'a

Unsafe version of pop.

  • Raises Failure: if the list is empty.
val create : unit ‑> 'a t

Create a new list reference.

val clear : _ t ‑> unit

Remove all elements.

val lift : ('a list ‑> 'b) ‑> 'a t ‑> 'b

Apply a list function to the content.

val push_list : 'a t ‑> 'a list ‑> unit

Add elements of the list at the beginning of the list ref. Elements +at the end of the list will be at the beginning of the list ref.

\ No newline at end of file diff --git a/dev/containers/CCListLabels/Traverse/argument-1-M/index.html b/dev/containers/CCListLabels/Traverse/argument-1-M/index.html new file mode 100644 index 00000000..4d3ab9eb --- /dev/null +++ b/dev/containers/CCListLabels/Traverse/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (containers.CCListLabels.Traverse.1-M)

Parameter CCListLabels.Traverse.1-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 diff --git a/dev/containers/CCListLabels/Traverse/index.html b/dev/containers/CCListLabels/Traverse/index.html new file mode 100644 index 00000000..e8fbf9d2 --- /dev/null +++ b/dev/containers/CCListLabels/Traverse/index.html @@ -0,0 +1,4 @@ + +Traverse (containers.CCListLabels.Traverse)

Module CCListLabels.Traverse

Parameters

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

Like map_m but map_m_par f (x::l) evaluates f x and +f l "in parallel" before combining their result (for instance +in Lwt).

\ No newline at end of file diff --git a/dev/containers/CCListLabels/index.html b/dev/containers/CCListLabels/index.html new file mode 100644 index 00000000..be35c37d --- /dev/null +++ b/dev/containers/CCListLabels/index.html @@ -0,0 +1,60 @@ + +CCListLabels (containers.CCListLabels)

Module CCListLabels

Complements to list

include module type of ListLabels
val length : 'a list ‑> int
val hd : 'a list ‑> 'a
val compare_lengths : 'a list ‑> 'b list ‑> int
val compare_length_with : 'a list ‑> len:int ‑> int
val cons : 'a ‑> 'a list ‑> 'a list
val tl : 'a list ‑> 'a list
val nth : 'a list ‑> int ‑> 'a
val nth_opt : 'a list ‑> int ‑> 'a option
val rev : 'a list ‑> 'a list
val init : len:int ‑> f:(int ‑> 'a) ‑> 'a list
val append : 'a list ‑> 'a list ‑> 'a list
val rev_append : 'a list ‑> 'a list ‑> 'a list
val concat : 'a list list ‑> 'a list
val flatten : 'a list list ‑> 'a list
val iter : f:('a ‑> unit) ‑> 'a list ‑> unit
val iteri : f:(int ‑> 'a ‑> unit) ‑> 'a list ‑> unit
val map : f:('a ‑> 'b) ‑> 'a list ‑> 'b list
val mapi : f:(int ‑> 'a ‑> 'b) ‑> 'a list ‑> 'b list
val rev_map : f:('a ‑> 'b) ‑> 'a list ‑> 'b list
val fold_left : f:('a ‑> 'b ‑> 'a) ‑> init:'a ‑> 'b list ‑> 'a
val fold_right : f:('a ‑> 'b ‑> 'b) ‑> 'a list ‑> init:'b ‑> 'b
val iter2 : f:('a ‑> 'b ‑> unit) ‑> 'a list ‑> 'b list ‑> unit
val map2 : f:('a ‑> 'b ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c list
val rev_map2 : f:('a ‑> 'b ‑> 'c) ‑> 'a list ‑> 'b list ‑> 'c list
val fold_left2 : f:('a ‑> 'b ‑> 'c ‑> 'a) ‑> init:'a ‑> 'b list ‑> 'c list ‑> 'a
val fold_right2 : f:('a ‑> 'b ‑> 'c ‑> 'c) ‑> 'a list ‑> 'b list ‑> init:'c ‑> 'c
val for_all : f:('a ‑> bool) ‑> 'a list ‑> bool
val exists : f:('a ‑> bool) ‑> 'a list ‑> bool
val for_all2 : f:('a ‑> 'b ‑> bool) ‑> 'a list ‑> 'b list ‑> bool
val exists2 : f:('a ‑> 'b ‑> bool) ‑> 'a list ‑> 'b list ‑> bool
val mem : 'a ‑> set:'a list ‑> bool
val memq : 'a ‑> set:'a list ‑> bool
val find : f:('a ‑> bool) ‑> 'a list ‑> 'a
val find_opt : f:('a ‑> bool) ‑> 'a list ‑> 'a option
val filter : f:('a ‑> bool) ‑> 'a list ‑> 'a list
val find_all : f:('a ‑> bool) ‑> 'a list ‑> 'a list
val partition : f:('a ‑> bool) ‑> 'a list ‑> 'a list * 'a list
val assoc : 'a ‑> ('a * 'b) list ‑> 'b
val assoc_opt : 'a ‑> ('a * 'b) list ‑> 'b option
val assq : 'a ‑> ('a * 'b) list ‑> 'b
val assq_opt : 'a ‑> ('a * 'b) list ‑> 'b option
val mem_assoc : 'a ‑> map:('a * 'b) list ‑> bool
val mem_assq : 'a ‑> map:('a * 'b) list ‑> bool
val remove_assoc : 'a ‑> ('a * 'b) list ‑> ('a * 'b) list
val remove_assq : 'a ‑> ('a * 'b) list ‑> ('a * 'b) list
val split : ('a * 'b) list ‑> 'a list * 'b list
val combine : 'a list ‑> 'b list ‑> ('a * 'b) list
val sort : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val stable_sort : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val fast_sort : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val sort_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list
val merge : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list
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

Safe version of List.map.

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

Infix version of map with reversed arguments.

  • Since: 0.5
val cons : 'a ‑> 'a t ‑> 'a t

cons x l is x::l.

  • Since: 0.12
val append : 'a t ‑> 'a t ‑> 'a t

Safe version of List.append. +Concatenate two lists.

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 (@) : 'a t ‑> 'a t ‑> 'a t

Like append. +Concatenate two lists.

val filter : f:('a ‑> bool) ‑> 'a t ‑> 'a t

Safe version of List.filter. +filter p l returns all the elements of the list l +that satisfy the predicate p. The order of the elements +in the input list is preserved.

val fold_right : ('a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b

Safe version of fold_right. +fold_right f [a1; ...; an] b is +f a1 (f a2 (... (f an b) ...)). Not tail-recursive.

val fold_while : f:('a ‑> 'b ‑> 'a * [ `Stop | `Continue ]) ‑> init:'a ‑> 'b t ‑> 'a

Fold 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 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_map2 : f:('acc ‑> 'a ‑> 'b ‑> 'acc * 'c) ‑> init:'acc ‑> 'a list ‑> 'b list ‑> 'acc * 'c list

fold_map2 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_flat_map : f:('acc ‑> 'a ‑> 'acc * 'b list) ‑> init:'acc ‑> 'a list ‑> 'acc * 'b list

fold_flat_map f acc 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 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 compare : ('a ‑> 'a ‑> int) ‑> 'a t ‑> 'a t ‑> int
val equal : ('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> bool
val flat_map : f:('a ‑> 'b t) ‑> 'a t ‑> 'b t

Map and flatten at the same time (safe). Evaluation order is not guaranteed.

val flatten : 'a t t ‑> 'a t

Safe flatten. Concatenate a list of lists.

val product : f:('a ‑> 'b ‑> 'c) ‑> 'a t ‑> 'b t ‑> 'c t

Cartesian product of the two lists, with the given combinator.

val fold_product : f:('c ‑> 'a ‑> 'b ‑> 'c) ‑> init:'c ‑> 'a t ‑> 'b t ‑> 'c

Fold on the cartesian product.

val diagonal : 'a t ‑> ('a * 'a) t

All pairs of distinct positions of the list. list_diagonal l will +return the list of List.nth i l, List.nth j l if i < j.

val partition_map : f:('a ‑> [< `Left of 'b | `Right of 'c | `Drop ]) ‑> 'a list ‑> 'b list * 'c list

partition_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 sublists_of_len : ?⁠last:('a list ‑> 'a list option) ‑> ?⁠offset:int ‑> len:int ‑> 'a list ‑> 'a list list

sublists_of_len 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].

See CCList.sublists_of_len for more details.

  • Since: 1.5
val pure : 'a ‑> 'a t

pure is return.

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

(<$>) is map.

val return : 'a ‑> 'a t

return x is x.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

l >>= f is flat_map f l.

val take : int ‑> 'a t ‑> 'a t

Take the n first elements, drop the rest.

val drop : int ‑> 'a t ‑> 'a t

Drop the n first elements, keep the rest.

val hd_tl : 'a t ‑> 'a * 'a t

hd_tl (x :: l) returns hd, 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 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

First element.

  • Since: 0.20
val tail_opt : 'a t ‑> 'a t option

Return the given list without its first element.

  • Since: 2.0
val last_opt : 'a t ‑> 'a option

Last element.

  • Since: 0.20
val find_pred : f:('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_pred_exn : f:('a ‑> bool) ‑> 'a t ‑> 'a

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

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 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 ~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 sorted_merge : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list

Merges elements from both sorted list.

val sort_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list

Sort the list and remove duplicate elements.

val sorted_merge_uniq : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> 'a list ‑> 'a list

sorted_merge_uniq l1 l2 merges the sorted lists l1 and l2 and +removes duplicates.

  • Since: 0.10
val is_sorted : cmp:('a ‑> 'a ‑> int) ‑> 'a list ‑> bool

is_sorted l returns true iff l is sorted (according to given order).

  • Parameter cmp: the comparison function (default Pervasives.compare).
  • Since: 0.17
val sorted_insert : cmp:('a ‑> 'a ‑> int) ‑> ?⁠uniq:bool ‑> 'a ‑> 'a list ‑> 'a list

sorted_insert 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 uniq_succ : eq:('a ‑> 'a ‑> bool) ‑> 'a list ‑> 'a list

uniq_succ 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

Like 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.

val iteri : f:(int ‑> 'a ‑> unit) ‑> 'a t ‑> unit

Like 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.

val foldi : f:('b ‑> int ‑> 'a ‑> 'b) ‑> init:'b ‑> 'a t ‑> 'b

Like fold but it also passes in the index of each element to the folded function. Tail-recursive.

val get_at_idx : int ‑> 'a t ‑> 'a option

Get by index in the list. +If the index is negative, it will get element starting from the end +of the list.

val get_at_idx_exn : int ‑> 'a t ‑> 'a

Get the i-th element, or

  • Raises Not_found: if the index is invalid. +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 i-th element (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 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 element at given index. 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 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 x set removes one occurrence of x from set. Linear time.

  • Since: 0.11
val mem : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> 'a t ‑> bool

Membership to the list. Linear time.

val subset : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> bool

Test for inclusion.

val uniq : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t

Remove duplicates w.r.t the equality predicate. +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

List union. Complexity is product of length of inputs.

val inter : eq:('a ‑> 'a ‑> bool) ‑> 'a t ‑> 'a t ‑> 'a t

List intersection. 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

Like range but the second bound is excluded. +For instance range' 0 5 = [0;1;2;3;4].

val (--) : int ‑> int ‑> int t

Infix alias for range.

val (--^) : int ‑> int ‑> int t

Infix alias for range'.

  • Since: 0.17
val replicate : int ‑> 'a ‑> 'a t

Replicate the given element n times.

val repeat : int ‑> 'a t ‑> 'a t

Concatenate the list with itself n times.

Association Lists

module Assoc : sig ... end
val assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> 'b

Like Assoc.get_exn.

  • Since: 2.0
val assoc_opt : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> 'b option

Like Assoc.get.

  • Since: 2.0
val assq_opt : 'a ‑> ('a * 'b) t ‑> 'b option

Safe version of assq.

  • Since: 2.0
val mem_assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * _) t ‑> bool

Like Assoc.mem.

  • Since: 2.0
val remove_assoc : eq:('a ‑> 'a ‑> bool) ‑> 'a ‑> ('a * 'b) t ‑> ('a * 'b) t

Like Assoc.remove.

  • Since: 2.0

References on Lists

  • Since: 0.3.3
module Ref : sig ... end
module type MONAD : sig ... end

Monadic Operations

module Traverse : functor (M : MONAD) -> sig ... end

Conversions

type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = Random.State.t ‑> 'a
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

Randomly choose an element in the list.

  • Raises Not_found: if the list is empty.
val random_sequence : 'a random_gen t ‑> 'a t random_gen
val to_seq : 'a t ‑> 'a sequence

Return a sequence of the elements of the list.

val of_seq : 'a sequence ‑> 'a t

Build a list from a given sequence.

val to_gen : 'a t ‑> 'a gen

Return a gen of the elements of the list.

val of_gen : 'a gen ‑> 'a t

Build a list from a given gen.

val to_klist : 'a t ‑> 'a klist

Return a klist of the elements of the list.

val of_klist : 'a klist ‑> 'a t

Build a list from a given klist.

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

IO

val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a printer ‑> 'a t printer

Print the contents of a list.

\ No newline at end of file diff --git a/dev/containers/CCListLabels/module-type-MONAD/index.html b/dev/containers/CCListLabels/module-type-MONAD/index.html new file mode 100644 index 00000000..c74a4bba --- /dev/null +++ b/dev/containers/CCListLabels/module-type-MONAD/index.html @@ -0,0 +1,2 @@ + +MONAD (containers.CCListLabels.MONAD)

Module type CCListLabels.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 diff --git a/dev/containers/CCMap.odoc b/dev/containers/CCMap.odoc new file mode 100644 index 0000000000000000000000000000000000000000..97fc4aea91ea55af86875b1a251e3ff053569a8b GIT binary patch literal 5454 zcma)A4R9P~8NS=yFKI%jU=6kf#65C9Nk}f&(o(2`*B`=EDQ!8*P!;3mZZBDLw|ngF zB@N6J9Z_KTnGH-^5yWkqAYzp^l>rej3?e@c_y+}%VLE`qC`xAl9Xg0U-{0M~1;)-~ z`t5!1`@Fy3`@Y}jl$>JU;_Q-a?&@uKJ{*h1QurhI>%iX$dwYtG?HiVDy57#z>ecIv zT0U2Q=BaBQ-+N&G`fURXfAPV*0%z>_cP!TWVk~yz?ckl66N@Ed;s3?1DM1+Cw=y3F zE6&^Eo3>{;wx>H~z2F;m$#6?Ll^SBdt!IPlj9Dd9uX|>>UeU{SyXZ4=Q0kU%x`yw# zV7B#eG6lA5As^n-naeKAYxBb}y{cX=n{JT1{kAjD{=+%r1CL$)^r3-)zjudWA8d1M zr|P)15vv&F-rcab|F-oHOg!nH_xOu>uw9!%nCb4)Drt@g+ziY!?<1Z)letK!w&2L@tr(I!~+Eg4dp!(*@ zT5sXKkCH3T|M>xb>$|_t2YZ)zZn3}UxMn{KP!?*o_4kiBRkPo-s*c@1?zp2~%_y3n zlF{rR9I9KDQh&)T8}*8xn;CuLx%(a&JAB~nt49C(=lV}p=7aF&*=cP}muFsHH|?Ss zg!%kz7zPO=pU(#~`I$VHQ$esjS+^}ekCjHS!?-TX)LiDPKwA{$nc6+6t?Vu{@4=G| z4DA%kIXOF}`KPaUOQvgc;dBF?RkIpsS2L1nZJl;DY^1J9Nos8Yr~GoKQ7Q%6t$h1L z?h5|#xiHXL8P`gz=5l&3U9Xi4-wd>UoT?8jY_&b@)aWT_NSFhz79sa*41sE3V)Y4* zwWHg!?BR;(J9eNw$Kf_|4JhR}<7amNDD9e6XADwb=VV2Jdrd>yjZNxbrmChp4C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ek=XHlgs4UL%!6*=JY`iHISC9#m!HBYgsq+p)gpivmbf6 zLcygcFkys2ik&X3LDPe>g=&XFB&!R;5(J5|(Ci7Qv@Ohs`;r%!WnY-RFLjYMJi@+) z=+-J!1_YNXjlUsW$Y{SNi|`@t1|TwD zz?+b#(@95$w|(5IRL~t|hovH@V!Y2tFB9#2Y1#g$hkq7vjN3&$Oif|06tuNAT>Mzm z#Y7vGP|ru9__)V%pk;d!R(RBH%huvTgqlNNu;_2h2zj=a$q2p~vWRQxW{gq!CQs(KynR8AP4gMp|2W*wuxSl4uVJlhkfu66bp5v>FDv zR(&RzOnE-;W>9Z?+Vk-gG>p11ne=?8M)RhPex(f8b;jxE3G}nmGuhq(Zsjy-y^gf@ zG7HtsVj$Dnqz>Bgd)_ +CCMap (containers.CCMap)

Module CCMap

Extensions of Standard Map

Provide useful functions and iterators on Map.S

  • Since: 0.5
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type OrderedType = Map.OrderedType
module type S : sig ... end
module Make : functor (O : Map.OrderedType) -> S with type 'a Make.t = 'a Map.Make(O).t and type Make.key = O.t
\ No newline at end of file diff --git a/dev/containers/CCMap/module-type-S/index.html b/dev/containers/CCMap/module-type-S/index.html new file mode 100644 index 00000000..7b263117 --- /dev/null +++ b/dev/containers/CCMap/module-type-S/index.html @@ -0,0 +1,10 @@ + +S (containers.CCMap.S)

Module type CCMap.S

include Map.S
type key
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 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 get : key ‑> 'a t ‑> 'a option

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 Nonek 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

Safe version of choose.

  • Since: 1.5
val min_binding_opt : 'a t ‑> (key * 'a) option

Safe version of min_binding.

  • Since: 1.5
val max_binding_opt : 'a t ‑> (key * 'a) option

Safe version of max_binding.

  • Since: 1.5
val find_opt : key ‑> 'a t ‑> 'a option

Safe version of find.

  • Since: 1.5
val find_first : (key ‑> bool) ‑> 'a t ‑> key * 'a

Find smallest binding satisfying the monotonic predicate. +See Map.S.find_first.

  • Since: 1.5
val find_first_opt : (key ‑> bool) ‑> 'a t ‑> (key * 'a) option

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 union : (key ‑> 'a ‑> 'a ‑> 'a option) ‑> 'a t ‑> 'a t ‑> 'a t

Union of both maps, using the function to combine bindings +that belong to both inputs.

  • Since: 1.4
val of_seq : (key * 'a) sequence ‑> 'a t

Like of_list.

val add_seq : 'a t ‑> (key * 'a) sequence ‑> 'a t
  • Since: 0.14
val to_seq : 'a t ‑> (key * 'a) sequence
val of_list : (key * 'a) list ‑> 'a t

Build a map from the given list 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 add_list : 'a t ‑> (key * 'a) list ‑> 'a t
  • Since: 0.14
val keys : _ t ‑> key sequence

Iterate on keys only.

  • Since: 0.15
val values : 'a t ‑> 'a sequence

Iterate on values only.

  • Since: 0.15
val to_list : 'a t ‑> (key * 'a) list
val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠arrow:string ‑> ?⁠sep:string ‑> key printer ‑> 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/dev/containers/CCNativeint.odoc b/dev/containers/CCNativeint.odoc new file mode 100644 index 0000000000000000000000000000000000000000..ce1416f954efa64f57c41ed29a8bf6aa2133e8d0 GIT binary patch literal 7521 zcmb_h3v3+48Me>6B)+ue9U(+u;yc@Sv3)+rCP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tPZQ)<#j2+;c1M+m=A-zZ(ABHL0jp2wdu8$ZtB`#|VBFG3oe&(@rWsraMS(uT)wCErCzOKL+6%f*hsmX`hO zq=q&MzmmUE2Pd7AH___zjuEk>R$FX1ivFtqF~GGgptf!b1HmgowH4(Aofb+*X986d z&jJJjKYo=!49yG#R;%8h%V5xP@Z_IqDi1^A=L=)A=L<)NF?uXaGwB*mP~m@CcLWLBY_u&K;HDIkxPU`)EOg5UsWELu**Xit`zbf5U}^-iQ!Sg zy&!Qxh`UMP_HZ0JtXP8M-jcYxL)?7=_o~Dl98ZjL#UDxFV>O2Yj za|nD%06&w!!B}FLa7Reo-$L9w9M^Uric%D)0@_fyz*p)ip8rrUYm#> zB&;QH51edl!ZALxVo4x^xLT@BWsBOTNd0Z|h5ml2`N23|3X4>8cFrv?MfHPh6xh@Z zsWC20*_H{e^C4r`aoE;N#%v2uQS>Gi7T)R`VRuFjb_;;V@3;xvxt4rJ41I&T*$;Wk zl5{m_Rx~W8LXdb7F{^*m`^XrE#diC=xHu z6^S|Z3X_`6?2YCPH-`&4T&#j@Xi(Loar2NG4mJg@bFf7zpH4PiQ}XS&zQ~jUXbKz@E30(2x%%RZxM_r&~^oNQJ&t1QD|w_gwD>!HuG=y)dRjAz9GR?s*L6E zncv-E1&%L6lrP~>`9eNk>@C$Dm8<<`yY4Ye; zN}5^I()O5Gwo$32($HAzQx@&*FV5k5ClAxxr{-EbX&LRl8A&SwFXwq_q4Atl}R(;A9aWFQgbya~{?o0 z9BS`I-%5!q(wK@@*%LII0Ilr2Cbkoc?0m`7@OEvYy_mc zeyL()3r6~SSr!T4h +Infix (containers.CCNativeint.Infix)

Module CCNativeint.Infix

val (+) : t ‑> t ‑> t
val (-) : t ‑> t ‑> t
val (~-) : t ‑> t
val (*) : t ‑> t ‑> t
val (/) : t ‑> t ‑> t
val (mod) : t ‑> t ‑> t
val (land) : t ‑> t ‑> t
val (lor) : t ‑> t ‑> t
val (lxor) : t ‑> t ‑> t
val (lnot) : t ‑> t
val (lsl) : t ‑> int ‑> t
val (lsr) : t ‑> int ‑> t
val (asr) : t ‑> int ‑> t
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 diff --git a/dev/containers/CCNativeint/index.html b/dev/containers/CCNativeint/index.html new file mode 100644 index 00000000..57ac31f8 --- /dev/null +++ b/dev/containers/CCNativeint/index.html @@ -0,0 +1,40 @@ + +CCNativeint (containers.CCNativeint)

Module CCNativeint

Nativeint

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.

  • Since: 2.1
include module type of sig ... end
val zero : nativeint
val one : nativeint
val minus_one : nativeint
external neg : nativeint ‑> nativeint = "%nativeint_neg"
external add : nativeint ‑> nativeint ‑> nativeint = "%nativeint_add"
external sub : nativeint ‑> nativeint ‑> nativeint = "%nativeint_sub"
external mul : nativeint ‑> nativeint ‑> nativeint = "%nativeint_mul"
external div : nativeint ‑> nativeint ‑> nativeint = "%nativeint_div"
external rem : nativeint ‑> nativeint ‑> nativeint = "%nativeint_mod"
val succ : nativeint ‑> nativeint
val pred : nativeint ‑> nativeint
val abs : nativeint ‑> nativeint
val size : int
val max_int : nativeint
val min_int : nativeint
external logand : nativeint ‑> nativeint ‑> nativeint = "%nativeint_and"
external logor : nativeint ‑> nativeint ‑> nativeint = "%nativeint_or"
external logxor : nativeint ‑> nativeint ‑> nativeint = "%nativeint_xor"
val lognot : nativeint ‑> nativeint
external shift_left : nativeint ‑> int ‑> nativeint = "%nativeint_lsl"
external shift_right : nativeint ‑> int ‑> nativeint = "%nativeint_asr"
external shift_right_logical : nativeint ‑> int ‑> nativeint = "%nativeint_lsr"
external of_int : int ‑> nativeint = "%nativeint_of_int"
external to_int : nativeint ‑> int = "%nativeint_to_int"
external of_float : float ‑> nativeint = "caml_nativeint_of_float" "caml_nativeint_of_float_unboxed"
external to_float : nativeint ‑> float = "caml_nativeint_to_float" "caml_nativeint_to_float_unboxed"
external of_int32 : int32 ‑> nativeint = "%nativeint_of_int32"
external to_int32 : nativeint ‑> int32 = "%nativeint_to_int32"
external of_string : string ‑> nativeint = "caml_nativeint_of_string"
val of_string_opt : string ‑> nativeint option
val to_string : nativeint ‑> string
type t = nativeint
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external format : string ‑> nativeint ‑> string = "caml_nativeint_format"
val (+) : t ‑> t ‑> t

Addition.

val (-) : t ‑> t ‑> t

Subtraction.

val (~-) : t ‑> t

Unary negation.

val (*) : t ‑> t ‑> t

Multiplication.

val (/) : 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 Pervasives.(/).

val (mod) : t ‑> t ‑> t

x mod y is the integer remainder. +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 (land) : t ‑> t ‑> t

Bitwise logical and.

val (lor) : t ‑> t ‑> t

Bitwise logical or.

val (lxor) : t ‑> t ‑> t

Bitwise logical exclusive or.

val (lnot) : t ‑> t

Bitwise logical negation.

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.

module Infix : sig ... end
val equal : t ‑> t ‑> bool

The equal function for native integers. +Like Pervasives.(=) x y).

val hash : t ‑> int

Like Pervasives.abs (to_int x).

Conversion

val to_int : t ‑> int

Convert the given native integer (type nativeint) to an +integer (type int). The high-order bit is lost +during the conversion.

val of_int : int ‑> t

Alias to Nativeint.of_int. +Convert the given integer (type int) to a native integer (type nativeint).

val to_float : t ‑> float

Convert the given native integer to a floating-point number.

val of_float : float ‑> t

Alias to Nativeint.of_float. +Convert the given floating-point number to a native integer, +discarding the fractional part (truncate towards 0). +The result of the conversion is undefined if, after truncation, the number +is outside the range [CCNativeint.min_int, CCNativeint.max_int].

val to_string : t ‑> string

Return the string representation of its argument, in decimal.

val of_string_exn : string ‑> t

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 of_string : string ‑> t option

Safe version of of_string_exn. +Like of_string_exn, but return None instead of raising.

val of_string_opt : string ‑> t option

Alias to of_string.

\ No newline at end of file diff --git a/dev/containers/CCOpt.odoc b/dev/containers/CCOpt.odoc new file mode 100644 index 0000000000000000000000000000000000000000..a798bf4c286bb6d2233a0530af0bc7fc96315236 GIT binary patch literal 6412 zcmcgw3yfS<8Qz`VyDvnDya~wJ&U3fBGqYRhgFc+HvUH85g)J%%Gv1xK)4l1;y~DkC zc6W+4N(2nSaJRKvu}Uv*i3p{!Rxp7gK{OyfKvWQdL1Kv{v?0}~LHz!6&Ye3`wg@B| zQuf?4=luV7{^xg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|>;++t>vGYl6R2Hq`S9g>J@QN%@LbNxS*<_MC7PyPgxB0ZGMf4jn{&o)co z+h5|_`S8_H(uV&};&*f(o%kImafF1YL(q0^s_Q>U-gkuTyo1=ew9dW%qbTi|s~j>0BuAwLqYJo19 zkx}iuE)@_!PwiYP9vfk4ujxkD@gtti9X}=y@J+j-n{*TF*EO%_;rJ9^+PR)<2$nyX ztlIp&7+VT0TgY0w`_S+4hKx>wQUa54K?fVke%6miO+4G?h0ZOl0!YHG@o^XTuU>kc zLo5l0y_68!pz~&KT^#n$%2^y3G~k(&^mJ|!NX4Eb{i00fVH4iq!cXQLgSV)W0nmf) zj9~Hn!Iv(|fmNM!&sfOg!$RA1+f6g8P^j535pF2-#?=d5@zy#!&&7AKD7<&6T};^} z4zoubh96ASL4K~Tp#&mNnD12)X`M1$@%XEDtyb>f8^z)aX)zft4CV5E3e$&SSPJ}gipYg{{i+4wn_j1 literal 0 HcmV?d00001 diff --git a/dev/containers/CCOpt/.jbuilder-keep b/dev/containers/CCOpt/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCOpt/Infix/index.html b/dev/containers/CCOpt/Infix/index.html new file mode 100644 index 00000000..ef52846b --- /dev/null +++ b/dev/containers/CCOpt/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (containers.CCOpt.Infix)

Module CCOpt.Infix

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

x >|= f is map f x.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Monadic bind.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

f <$> (Some x) returns Some (f x) and f <$> None returns None.

val (<$>) : ('a ‑> 'b) ‑> 'a t ‑> 'b t

Like map.

val (<+>) : 'a t ‑> 'a t ‑> 'a t

a <+> b is a if a is Some _, b otherwise.

\ No newline at end of file diff --git a/dev/containers/CCOpt/index.html b/dev/containers/CCOpt/index.html new file mode 100644 index 00000000..851cd7dc --- /dev/null +++ b/dev/containers/CCOpt/index.html @@ -0,0 +1,10 @@ + +CCOpt (containers.CCOpt)

Module CCOpt

Options

type +'a t = 'a option
val map : ('a ‑> 'b) ‑> 'a t ‑> 'b t

Transform the element inside, 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 if f o 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 two options, using custom comparators for the value. +None is always assumed to be less than Some _.

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

Test for equality between option types using a custom equality predicat.

val return : 'a ‑> 'a t

Monadic return, that is return x = Some x.

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

Infix version of map.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Monadic bind.

val flat_map : ('a ‑> 'b t) ‑> 'a t ‑> 'b t

Flip version of >>=.

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

Iterate on 0 or 1 element.

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

Fold on 0 or 1 element.

val filter : ('a ‑> bool) ‑> 'a t ‑> 'a t

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

Return true iff there exists an element for which the provided function evaluates to true.

  • Since: 0.17
val for_all : ('a ‑> bool) ‑> 'a t ‑> bool

Return true iff the provided function 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 = None.

  • Since: 0.18
val get_exn : 'a t ‑> 'a

Open the option, possibly failing if it is None.

  • Raises Invalid_argument: if the option is None.
val get_lazy : (unit ‑> 'a) ‑> 'a t ‑> 'a

get_lazy default_fn x unwraps x, but if x = 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 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 f x y is similar to wrap but for binary functions.

Applicative

val pure : 'a ‑> 'a t

Alias to return.

val (<*>) : ('a ‑> 'b) t ‑> 'a t ‑> 'b t

f <$> (Some x) returns Some (f x) and f <$> None returns None.

val (<$>) : ('a ‑> 'b) ‑> 'a t ‑> 'b t

Like map.

Alternatives

val or_ : else_:'a t ‑> 'a t ‑> 'a t

or_ ~else_ a is a if a is Some _, else_ otherwise.

  • Since: 1.2
val or_lazy : else_:(unit ‑> 'a t) ‑> 'a t ‑> 'a t

or_lazy ~else_ a is a if a is Some _, else_ () otherwise.

  • Since: 1.2
val (<+>) : 'a t ‑> 'a t ‑> 'a t

a <+> b is a if a is Some _, b otherwise.

val choice : 'a t list ‑> 'a t

choice returns the first non-None element of the list, or None.

Infix Operators

  • Since: 0.16
module Infix : sig ... end

Conversion and IO

val to_list : 'a t ‑> 'a list
val of_list : 'a list ‑> 'a t

Head of list, or None.

val to_result : 'e ‑> 'a t ‑> ('a'e) Result.result
  • Since: 1.2
val to_result_lazy : (unit ‑> 'e) ‑> 'a t ‑> ('a'e) Result.result
  • Since: 1.2
val of_result : ('a_) Result.result ‑> 'a t
  • Since: 1.2
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a gen = unit ‑> 'a option
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a random_gen = Random.State.t ‑> 'a
val random : 'a random_gen ‑> 'a t random_gen
val choice_seq : 'a t sequence ‑> 'a t

choice_seq s is similar to choice, but works on sequences. +It returns the first Some x occurring in s, or None otherwise.

  • Since: 0.13
val to_gen : 'a t ‑> 'a gen
val to_seq : 'a t ‑> 'a sequence
val pp : 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/dev/containers/CCOrd.odoc b/dev/containers/CCOrd.odoc new file mode 100644 index 0000000000000000000000000000000000000000..217c4ce1cc4b111a003175e4875e7cb57aa6dc42 GIT binary patch literal 2532 zcmdT_UuauZ7*FGkTcV7iJ}5FhZId=>(%@T^Hzz*$rxvuJC@pA5A4;#P47M5 z|L^<#zQfAQ85+)w7{EYzBy}) z)e)aNd53Y5*R|%rb3C7)V^xy(X_a~TMaGZ&HS7@3YBwf-v{a{VIbS9fTz7-Qm&fK$ z-Wps!*7zviSev=`&>maJr3>e+zU}}j74dzYGEq8U0d^7NWx}a9n?WTKEE3|OV38r> zk}B~6KZ}An93W1DI`@2pJp}dUZ2JOu>&DP2v1Y@I{&`b~m0l3TsXVp%jh1216-|-(I$cn9>4PS3*-8eyPM`xrh*m046wzgN5`YqY=pdBHK?GtSSIPB2<0jyw z3cHdlG3JIfzN88kQfF^XN|nk}ru{6IBUSliU`loGC(Gox}&dlJ?TrEo-BXN_nz zRdE>(gf*aK$F*^I1PZSSsBV4ImSWfAq(L1v%dr9}g7KE9hXcyI_7pCr(hp6HXTYE} z;tV5rM`@UO7B#Y{nUP}j`f%G-BkUvD>T!mpNJ6*T?`cGRC(5iBd`qz#1}}v`%_Uj$uXVCfsmhR82qLzP}tdU@ z8k}Fnu1mP0vj?qjg1B!6mJ2$nx^2tlWFa>^YGD4`^}v6Is12R#QmTg7T;wKDJ@!B`X>;srGV#jg;)YU80w-E-6|)kuOYnuVLeL#%X+IIx9)7=I(l zU^Y?X?7yV_2CQILfq45+n&f74<`4tL;btkL3MFniqnQWEcnL!$l^O#U8~>1#j}~b# z2U&!49?T^=RBVmv%KQLGv5Aqei`tC$+f?tcdO*`<0QF;7Ib*2QRNbIFQK1|hsXPFx z`es=J3<6*PK&I&%&|U+k%evF*Ziq$iOQpx3e^~7`v2(vyp$(+hK6b&4;)8r!0CAoL zS_8a8T*tb8(7rk$^!R@by^3GX#-hcP_60NlwAIp=Q2hV7KiefoA8qfISajSJ+F2~I f=rbDZ*5RA#=GQlLGy2@WbTjJeAaMKG0-nDBxT3q@ literal 0 HcmV?d00001 diff --git a/dev/containers/CCOrd/.jbuilder-keep b/dev/containers/CCOrd/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCOrd/Infix/index.html b/dev/containers/CCOrd/Infix/index.html new file mode 100644 index 00000000..518312f2 --- /dev/null +++ b/dev/containers/CCOrd/Infix/index.html @@ -0,0 +1,4 @@ + +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 diff --git a/dev/containers/CCOrd/index.html b/dev/containers/CCOrd/index.html new file mode 100644 index 00000000..bf28fcc5 --- /dev/null +++ b/dev/containers/CCOrd/index.html @@ -0,0 +1,15 @@ + +CCOrd (containers.CCOrd)

Module CCOrd

Comparisons

type 'a t = 'a ‑> 'a ‑> int

Comparison (total ordering) between two elements, that returns an int.

val compare : 'a t

Polymorphic "magic" comparison.

val opp : 'a t ‑> 'a t

Opposite order.

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 diff --git a/dev/containers/CCPair.odoc b/dev/containers/CCPair.odoc new file mode 100644 index 0000000000000000000000000000000000000000..11ff9832860fe3caa4a85af63d25b088739c3253 GIT binary patch literal 2542 zcmb_eU2GIp6y9BS42#+jHPK*@yX=2yceVvlOj`yPOGs=iDfo-QyR&z8M`q>@^V4=Q zQDcZN`Y;OtLLlU#l=xt@At6K_OcOK>51RNB6Nx6i5Mv;L7oL3a+&i;$3y3xGVYc^9 z@BPlX-}%mWht{duKTsYlR}LOI`&BF!%flnV^B6oUXM0s@d04lIRYO(Q_EEpCAplj{8nGnh!a#!p4hnQhvBKwZ}xwCb9D4tiLw4_b&Oinq>kOx)u3`~ zd{#d3;>Ffw=lS_7r@p(y*t1n^8oK2X$HK-abxiDS#jdWpL8bNiM?DuN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Y)jPA*-7)h0I*-YFg1=RytI8Q9JV%)1^e eZa^w9n~|2S3h(7`4xdci^f_rgY{APQ*S`U|sng>C literal 0 HcmV?d00001 diff --git a/dev/containers/CCPair/.jbuilder-keep b/dev/containers/CCPair/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCPair/index.html b/dev/containers/CCPair/index.html new file mode 100644 index 00000000..e236b9aa --- /dev/null +++ b/dev/containers/CCPair/index.html @@ -0,0 +1,4 @@ + +CCPair (containers.CCPair)

Module CCPair

Tuple Functions

type ('a, 'b) t = 'a * 'b
val make : 'a ‑> 'b ‑> ('a'bt

Make a tuple from its components.

  • Since: 0.16
val map1 : ('a ‑> 'b) ‑> ('a * 'c) ‑> 'b * 'c

map1 f (x, y) returns (f x, y).

val map2 : ('a ‑> 'b) ‑> ('c * 'a) ‑> 'c * 'b

map2 f (x, y) returns (x, f y).

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 map_fst : ('a ‑> 'b) ‑> ('a * _) ‑> 'b

Compose the given function with fst.

  • Since: 0.3.3
val map_snd : ('a ‑> 'b) ‑> (_ * 'a) ‑> 'b

Compose the given function with snd.

  • Since: 0.3.3
val iter : ('a ‑> 'b ‑> unit) ‑> ('a * 'b) ‑> unit
val swap : ('a * 'b) ‑> 'b * 'a

Swap the components of the tuple.

val (<<<) : ('a ‑> 'b) ‑> ('a * 'c) ‑> 'b * 'c

Map on the left side of the tuple.

val (>>>) : ('a ‑> 'b) ‑> ('c * 'a) ‑> 'c * 'b

Map on the right side of the tuple.

val (***) : ('a ‑> 'c) ‑> ('b ‑> 'd) ‑> ('a * 'b) ‑> 'c * 'd

Map on both sides of a tuple.

val (&&&) : ('a ‑> 'b) ‑> ('a ‑> 'c) ‑> 'a ‑> 'b * 'c

f &&& g is fun x -> f x, g x. It splits the computations into +two parts.

val merge : ('a ‑> 'b ‑> 'c) ‑> ('a * 'b) ‑> 'c

Uncurrying (merges the two components of a tuple).

val fold : ('a ‑> 'b ‑> 'c) ‑> ('a * 'b) ‑> 'c

Synonym to merge.

  • Since: 0.3.3
val dup : 'a ‑> 'a * 'a

dup x = (x,x) (duplicate the value).

  • Since: 0.3.3
val dup_map : ('a ‑> 'b) ‑> 'a ‑> 'a * 'b

dup_map f x = (x, f x). Duplicates the value and applies the function +to the second copy.

  • Since: 0.3.3
val equal : ('a ‑> 'a ‑> bool) ‑> ('b ‑> 'b ‑> bool) ‑> ('a * 'b) ‑> ('a * 'b) ‑> bool
val compare : ('a ‑> 'a ‑> int) ‑> ('b ‑> 'b ‑> int) ‑> ('a * 'b) ‑> ('a * 'b) ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit
val pp : ?⁠sep:string ‑> 'a printer ‑> 'b printer ‑> ('a * 'b) printer

Print a pair given an optional separator and a method for printing each of its elements.

\ No newline at end of file diff --git a/dev/containers/CCParse.odoc b/dev/containers/CCParse.odoc new file mode 100644 index 0000000000000000000000000000000000000000..154eba44dbd01b12546e91fc9d8ed02609357cee GIT binary patch literal 10061 zcmd^FeT*FES-(5a+}&>4G^hosRnxq;w|BdH-rGB$&&40Hv&q$I9P;7BcB_;`$L#LA zx09QlS!QPMZjDJmlopjXolR?}!hj|wp-D)BW2vMnQfep=5E7PvA|;Aws}__$N*a}d z5LCeLdEWUt+pPkBKoORFJNv%x^ZmTf*R0cWn)ADAOSQ$1p8oBZMn*hda}Ow!aeVJ`RvRagVEXA$>+cC98;jP-y0dpua1n|usAaE z-rFZfMv5chTSTCZ1!4H&&Gj%i^dadE#4)qmv!q~hu2^xp4bwJ!$Mx!AJ$y7jGBWy< z;D1g}+9KlXz=3>Tt@?wW6uv8^I4JHAPFt9^FHVWO=#iJ__#*|dq%XSbtClp{VvB*c zB2>|i?X)Cz2H3l+yj2}kVp6oJ5GF+Ak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YOUws4?O z%YT^0oIDLfx$JLBfMcPH;ujMhYWI4owhV^!X4&;AZsd-jw;C1+KYu++U#V&1Zy%1r z%;cw2UppPrmUe^EGY6d8=%qZ>1M^3D;Dve}3s4rFoP3%Aa?!X`yRS&US)tRp#k-OQ zENaeCK=3S*YC@8l6v5i!)fnTK6vj`e>P>sF*fUI;_XoKn5d-LmOc(a0oUD}0qduja zjJ~PEkoa*7|B8WT7lpEc;=EFz1inpAXSeI=+%`Qu9qZ{E8IPQN9bZ)XnS28^E!9!{ zMu&BF4kH~CKlEa@?~2)0YyW-5QB+@r_rKcC`>We{|3<`n?%f&QbAnk_NhVjqmnIuC RH=hc^i*(WI+IQ>q{{;KYr6>RZ literal 0 HcmV?d00001 diff --git a/dev/containers/CCParse/.jbuilder-keep b/dev/containers/CCParse/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCParse/Infix/index.html b/dev/containers/CCParse/Infix/index.html new file mode 100644 index 00000000..2db2c0dc --- /dev/null +++ b/dev/containers/CCParse/Infix/index.html @@ -0,0 +1,13 @@ + +Infix (containers.CCParse.Infix)

Module CCParse.Infix

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

Map.

val (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Monadic 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 +results of a is ignored.

val (<|>) : 'a t ‑> 'a t ‑> 'a t

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. +See try_ to ensure a does not consume anything (but it is best +to avoid wrapping large parsers with try_).

val (<?>) : 'a t ‑> string ‑> 'a t

a <?> msg behaves like a, but if a fails without +consuming any input, it fails with msg +instead. Useful as the last choice in a series of <|>: +a <|> b <|> c <?> "expected a|b|c".

\ No newline at end of file diff --git a/dev/containers/CCParse/U/index.html b/dev/containers/CCParse/U/index.html new file mode 100644 index 00000000..317eebba --- /dev/null +++ b/dev/containers/CCParse/U/index.html @@ -0,0 +1,6 @@ + +U (containers.CCParse.U)

Module CCParse.U

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.

val word : string t

Non empty string of alpha num, start with alpha.

val pair : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a t ‑> 'b t ‑> ('a * 'b) t

Parse a pair using OCaml whitespace conventions. +The default is "(a, b)".

val triple : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a t ‑> 'b t ‑> 'c t ‑> ('a * 'b * 'c) t

Parse a triple using OCaml whitespace conventions. +The default is "(a, b, c)".

\ No newline at end of file diff --git a/dev/containers/CCParse/index.html b/dev/containers/CCParse/index.html new file mode 100644 index 00000000..83bcba9e --- /dev/null +++ b/dev/containers/CCParse/index.html @@ -0,0 +1,51 @@ + +CCParse (containers.CCParse)

Module CCParse

Very Simple Parser Combinators

      open CCParse;;
+
+      type tree = L of int | N of tree * tree;;
+
+      let mk_leaf x = L x
+      let mk_node x y = N(x,y)
+
+      let ptree = fix @@ fun self ->
+        skip_space *>
+          ( (try_ (char '(') *> (pure mk_node <*> self <*> self) <* char ')')
+            <|>
+              (U.int >|= mk_leaf) )
+      ;;
+
+      parse_string_exn ptree "(1 (2 3))" ;;
+      parse_string_exn ptree "((1 2) (3 (4 5)))" ;;
+
Parse a list of words
      open Containers.Parse;;
+      let p = U.list ~sep:"," U.word;;
+      parse_string_exn p "[abc , de, hello ,world  ]";;
Stress Test

+This makes a list of 100_000 integers, prints it and parses it back.

      let p = CCParse.(U.list ~sep:"," U.int);;
+
+      let l = CCList.(1 -- 100_000);;
+      let l_printed =
+        CCFormat.(to_string (within "[" "]" (list ~sep:(return ",@,") int))) l;;
+
+      let l' = CCParse.parse_string_exn p l_printed;;
+
+      assert (l=l');;
type 'a or_error = ('a, string) Result.result
type line_num = int
type col_num = int
type parse_branch
val string_of_branch : parse_branch ‑> string
exception ParseError of parse_branch * unit ‑> string

parsing branch * message.

Input

type position
type state
val state_of_string : string ‑> state

Combinators

type 'a t = state ‑> ok:('a ‑> unit) ‑> err:(exn ‑> unit) ‑> unit

Takes the input and two continuations: +

  • ok to call with the result when it's done
  • err to call when the parser met an error
  • Raises ParseError: in case of failure.
val return : 'a ‑> 'a t

Always succeeds, without consuming its input.

val pure : 'a ‑> 'a t

Synonym to return.

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

Map.

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 (>>=) : 'a t ‑> ('a ‑> 'b t) ‑> 'b t

Monadic 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 +results of a is ignored.

val fail : string ‑> 'a t

fail msg fails with the given message. It can trigger a backtrack.

val failf : ('a, unit, string, 'b t) Pervasives.format4 ‑> 'a

Format.sprintf version of fail.

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.

val eoi : unit t

Expect the end of input, fails otherwise.

val nop : unit t

Succeed with ().

val char : char ‑> char t

char c parses the character c and nothing else.

val char_if : (char ‑> bool) ‑> char t

char_if f parses a character c if f c = true.

val chars_if : (char ‑> bool) ‑> string t

chars_if f parses a string of chars that satisfy f.

val chars1_if : (char ‑> bool) ‑> string t

Like chars_if, but only non-empty strings.

val endline : char t

Parses '\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 (<|>) : 'a t ‑> 'a t ‑> 'a t

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. +See try_ to ensure a does not consume anything (but it is best +to avoid wrapping large parsers with try_).

val (<?>) : 'a t ‑> string ‑> 'a t

a <?> msg behaves like a, but if a fails without +consuming any input, it fails with msg +instead. Useful as the last choice in a series of <|>: +a <|> b <|> c <?> "expected a|b|c".

val try_ : 'a t ‑> 'a t

try_ p tries to parse like p, but backtracks if p fails. +Useful in combination with <|>.

val suspend : (unit ‑> 'a t) ‑> 'a t

suspend f is the same as f (), but evaluates f () only +when needed.

val string : string ‑> string t

string s parses exactly the string s, and nothing else.

val many : 'a t ‑> 'a list t

many p parses a list of p, eagerly (as long as possible).

val many1 : 'a t ‑> 'a list t

Parse a non-empty list.

val skip : _ t ‑> unit t

skip p parses zero or more times p and ignores its result.

val sep : by:_ t ‑> 'a t ‑> 'a list t

sep ~by p parses a list of p separated by by.

val sep1 : by:_ t ‑> 'a t ‑> 'a list t

sep1 ~by p parses a non empty list of p, separated by by.

val fix : ('a t ‑> 'a t) ‑> 'a t

Fixpoint combinator.

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.

This function is not thread-safe.

val fix_memo : ('a t ‑> 'a t) ‑> 'a t

Like fix, but the fixpoint is memoized.

val get_lnum : int t

Reflect the current line number.

val get_cnum : int t

Reflect the current column number.

val get_pos : (int * int) t

Reflect the current (line, column) numbers.

Parse

Those functions have a label ~p on the parser, since 0.14.

val parse : 'a t ‑> state ‑> 'a or_error

parse p st applies p on the input, and returns Ok x if +p succeeds with x, or Error s otherwise.

val parse_exn : 'a t ‑> state ‑> 'a

Unsafe version of parse.

  • Raises ParseError: if it fails.
val parse_string : 'a t ‑> string ‑> 'a or_error

Specialization of parse for string inputs.

val parse_string_exn : 'a t ‑> string ‑> 'a
  • Raises ParseError: if it fails.
val parse_file : 'a t ‑> string ‑> 'a or_error

parse_file p file parses file with p by opening the file +and reading it whole.

val parse_file_exn : 'a t ‑> string ‑> 'a
  • Raises ParseError: if it fails.

Infix

module Infix : sig ... end

Utils

This is useful to parse OCaml-like values in a simple way.

module U : sig ... end
\ No newline at end of file diff --git a/dev/containers/CCRandom.odoc b/dev/containers/CCRandom.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8dfbe0f7e7e41170d66b47bf6970b56b7b47e6b5 GIT binary patch literal 6138 zcmbVQ4U8OR8NS<_DcllKl!7%FzU$rI?cUGs-q9Y=pX-(@B_&cyX^BLW&D`#{cjL{@ zY-eV#cWA^$g4P(FZK1`I$j|~6g>s^%5riC3Ad37XfC>16#%M%HpehLoA^3dnJF~l- z)DSM&+|2jAKhOL7z27)xr!+E}9n0o#y7it%J32bj`04nq#P6KN!IES9hG|RJyE8pG zxzn)APPLH#x?GvPzkbGh`#b-*?dezlnPA@Y!;X#>U+U=iR2Ho6nH?Q{9pQ(Spe2GZ zJh{0L2BWM*Tp^*=@EzAH6bjmzVK_25d6i>3RmZK(n57{9){e#8?N>jv@N4(-Ctv>l zGrtVOOD2t~W!k=UZNu8?xK+cy%<#;T7vvXCeEaN^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)cfaZWjQN%kP;6*GE8H_FvR zh0#RFxDW@M@`-9x)rX=*8}1%xqm2}_*#g|c--|fLENTSLEMsXk(3TU3L{w@>}=eYLtP16@DS zoQ<_b=2VlV{uU}`5EY~Ak3`rW0Z4q%Xnq{gwI_+506mRIe9&kq&F#dUz3svqD_(Iy zFFpxSwr<%?w;m&&Q0Y^cNaM8jOf}RXgD4YlO^(wjL*EnH#B$(Pdp@Cfw-90F5gus6 zBYa$}xFmc+GT5ER=Bq6?OCBn_=8r9Ccdv=c*AG)R^Fo;dWmm< zFLFtg`mCC0_})b~fcRe0$av-rvWUAsL0)lo1bM|LqX(UbYGsc;zzKqJzfkxuwu~?o literal 0 HcmV?d00001 diff --git a/dev/containers/CCRandom/.jbuilder-keep b/dev/containers/CCRandom/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCRandom/index.html b/dev/containers/CCRandom/index.html new file mode 100644 index 00000000..bd38ff55 --- /dev/null +++ b/dev/containers/CCRandom/index.html @@ -0,0 +1,23 @@ + +CCRandom (containers.CCRandom)

Module CCRandom

Random Generators

include module type of sig ... end
val init : int ‑> unit
val full_init : int array ‑> unit
val self_init : unit ‑> unit
val bits : unit ‑> int
val int : int ‑> int
val int32 : Int32.t ‑> Int32.t
val nativeint : Nativeint.t ‑> Nativeint.t
val int64 : Int64.t ‑> Int64.t
val float : float ‑> float
val bool : unit ‑> bool
module State = Random.State
val get_state : unit ‑> State.t
val set_state : State.t ‑> unit
type state = Random.State.t
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_replacement : compare:('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: 0.15
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 ‑> 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
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 diff --git a/dev/containers/CCRef.odoc b/dev/containers/CCRef.odoc new file mode 100644 index 0000000000000000000000000000000000000000..6e9820976058bc3a4de298ab83c72ef6d042bfbd GIT binary patch literal 1662 zcma)5U1%It6y7N_YOsVB#Y#n--JR?<}wm{h1ty1G@+HtnW@FNVqN-R_XtnaQ1* zEKQ*(_$YEWH7OD;H%%i-TaATUtf+;m!3PV~pj7)HiccyAB>Es0&%Lv=NkpNrm%TsV zch2{nbH**ZW^X>%m(yOHdE=u*BGCa$f^{#fZA)FI>jZ}7Anea~6bgq>Mc2;1eBbL& zExdcP{e$1{8SZ~&e?+_^n@DWg3fvp8rtV54lmxvky10cM0;)S;oV>EsTV(;_+qtK{JE3T-a_GN*Kunu_Ntaiw6)k8;7Y35o&;7c#y|i_DNGEjq%Az=!^)PowsIFh3lq3yZ z*U1I_%tAv{IxE~TnAb1p@N|ZdStWF=05F_>DDC1h5qEB60}&L8Cb3(!;i^fT|`bGyA^(f zkkM4HD`a{WKrH)zq^0nDr0(xb=#`u5+6E5u{pLVfzm=nI1y%ld1SZpwV=3#YcsE&| zkyf5%o<|aP^jeOIM?tbPdISaFs-bSWkufDbGP^=GFyza$k%X(Zlx#R<8KWS?jxSsA z;GlZcg&q)NIpcs-y1N-4DoIZ$S}s4(^gBhFniZX!|E4MB(OwV`DPifjlub9cFU7UX z|CW-*-QEA8WS%SeD^hZ+sRSv0oex=~i*4i}F9&^;WMnVo1xP2^QGu#}$5fD~q=Q$3 zHsA$LtrtLX@9BK5ziEAiw;*c!cYF_}kc9os)TgqhTk{Nz;I0x)up}%>LMevA471w( z!Ou<7dmZqh88%Rk$CM8xVZGU$A_?sqIoGm*J8D~g0IXTgl7t81B(n;8;U_lolJH{& r(C|3}_-qrb#b8jkDhb{O^q(ou1LViCm|K$YS&WYKOTqzu0iXUq79Wzw literal 0 HcmV?d00001 diff --git a/dev/containers/CCRef/.jbuilder-keep b/dev/containers/CCRef/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCRef/index.html b/dev/containers/CCRef/index.html new file mode 100644 index 00000000..f1787792 --- /dev/null +++ b/dev/containers/CCRef/index.html @@ -0,0 +1,2 @@ + +CCRef (containers.CCRef)

Module CCRef

References

  • Since: 0.9
type 'a printer = Format.formatter ‑> 'a ‑> unit
type 'a ord = 'a ‑> 'a ‑> int
type 'a eq = 'a ‑> 'a ‑> bool
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a t = 'a Pervasives.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 compare : 'a ord ‑> 'a t ord
val equal : 'a eq ‑> 'a t eq
val to_list : 'a t ‑> 'a list
val to_seq : 'a t ‑> 'a sequence
val pp : 'a printer ‑> 'a t printer
\ No newline at end of file diff --git a/dev/containers/CCResult.odoc b/dev/containers/CCResult.odoc new file mode 100644 index 0000000000000000000000000000000000000000..8a11feb2b482ab52f6075c012ed75bd8458a1654 GIT binary patch literal 9191 zcmds7du$xXdFN3xBJb!Xu?;o01It75j(2<=DN2fD%MwxUA-32H^IYb1^xB|+l8@^JG&<0e3AxNh16iQ2#| zP^3VA-#7arX$5ZoD2fW8I6FJ@J$~PFW@*>#>iDMeRC)44CqMaoS65dFKN3G1@N?zWT@knalKC=Qy^b4%#iVW(1hXj^5&0uJYzA)v^}VfWtxzDDQaN zQgz2(P>1%K3r)49Jh{1S1P|mV%bVVAh&Knp(4J1cZaMzs#~*t8wSTj7ar&!we*MDq z^iPI^V0`ahaIhC_r#;uG`jf96K0EQyq0b-x3uoU8FFpK?uLQw%BHCzqmeVqu)3&o< zdV5T_QFZ;v~y28dHCAtGNBd7kB*O{%^`_e|+wD zfBcIeDBMz=Ga>!a<^lJLr@tb9YyaoI=iT$#i-v!8tLs!Js`$+M{IO+W57*f|FjXv`cn9tL zW1qZg51eR7+m0qbc3zx;R>1>HllComBF7U;# z;inJp{owqk#M=fA&HLhye9T=5E|?iCuq*rG6ir?YN=C3-j4`*r@ArHW5TpF8ZP$DQ zqrr+I?=+jom7Z6oI%YOIR@sO_JS{UD#ZIz4XjzUEQYz)^W}``THcw-q78~B2GFu8O zY)5aW)#Ms)U9)-DkX@g#mPm}{k{&7x_E8-Q^5BgBNa-+JdZ`M@{cK)&wqo0J2C$Z@ zR@-aXEoHip*!8e>mU)s-4uUYd8#{>W_6zF<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uilder-keep b/dev/containers/CCResult/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCResult/Infix/index.html b/dev/containers/CCResult/Infix/index.html new file mode 100644 index 00000000..a6636cf7 --- /dev/null +++ b/dev/containers/CCResult/Infix/index.html @@ -0,0 +1,5 @@ + +Infix (containers.CCResult.Infix)

Module CCResult.Infix

val (>|=) : ('a'errt ‑> ('a ‑> 'b) ‑> ('b'errt
val (>>=) : ('a'errt ‑> ('a ‑> ('b'errt) ‑> ('b'errt

Monadic composition. e >>= f proceeds as f x if e is Ok x +or returns e if e is an Error.

val (<*>) : ('a ‑> 'b'errt ‑> ('a'errt ‑> ('b'errt

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.

\ No newline at end of file diff --git a/dev/containers/CCResult/Traverse/argument-1-M/index.html b/dev/containers/CCResult/Traverse/argument-1-M/index.html new file mode 100644 index 00000000..63ae4079 --- /dev/null +++ b/dev/containers/CCResult/Traverse/argument-1-M/index.html @@ -0,0 +1,2 @@ + +1-M (containers.CCResult.Traverse.1-M)

Parameter CCResult.Traverse.1-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 diff --git a/dev/containers/CCResult/Traverse/index.html b/dev/containers/CCResult/Traverse/index.html new file mode 100644 index 00000000..70819ccb --- /dev/null +++ b/dev/containers/CCResult/Traverse/index.html @@ -0,0 +1,2 @@ + +Traverse (containers.CCResult.Traverse)

Module CCResult.Traverse

Parameters

Signature

val sequence_m : ('a M.t'errt ‑> ('a'errt M.t
val fold_m : ('b ‑> 'a ‑> 'b M.t) ‑> 'b ‑> ('a'errt ‑> 'b M.t
val map_m : ('a ‑> 'b M.t) ‑> ('a'errt ‑> ('b'errt M.t
val retry_m : int ‑> (unit ‑> ('a'errt M.t) ‑> ('a'err list) t M.t
\ No newline at end of file diff --git a/dev/containers/CCResult/index.html b/dev/containers/CCResult/index.html new file mode 100644 index 00000000..a1eecf7d --- /dev/null +++ b/dev/containers/CCResult/index.html @@ -0,0 +1,27 @@ + +CCResult (containers.CCResult)

Module CCResult

Error Monad

Uses the new "result" type from OCaml 4.03.

  • Since: 0.16
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit

Basics

  • Since: 1.5
include module type of sig ... end
type ('a, 'b) result = ('a'b) Pervasives.result =
| Ok of 'a
| Error of 'b
type (+'good, +'bad) t = ('good'bad) Result.result =
| Ok of 'good
| Error of 'bad
val return : 'a ‑> ('a'errt

Successfully return a value.

val fail : 'err ‑> ('a'errt

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, Buffer.t, unit, ('b, string) t) Pervasives.format4 ‑> 'a

fail_printf format uses format to obtain an error message +and then returns Error msg.

val fail_fprintf : ('a, Format.formatter, unit, ('b, string) t) Pervasives.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, Format.formatter, unit, ('b, string) t ‑> ('b, string) t) Pervasives.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 map : ('a ‑> 'b) ‑> ('a'errt ‑> ('b'errt

Map on success.

val map_err : ('err1 ‑> 'err2) ‑> ('a'err1t ‑> ('a'err2t

Map on the error variant.

val map2 : ('a ‑> 'b) ‑> ('err1 ‑> 'err2) ‑> ('a'err1t ‑> ('b'err2t

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.

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 map_or : ('a ‑> 'b) ‑> ('a'ct ‑> default:'b ‑> 'b

map_or f e ~default returns f x if e = Ok x, default otherwise.

val catch : ('a'errt ‑> 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'errt) ‑> ('a'errt ‑> ('b'errt
val (>|=) : ('a'errt ‑> ('a ‑> 'b) ‑> ('b'errt
val (>>=) : ('a'errt ‑> ('a ‑> ('b'errt) ‑> ('b'errt

Monadic composition. e >>= f proceeds as f x if e is Ok x +or returns e if e is an Error.

val equal : err:'err equal ‑> 'a equal ‑> ('a'errt equal
val compare : err:'err ord ‑> 'a ord ‑> ('a'errt ord
val fold : ok:('a ‑> 'b) ‑> error:('err ‑> 'b) ‑> ('a'errt ‑> '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'errt ‑> bool

Return true if Ok.

  • Since: 1.0
val is_error : ('a'errt ‑> 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'errt

Synonym of return.

val (<*>) : ('a ‑> 'b'errt ‑> ('a'errt ‑> ('b'errt

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 join : (('a'errt'errt ‑> ('a'errt

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'errt ‑> ('b'errt ‑> ('a * 'b'errt

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

Collections

val map_l : ('a ‑> ('b'errt) ‑> 'a list ‑> ('b list, 'errt
val fold_l : ('b ‑> 'a ‑> ('b'errt) ‑> 'b ‑> 'a list ‑> ('b'errt
val fold_seq : ('b ‑> 'a ‑> ('b'errt) ‑> 'b ‑> 'a sequence ‑> ('b'errt

Misc

val choose : ('a'errt 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'errt) ‑> ('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

Monadic Operations

module Traverse : functor (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

Convert an option to a result.

val to_seq : ('a_t ‑> 'a sequence
type ('a, 'b) error = [
| `Ok of 'a
| `Error of 'b
]
val of_err : ('a'berror ‑> ('a'bt
  • Since: 0.17
val to_err : ('a'bt ‑> ('a'berror
  • Since: 0.17

IO

val pp : 'a printer ‑> ('a, string) t printer
val pp' : 'a printer ‑> 'e printer ‑> ('a'et printer

Printer that is generic on the error type.

\ No newline at end of file diff --git a/dev/containers/CCResult/module-type-MONAD/index.html b/dev/containers/CCResult/module-type-MONAD/index.html new file mode 100644 index 00000000..95d076f3 --- /dev/null +++ b/dev/containers/CCResult/module-type-MONAD/index.html @@ -0,0 +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 diff --git a/dev/containers/CCSet.odoc b/dev/containers/CCSet.odoc new file mode 100644 index 0000000000000000000000000000000000000000..4336f5da16e2e93f254f5326d674d467c5dbd416 GIT binary patch literal 3841 zcmb7HZEO_B8NNNwR2YOyBA|p&dC&K0gYV8XX+Vf{Z3m-9!I)f{idL;z-|gXzcW*Dd zdw^S@iWKEXlb|^wj1p3`2Ad|NO)MgaN-MCErZhoGl#uizrAqqsBPKLRRiXw(ZQq%9 z)-f)!T1$K0*?FGl{g`*YoRU*)@5rvs<{vz8>`WvQNy0&CzZcPgwi|4azHL@TGQeCxj*>G9@$wOaV`_}rMJulz?+LfN3ORYiB z-rc>)sW`UdRtL=@%YWQAkvp{c^zbY0hI8*8e*L8&SktZBmRa!)x1w7;j%(|Fm+qNG zkL8D-eWdAy!gE7+G{1k(z2^>cO9){39u)iius2%{dgx$w^H&s?h^m%N? z5&mi1)~nEaTZld@#9ox(_eJY30!x*qMA@-QfW9k4zYRDjbw;A-$|tPIAn zDvJ>l4>`ADdyV82TVZT`)8_?2mC82w zpIIp({Z5s`K9Hh66rw5k2mzt&a435wZR@+F>}L}HBb0qe%AQ{-At)PdlrT{{L`A`a zq2R?-anNx*gVE@63H&+gjY+)^+7Kb-(h~J+jv}|C+{sYxYSOD(CPWimBXMWLLHlEv z{Xfg>|4#m&lH}-;MA@uBO-2in`)oMl>v8vBB|~0R5!%s3VY>y}3#6^S?B_gbao;p|DPof$_cq=pKMnXeM-!oGvsFk~ zy0HA?X?70Tw}dq+zH`>GT~4Ere}@x5*y@VfgOQ@WHfG?&rk`-n=8z z)QFgE8Y=7wu}@u7jj#dc3wqg5cfgSb%20L6YVZ`}<+~J)AhB$?V+qx98a+d!M}?xY zkQ;z6zoM{^$WUIrrY7eQU-sYP1P4UPa$OP&C8uVV1|MRMv zLr=Mm-nVcVNEvlqp=*S?*_o9G%8hM3P`xTle$%ems$5o7Pxno)JPf;|T7`pwS=4=F zMw&&U$xdORVZJo@5O0zPFv|^h&MwtC!nk=>7$|=T<-^TgEE!ZeCE|HHjK`f(&NIT% zcm4n2;8N4jE5mtJg!8ftXWy*)pCg)%>qhe)M&nBLzl)}FRYY?+jOJ7d<_H}A;B?K_ zb@9WZs;jU!t7X@*Re#V>x5FW}q6YQpBVxeX`FsfXgRF)I#wqEdgmQVRd;#Z|a)S)! ztu!2s&<;$UL_XVb3$m!vEd5)K%x1}Klgvvg-;oa1Gx)0da0^i3lnb-d_k@$&!d-LZg)c8Nv$1ME1ZtF26V?oV z#8qqjz$X`vhSzbRWa!aH(X3pIlpzcmPNY0pV&MvAXKOg*9z!l{jUwTARHI}=8ghix zpx!Fq=SG^Of0pCVao)5j- z`NxFkJ5`?WM&62hhG@vWXPnXqCCAakFGXBr9=0yPsh&aZt{kCsQDT!m1RFNFP(Q*Z zo+tA +CCSet (containers.CCSet)

Module CCSet

Wrapper around Set

  • Since: 0.9
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a printer = Format.formatter ‑> 'a ‑> unit
module type OrderedType = Set.OrderedType
module type S : sig ... end
module Make : functor (O : Set.OrderedType) -> S with type Make.t = Set.Make(O).t and type Make.elt = O.t
\ No newline at end of file diff --git a/dev/containers/CCSet/module-type-S/index.html b/dev/containers/CCSet/module-type-S/index.html new file mode 100644 index 00000000..05f676c5 --- /dev/null +++ b/dev/containers/CCSet/module-type-S/index.html @@ -0,0 +1,3 @@ + +S (containers.CCSet.S)

Module type CCSet.S

include Set.S
type elt
type t
val empty : t
val is_empty : t ‑> bool
val mem : elt ‑> t ‑> bool
val add : elt ‑> t ‑> t
val singleton : elt ‑> t
val remove : elt ‑> t ‑> t
val union : t ‑> t ‑> t
val inter : t ‑> t ‑> t
val diff : t ‑> t ‑> t
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
val subset : t ‑> t ‑> bool
val iter : (elt ‑> unit) ‑> t ‑> unit
val map : (elt ‑> elt) ‑> t ‑> t
val fold : (elt ‑> 'a ‑> 'a) ‑> t ‑> 'a ‑> 'a
val for_all : (elt ‑> bool) ‑> t ‑> bool
val exists : (elt ‑> bool) ‑> t ‑> bool
val filter : (elt ‑> bool) ‑> t ‑> t
val partition : (elt ‑> bool) ‑> t ‑> t * t
val cardinal : t ‑> int
val elements : t ‑> elt list
val min_elt : t ‑> elt
val min_elt_opt : t ‑> elt option
val max_elt : t ‑> elt
val max_elt_opt : t ‑> elt option
val choose : t ‑> elt
val choose_opt : t ‑> elt option
val split : elt ‑> t ‑> t * bool * t
val find : elt ‑> t ‑> elt
val find_opt : elt ‑> t ‑> elt option
val find_first : (elt ‑> bool) ‑> t ‑> elt
val find_first_opt : (elt ‑> bool) ‑> t ‑> elt option
val find_last : (elt ‑> bool) ‑> t ‑> elt
val find_last_opt : (elt ‑> bool) ‑> t ‑> elt option
val of_list : elt list ‑> t
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_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 of_seq : elt sequence ‑> t

Build a set from the given sequence of elements.

val add_seq : t ‑> elt sequence ‑> t
  • Since: 0.14
val to_seq : t ‑> elt sequence

to_seq t converts the set t to a sequence of the elements.

val of_list : elt list ‑> t

Build a set from the given list of elements, +added in order using add.

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 pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> elt printer ‑> t printer

Print the set

\ No newline at end of file diff --git a/dev/containers/CCString.odoc b/dev/containers/CCString.odoc new file mode 100644 index 0000000000000000000000000000000000000000..7f38db5bf11ad2f065eeb80a9c20dad85936b3f0 GIT binary patch literal 17813 zcmcIs34B~txo?tt+RRLvq*DakZ<9%8k|vX+r7dk~JEgW*WYMPL^1$I{awoZTGIy9e zX&PCSr{V(01ZIDk$&&ecw4VlQflz+TX98 zyPWfF=R4o|wp)MH&-4!^S0o4Dy7%UL7c5wiz+Z*G&%@s(cl2ibe97_hZZUX&V#}7{ zQqjwgr3UYM!#6Mf$|d>V9re({yT1C=Cy$Z2Th}jGu=LLh7OcB(!GhJVZ(gt>rSh@OsY-dpiB8~UY(Ztey5!}8R0Yomw)pwL8+D8JWB?-U%B|%a-#>(hn!a=( z#C5*n)K_A7C}C&)qFr!GCAXNj1J@~L#`|nM+To75d%`(yr05hqH%O*Z*3p$p_lc9) ztXnJ(UU%*4wGV8V+V+KW?|X9FwqNyBDqSZ|m)xK{c*l1ix$_#cKgD*H{`0CiUy{~#Qe$uOkzy07xE0x|? zy2afP%x)s&TI<&jU-ejf-;0k+T=9Qz{N9b2DdH**{_oA#{;gxri`H#<>|y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ESSCmX@U9mh6-<=a9cklIn&0`nB&WoLCzTN0*z6E19_MGW9L|u`hN%JQS|f(}u^T zXq;5rSNBs?DP>9ik1n!Q%%CH1p6~kC>%2cZ@a8C_xRj&NL8-usUvKx@(%M{aFfHHE zDSIheq5_xo;j&tKBGD_S%Yy zUd=FmrlMF4RKHj;ey)}th1YN6SD@hn71iZ1>o;oYi}9++ul}H-=cuTsXZ=Mj?Z&G# zzxtbszE(wFBd=6LlUh1}cf<5fH7tS(s_1s2NIt{F{|&HMEnSQI^)h0KiXN|`sD-I$ U!oWC2E!~3qE>d^=cBE4O4-}}k6951J literal 0 HcmV?d00001 diff --git a/dev/containers/CCString/.jbuilder-keep b/dev/containers/CCString/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCString/Find/index.html b/dev/containers/CCString/Find/index.html new file mode 100644 index 00000000..b2e36b81 --- /dev/null +++ b/dev/containers/CCString/Find/index.html @@ -0,0 +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

Search for pattern in the string, 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

Search for pattern in the string, 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 diff --git a/dev/containers/CCString/Split/index.html b/dev/containers/CCString/Split/index.html new file mode 100644 index 00000000..91e9235e --- /dev/null +++ b/dev/containers/CCString/Split/index.html @@ -0,0 +1,9 @@ + +Split (containers.CCString.Split)

Module CCString.Split

type drop_if_empty = {
first : bool;
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

Do 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

Split the given string along the given separator by. Should only +be used with very small separators, otherwise +use Containers_string.KMP.

  • 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
val seq : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> (string * int * int) sequence
val klist : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> (string * int * int) klist
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
val gen_cpy : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> string gen
val seq_cpy : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> string sequence
val klist_cpy : ?⁠drop:drop_if_empty ‑> by:string ‑> string ‑> string klist
val left : by:string ‑> string ‑> (string * string) option

Split on the first occurrence of by from the leftmost part of +the string.

  • Since: 0.12
val left_exn : by:string ‑> string ‑> string * string

Split on the first occurrence of by from the leftmost part of the string.

  • Raises Not_found: if by is not part of the string.
  • Since: 0.16
val right : by:string ‑> string ‑> (string * string) option

Split on the first occurrence of by from the rightmost part of +the string.

  • Since: 0.12
val right_exn : by:string ‑> string ‑> string * string

Split on the first occurrence of by from the rightmost part of the string.

  • Raises Not_found: if by is not part of the string.
  • Since: 0.16
\ No newline at end of file diff --git a/dev/containers/CCString/Sub/index.html b/dev/containers/CCString/Sub/index.html new file mode 100644 index 00000000..7dfdd05c --- /dev/null +++ b/dev/containers/CCString/Sub/index.html @@ -0,0 +1,3 @@ + +Sub (containers.CCString.Sub)

Module CCString.Sub

type t = string * int * int

A string, an offset, and the length of the slice.

val make : string ‑> int ‑> len:int ‑> t
val full : string ‑> t

Full string.

val copy : t ‑> string

Make a copy of the substring.

val underlying : t ‑> string
val sub : t ‑> int ‑> int ‑> t

Sub-slice.

val get : t ‑> int ‑> char

get s i gets the i-th element, or fails.

  • Raises Invalid_argument: if the index is not within 0 ... length - 1.
  • Since: 1.2
include S with type t := t
type t
val length : t ‑> int

Return the length (number of characters) of the given string.

val blit : t ‑> int ‑> Bytes.t ‑> int ‑> int ‑> unit

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 on chars by increasing index.

  • Since: 0.7

Conversions

val to_gen : t ‑> char gen

Return the gen of characters contained in the string.

val to_seq : t ‑> char sequence

Return the sequence of characters contained in the string.

val to_klist : t ‑> char klist

Return the klist of characters contained in the string.

val to_list : t ‑> char list

Return the list of characters contained in the string.

val pp_buf : Buffer.t ‑> t ‑> unit

Renamed from pp since 2.0.

val pp : Format.formatter ‑> t ‑> unit

Print the string within quotes.

Renamed from print since 2.0.

\ No newline at end of file diff --git a/dev/containers/CCString/index.html b/dev/containers/CCString/index.html new file mode 100644 index 00000000..c5e1f7a5 --- /dev/null +++ b/dev/containers/CCString/index.html @@ -0,0 +1,21 @@ + +CCString (containers.CCString)

Module CCString

Basic String Utils

Consider using Containers_string.KMP for pattern search, or Regex +libraries.

type 'a gen = unit ‑> 'a option
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]

Common Signature

module type S : sig ... end

Strings

include module type of sig ... end
external length : string ‑> int = "%string_length"
external get : string ‑> int ‑> char = "%string_safe_get"
external set : bytes ‑> int ‑> char ‑> unit = "%string_safe_set"
  • Deprecated Use Bytes.set instead.
external create : int ‑> bytes = "caml_create_string"
  • Deprecated Use Bytes.create instead.
val make : int ‑> char ‑> string
val init : int ‑> (int ‑> char) ‑> string
val copy : string ‑> string
val sub : string ‑> int ‑> int ‑> string
val fill : bytes ‑> int ‑> int ‑> char ‑> unit
  • Deprecated Use Bytes.fill instead.
val blit : string ‑> int ‑> bytes ‑> int ‑> int ‑> unit
val concat : string ‑> string list ‑> string
val iter : (char ‑> unit) ‑> string ‑> unit
val iteri : (int ‑> char ‑> unit) ‑> string ‑> unit
val map : (char ‑> char) ‑> string ‑> string
val mapi : (int ‑> char ‑> char) ‑> string ‑> string
val trim : string ‑> string
val escaped : string ‑> string
val index : string ‑> char ‑> int
val index_opt : string ‑> char ‑> int option
val rindex : string ‑> char ‑> int
val rindex_opt : string ‑> char ‑> int option
val index_from : string ‑> int ‑> char ‑> int
val index_from_opt : string ‑> int ‑> char ‑> int option
val rindex_from : string ‑> int ‑> char ‑> int
val rindex_from_opt : string ‑> int ‑> char ‑> int option
val contains : string ‑> char ‑> bool
val contains_from : string ‑> int ‑> char ‑> bool
val rcontains_from : string ‑> int ‑> char ‑> bool
val uppercase : string ‑> string
  • Deprecated Use String.uppercase_ascii instead.
val lowercase : string ‑> string
  • Deprecated Use String.lowercase_ascii instead.
val capitalize : string ‑> string
  • Deprecated Use String.capitalize_ascii instead.
val uncapitalize : string ‑> string
  • Deprecated Use String.uncapitalize_ascii instead.
val uppercase_ascii : string ‑> string
val lowercase_ascii : string ‑> string
val capitalize_ascii : string ‑> string
val uncapitalize_ascii : string ‑> string
type t = string
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
val split_on_char : char ‑> string ‑> string list
external unsafe_get : string ‑> int ‑> char = "%string_unsafe_get"
external unsafe_set : bytes ‑> int ‑> char ‑> unit = "%string_unsafe_set"
external unsafe_blit : string ‑> int ‑> bytes ‑> int ‑> int ‑> unit = "caml_blit_string"
external unsafe_fill : bytes ‑> int ‑> int ‑> char ‑> unit = "caml_fill_string"
val equal : string ‑> string ‑> bool

Equality function on strings.

val compare : string ‑> string ‑> int
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
val init : int ‑> (int ‑> char) ‑> string

Like Array.init.

  • Since: 0.3.3
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 n str ensures that str 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

Convert a gen of characters to a string.

val of_seq : char sequence ‑> string

Convert a sequence of characters to a string.

val of_klist : char klist ‑> string

Convert a klist of characters to a string.

val of_list : char list ‑> string

Convert a list of characters to a string.

val of_array : char array ‑> string

Convert an array of characters to a string.

val to_array : string ‑> char array

Return the array of characters contained in the string.

val find : ?⁠start:int ‑> sub:string ‑> string ‑> int

Find sub in string, returns its first index or -1.

val find_all : ?⁠start:int ‑> sub:string ‑> string ‑> int gen

find_all ~sub s finds all occurrences of sub in s, even overlapping +instances.

  • 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 ~sub s is true iff sub is a substring of s.

  • Since: 0.12
val rfind : sub:string ‑> string ‑> int

Find sub in string 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 ~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 ‑> len:int ‑> bool

is_sub ~sub i s j ~len returns true iff the substring of +sub starting at position i and of length len is a substring +of s starting at position j.

val repeat : string ‑> int ‑> string

The same string, repeated 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 = 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 of the lines of s (splits along '\n').

  • Since: 0.10
val concat_gen : sep:string ‑> string gen ‑> string

concat_gen ~sep g concatenates all strings of g, separated with sep.

  • Since: 0.10
val unlines : string list ‑> string

unlines l concatenates all strings of l, separated with '\n'.

  • Since: 0.10
val unlines_gen : string gen ‑> string

unlines_gen g concatenates all strings of g, separated with '\n'.

  • Since: 0.10
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

Alias to String.iter.

  • Since: 0.12
val iteri : (int ‑> char ‑> unit) ‑> string ‑> unit

Iter on chars with their index.

  • Since: 0.12
val map : (char ‑> char) ‑> string ‑> string

Map chars.

  • Since: 0.12
val mapi : (int ‑> char ‑> char) ‑> string ‑> string

Map chars with their index.

  • 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 not satisfying f.

  • Since: 0.17
val flat_map : ?⁠sep:string ‑> (char ‑> string) ‑> string ‑> string

Map each chars 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

True for all chars?

  • Since: 0.12
val exists : (char ‑> bool) ‑> string ‑> bool

True for some char?

  • Since: 0.12
include S with type S.t := string
type t
val length : t ‑> int

Return the length (number of characters) of the given string.

val blit : t ‑> int ‑> Bytes.t ‑> int ‑> int ‑> unit

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 on chars by increasing index.

  • Since: 0.7

Conversions

val to_gen : t ‑> char gen

Return the gen of characters contained in the string.

val to_seq : t ‑> char sequence

Return the sequence of characters contained in the string.

val to_klist : t ‑> char klist

Return the klist of characters contained in the string.

val to_list : t ‑> char list

Return the list of characters contained in the string.

val pp_buf : Buffer.t ‑> t ‑> unit

Renamed from pp since 2.0.

val pp : Format.formatter ‑> t ‑> unit

Print the string within quotes.

Renamed from print since 2.0.

val ltrim : t ‑> t

Trim space on the left (see String.trim for more details).

  • Since: 1.2
val rtrim : t ‑> t

Trim 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

Map 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

Iterate 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

Iterate 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

Fold 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

All pairs of chars respect the predicate?

  • Raises Invalid_argument: if the strings have not the same length.
  • Since: 0.12
val exists2 : (char ‑> char ‑> bool) ‑> string ‑> string ‑> bool

Exists a pair of chars?

  • 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

See String.

  • Since: 0.18
val uncapitalize_ascii : string ‑> string

See String.

  • Since: 0.18
val uppercase_ascii : string ‑> string

See String.

  • Since: 0.18
val lowercase_ascii : string ‑> string

See String.

  • Since: 0.18
val equal_caseless : string ‑> string ‑> bool

Comparison without respect to ascii lowercase.

  • Since: 1.2

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 the string along the given char.

  • Since: 1.2
val split : by:string ‑> string ‑> string list

Alias to Split.list_cpy.

  • Since: 1.2

Utils

val compare_versions : string ‑> string ‑> int

compare_versions a b compares version stringsa and b, +considering that numbers are above text.

  • Since: 0.13
val compare_natural : string ‑> string ‑> int

Natural Sort Order, comparing chunks of digits as natural numbers. +https://en.wikipedia.org/wiki/Natural_sort_order

  • Since: 1.3
val edit_distance : string ‑> string ‑> int

Edition distance between two strings. This satisfies the classical +distance axioms: it is always positive, symmetric, and satisfies +the formula distance a b + distance b c >= distance a c.

Slices

A contiguous part of a string

module Sub : sig ... end
\ No newline at end of file diff --git a/dev/containers/CCString/module-type-S/index.html b/dev/containers/CCString/module-type-S/index.html new file mode 100644 index 00000000..e91d8c6d --- /dev/null +++ b/dev/containers/CCString/module-type-S/index.html @@ -0,0 +1,3 @@ + +S (containers.CCString.S)

Module type CCString.S

type t
val length : t ‑> int

Return the length (number of characters) of the given string.

val blit : t ‑> int ‑> Bytes.t ‑> int ‑> int ‑> unit

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 on chars by increasing index.

  • Since: 0.7

Conversions

val to_gen : t ‑> char gen

Return the gen of characters contained in the string.

val to_seq : t ‑> char sequence

Return the sequence of characters contained in the string.

val to_klist : t ‑> char klist

Return the klist of characters contained in the string.

val to_list : t ‑> char list

Return the list of characters contained in the string.

val pp_buf : Buffer.t ‑> t ‑> unit

Renamed from pp since 2.0.

val pp : Format.formatter ‑> t ‑> unit

Print the string within quotes.

Renamed from print since 2.0.

\ No newline at end of file diff --git a/dev/containers/CCUtf8_string.odoc b/dev/containers/CCUtf8_string.odoc new file mode 100644 index 0000000000000000000000000000000000000000..4bd9bdec365c1434b76351866b9d691ccc457ccf GIT binary patch literal 2434 zcmb_eTWl0n7~b8?2=zihL%bSWSga8q9i9i_nJ_TRA|6GKhy7q*V@pd1wddvo>N{Si znLW5~TXEgQTUT#gKD_S5(z!9xKut0hOAN+hV{XDj#>Qf)82evlv_#0*@n(~SPj+~Y zMT*#H7aki7$1^%s<>s2Esf}eUy{Ky2*blSs?42|3+=8CmsSRhZ=$yUq*Bh3LGm4v%QD6k2~Ie zq-*gbzpYw*X3ss~Ndm&`)XD8{rEbTM0+3kS4utZgxC%QaBcY2b|&Y*AcfJBRwUMKh~HB{R(-(+vCe@6cvU zrx0av+Lr9ZUZ~wS#8@~T!EQKc_J!f@RMm5+cuSKCb%>{q1<9!k@P;b(EF5aJqnU#y z7y-IAjZ-xv^76`b3TY1;n?;5VRb!y1IpogL(T2%(4II+KnP45cp|)IT>DTsXQ%v!y z=~7&Q5LaURQY93WLaiXr9}wqBNWDD%q}C$k3i3hd28l>2OSMAbL^y<(k=XO~l&CJ@cdBnKVvjnsx5-rK=LCAK$=)3LQ2V2P8FINjT;%8) zV|b~eU?6IALVoKvI9w{xDgyCrCFn=gnevK0&bB{4O+rR5d#C7ohuJ_a6EUsUR`4|zec|vpQN4U zO5km(c0r2K;}3H+Py}4f!gf^*cV5d@rR6=PWuEq(h)OEb(Oe5UTqh9aHGe6*+<6fP zm58snh}|jfO^A3l5`j}Taf_iIPmT)Xm%tM3Aj|Fr-Wj9TfATd?tRCN%a-h_J-ZF~* zyP)%YY~pV9_Zw31birlh&oA96 z)Iu+X*#^|?2vzKju+oxszha$8mQe)+y~^*$1%51kk48@BOZd|YeqomFxF91hS-T_F zX$jlHxQVmF5?9IXHH!Ujo$Vs3xJM%HuM&hKmyTS^k)S8;N~1~zdpsj2g+x8x9YIwz zUy}9{lhZJDEkptOlY+jct|h8okH2n8<2x0jAx&&i`Fi{>dH)+sBxsrf?pMGC9LO71 zkKa_LGZG1*6^x?_xx5yTqKNgxz0&4&iCn0VrxY^Z$eoMtWgc&ov!HP`a-AZgI2tI0 zUc)M3s|z~YaH!z~MmI-@(F=p&V7Ap08+qh+R?9HF_*immF%qP0&hZGnjTZ&*lGJ`t zDeA5tRwSyZ9og9EhN^>425&|7K?wOxn(+A;si<4RMq;+SHEsO-EjA_HD3Etzlu2H~-kDLG(hwqn2NtF-5?EVkK{laSi literal 0 HcmV?d00001 diff --git a/dev/containers/CCUtf8_string/.jbuilder-keep b/dev/containers/CCUtf8_string/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/CCUtf8_string/index.html b/dev/containers/CCUtf8_string/index.html new file mode 100644 index 00000000..b421e73e --- /dev/null +++ b/dev/containers/CCUtf8_string/index.html @@ -0,0 +1,3 @@ + +CCUtf8_string (containers.CCUtf8_string)

Module CCUtf8_string

Unicode String, in UTF8

type uchar = Uchar.t
type 'a gen = unit ‑> 'a option
type 'a sequence = ('a ‑> unit) ‑> unit
type t = private string

A UTF8 string

val equal : t ‑> t ‑> bool
val hash : t ‑> int
val compare : t ‑> t ‑> int
val pp : 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_seq : ?⁠idx:int ‑> t ‑> uchar sequence

Sequence of unicode codepoints.

  • Parameter idx: offset where to start the decoding.
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 append : t ‑> t ‑> t
val concat : t ‑> t list ‑> t
val of_seq : uchar sequence ‑> t
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. +Upon iteration, if an invalid substring is met, Malformed will be raised.

\ No newline at end of file diff --git a/dev/containers/CCVector.odoc b/dev/containers/CCVector.odoc new file mode 100644 index 0000000000000000000000000000000000000000..4df107a06717e3ec2555cd812b98832ff6f50999 GIT binary patch literal 10041 zcmb_ieQ+G*d6#szC*9F_lF86~hm~}?JISY$WLvV0j5%9a!X0d5%RotE)V;esY3sY) z^X{HLfTrybN`_(56~Sf*X=mfuKnQJ(Q%XqlL55J8GD&IZcm_xlJPdy{WLnBJohDOC zf6w#2`ytuTgefz|ySMv3zvugFZPl#m@K|Y6Y4p>_ANW>BM@IpF6#Tgqf8KXysA`$6 zW|+F|e6cV!b-iA7ExSDW%EPH2KRW)Kv**+2-ukZ}JaVHroB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7ceh9WxK$ zJSVNMwdwdUnEH>H6x#+ItfoYLo4uaD((*UGz^C|WN!`7o)+`Eb?D>{ZQI|2ah@OF4 zcKmA}k@B&%urm0hTtx=1w;M5kdzkgeM*DKP{5g?@HVIDn*GtR%Tlz!Nq?sdw3@)v@ zIv(EPBP2HXSW2Rt!mNE^KOp~&#~K~;2FG6=Tr3s%5P~+FL4^COBf(D_L1%aj4`S^8 znAr`yFTGP{o%C)F?rvWF3)josMY%@&QxPR|!x~S1GZOm0Ls}29&?Iw4wAg(4oL8kk<2zn-ZJ{>^+l!8bQ zdrSiVHoqp@Gl!3JGn4tBzE%sM-vj6XD;BJs$T=>3&Y^!bkah6U0KX;Ebcc?eZ{907 YIjvmsQ6+sY;6{Ej%6wLWmCNP-1($^!eE +CCVector (containers.CCVector)

Module CCVector

Growable, mutable vector

type ro = [
| `RO
]
type rw = [
| `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 = ('arwt

Type synonym: a 'a vector is mutable.

type 'a ro_vector = ('arot

Alias for immutable vectors.

  • Since: 0.15
type 'a sequence = ('a ‑> unit) ‑> unit
type 'a klist = unit ‑> [ `Nil | `Cons of 'a * 'a klist ]
type 'a gen = unit ‑> 'a option
type 'a equal = 'a ‑> 'a ‑> bool
type 'a ord = 'a ‑> 'a ‑> int
type 'a printer = Format.formatter ‑> 'a ‑> unit
val freeze : ('a_t ‑> ('arot

Make an immutable vector (no copy! Don't use the old version).

val freeze_copy : ('a_t ‑> ('arot

Copy the vector into an immutable version.

val create : unit ‑> ('arwt

Create a new, empty vector.

val create_with : ?⁠capacity:int ‑> 'a ‑> ('arwt

Create a new vector, using the given value as a filler.

  • Parameter capacity: the size of the underlying array. +caution: the value will likely not be GC'd before the vector is.
val return : 'a ‑> ('a'mutt

Singleton vector.

  • Since: 0.14
val make : int ‑> 'a ‑> ('a'mutt

make n x makes a vector of size n, filled with x.

val init : int ‑> (int ‑> 'a) ‑> ('a'mutt

Init the vector with the given function and size.

val clear : ('arwt ‑> unit

Clear the content of the vector.

val ensure_with : init:'a ‑> ('arwt ‑> int ‑> unit

Hint to the vector that it should have at least the given capacity.

  • Parameter init: if capacity v = 0, used as a filler +element for the underlying array (see create_with).
  • Since: 0.14
val ensure : ('arwt ‑> 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.

val is_empty : ('a_t ‑> bool

Is the vector empty?

val push : ('arwt ‑> 'a ‑> unit

Add an element at the end of the vector.

val append : ('arwt ‑> ('a_t ‑> unit

append a b adds all elements of b to a.

val append_array : ('arwt ‑> 'a array ‑> unit

Like append, with an array.

val append_seq : ('arwt ‑> 'a sequence ‑> unit

Append content of sequence.

val append_list : ('arwt ‑> 'a list ‑> unit

Append content of list.

  • Since: 0.14
val append_gen : ('arwt ‑> '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 : ('arwt ‑> 'a option

Remove last element, or None.

val pop_exn : ('arwt ‑> 'a

Remove last element, or raise a Failure 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'mutt

Shallow copy (may give an immutable or mutable vector).

val shrink : ('arwt ‑> int ‑> unit

Shrink to the given size (remove elements above this size). +Does nothing if the parameter is bigger than the current size.

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'mutt

Sort the vector, returning a copy of it that is sorted +w.r.t the given ordering. The vector itself is unchanged.

val sort' : ('a ‑> 'a ‑> int) ‑> ('arwt ‑> unit

Sort the vector in place (modifying it).

val uniq_sort : ('a ‑> 'a ‑> int) ‑> ('arwt ‑> 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'mutt

Map elements of the vector, yielding a new vector.

val filter : ('a ‑> bool) ‑> ('a_t ‑> ('a'mutt

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' : ('a ‑> bool) ‑> ('arwt ‑> unit

Filter elements in place.

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'mutt

Map elements with a function, possibly filtering some of them out.

val flat_map : ('a ‑> ('b_t) ‑> ('a_t ‑> ('b'mutt

Map each element to a sub-vector.

val flat_map_seq : ('a ‑> 'b sequence) ‑> ('a_t ‑> ('b'mutt

Like flat_map, but using sequence for +intermediate collections.

  • Since: 0.14
val flat_map_list : ('a ‑> 'b list) ‑> ('a_t ‑> ('b'mutt

Like flat_map, but using list for +intermediate collections.

  • Since: 0.14
val (>>=) : ('a_t ‑> ('a ‑> ('b_t) ‑> ('b'mutt

Infix version of flat_map.

val (>|=) : ('a_t ‑> ('a ‑> 'b) ‑> ('b'mutt

Infix version of map.

val get : ('a_t ‑> int ‑> 'a

Access element by its index, or

  • Raises Invalid_argument: if bad index.
val set : ('arwt ‑> int ‑> 'a ‑> unit

Modify element at given index, or

  • Raises Invalid_argument: if bad index.
val remove : ('arwt ‑> int ‑> unit

Remove the n-th element of the vector. Does NOT preserve the order +of the elements (might swap with the last element).

val rev : ('a_t ‑> ('a'mutt

Reverse the vector.

val rev_in_place : ('arwt ‑> 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 : ('arwt ‑> '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, 'mutt

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, 'mutt

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'mutt

of_array a returns a vector corresponding to the array a. Operates in O(n) time.

val of_list : 'a list ‑> ('a'mutt
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_seq : ?⁠init:('arwt ‑> 'a sequence ‑> ('arwt
val to_seq : ('a_t ‑> 'a sequence

Return a sequence with the elements contained in the vector.

val to_seq_rev : ('a_t ‑> 'a sequence

to_seq_rev v returns the sequence of elements of v in reverse order, +that is, the last elements of v are iterated on first.

  • Since: 0.14
val slice : ('arwt ‑> 'a array * int * int

Vector as an array slice. By doing it we expose the internal array, so +be careful!.

val slice_seq : ('a_t ‑> int ‑> int ‑> 'a sequence

slice_seq v start len is the sequence of elements from v.(start) +to v.(start+len-1).

val of_klist : ?⁠init:('arwt ‑> 'a klist ‑> ('arwt
val to_klist : ('a_t ‑> 'a klist
val of_gen : ?⁠init:('arwt ‑> 'a gen ‑> ('arwt
val to_gen : ('a_t ‑> 'a gen
val pp : ?⁠start:string ‑> ?⁠stop:string ‑> ?⁠sep:string ‑> 'a printer ‑> ('a_t printer
\ No newline at end of file diff --git a/dev/containers/Containers/.jbuilder-keep b/dev/containers/Containers/.jbuilder-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/containers/Containers/Hashtbl/Make/index.html b/dev/containers/Containers/Hashtbl/Make/index.html new file mode 100644 index 00000000..6a64d417 --- /dev/null +++ b/dev/containers/Containers/Hashtbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (containers.Containers.Hashtbl.Make)

Module Containers.Hashtbl.Make

Parameters

H : Hashtbl.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
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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> Hashtbl.statistics
\ No newline at end of file diff --git a/dev/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html b/dev/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html new file mode 100644 index 00000000..6ee3e6f7 --- /dev/null +++ b/dev/containers/Containers/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -0,0 +1,2 @@ + +1-H (containers.Containers.Hashtbl.MakeSeeded.1-H)

Parameter Containers.Hashtbl.MakeSeeded.1-H

type t
val equal : t ‑> t ‑> bool
val hash : int ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers/Containers/Hashtbl/MakeSeeded/index.html b/dev/containers/Containers/Hashtbl/MakeSeeded/index.html new file mode 100644 index 00000000..2c54f0b7 --- /dev/null +++ b/dev/containers/Containers/Hashtbl/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (containers.Containers.Hashtbl.MakeSeeded)

Module Containers.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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> statistics
\ No newline at end of file diff --git a/dev/containers/Containers/Hashtbl/index.html b/dev/containers/Containers/Hashtbl/index.html new file mode 100644 index 00000000..a813928c --- /dev/null +++ b/dev/containers/Containers/Hashtbl/index.html @@ -0,0 +1,21 @@ + +Hashtbl (containers.Containers.Hashtbl)

Module Containers.Hashtbl

  • Since: 0.14
include module type of Hashtbl with type Hashtbl.statistics = Hashtbl.statistics and module Hashtbl.Make = Hashtbl.Make and type ('a, 'b) Hashtbl.t = ('a'b) Hashtbl.t
type ('a, 'b) t = ('a'b) Hashtbl.t
val create : ?⁠random:bool ‑> int ‑> ('a'bt
val clear : ('a'bt ‑> unit
val reset : ('a'bt ‑> unit
val copy : ('a'bt ‑> ('a'bt
val add : ('a'bt ‑> 'a ‑> 'b ‑> unit
val find : ('a'bt ‑> 'a ‑> 'b
val find_opt : ('a'bt ‑> 'a ‑> 'b option
val find_all : ('a'bt ‑> 'a ‑> 'b list
val mem : ('a'bt ‑> 'a ‑> bool
val remove : ('a'bt ‑> 'a ‑> unit
val replace : ('a'bt ‑> 'a ‑> 'b ‑> unit
val iter : ('a ‑> 'b ‑> unit) ‑> ('a'bt ‑> unit
val filter_map_inplace : ('a ‑> 'b ‑> 'b option) ‑> ('a'bt ‑> unit
val fold : ('a ‑> 'b ‑> 'c ‑> 'c) ‑> ('a'bt ‑> 'c ‑> 'c
val length : ('a'bt ‑> int
val randomize : unit ‑> unit
val is_randomized : unit ‑> bool
type statistics = Hashtbl.statistics = {
num_bindings : int;
num_buckets : int;
max_bucket_length : int;
bucket_histogram : int array;
}
val stats : ('a'bt ‑> statistics
module type HashedType : sig ... end
module type S : sig ... end
module Make : functor (H : Hashtbl.HashedType) -> sig ... end
module type SeededHashedType : sig ... end
module type SeededS : sig ... end
module MakeSeeded : functor (H : SeededHashedType) -> sig ... end
val hash : 'a ‑> int
val seeded_hash : int ‑> 'a ‑> int
val hash_param : int ‑> int ‑> 'a ‑> int
val seeded_hash_param : int ‑> int ‑> int ‑> 'a ‑> int
include CCHashtbl.Poly
val get : ('a'b) Hashtbl.t ‑> 'a ‑> 'b option

Safe version of Hashtbl.find.

val get_or : ('a'b) 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) Hashtbl.t ‑> 'a CCHashtbl.sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : ('a'b) Hashtbl.t ‑> 'b CCHashtbl.sequence

Iterate on values in the table.

val keys_list : ('a'b) Hashtbl.t ‑> 'a list

keys_list t is the list of keys in t. +If the key is in the Hashtable multiple times, all occurrences will be returned.

  • Since: 0.8
val values_list : ('a'b) Hashtbl.t ‑> 'b list

values_list t is the list of values in t.

  • Since: 0.8
val map_list : ('a ‑> 'b ‑> 'c) ‑> ('a'b) Hashtbl.t ‑> 'c list

Map on a hashtable's items, collect into a list.

val incr : ?⁠by:int ‑> ('a, int) 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) Hashtbl.t ‑> 'a ‑> unit

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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) CCHashtbl.sequence

Iterate on bindings in the table.

val add_list : ('a'b list) 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_seq : ('a'b) Hashtbl.t ‑> ('a * 'b) CCHashtbl.sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val of_seq : ('a * 'b) CCHashtbl.sequence ‑> ('a'b) Hashtbl.t

From the given bindings, added in order.

val add_seq_count : ('a, int) Hashtbl.t ‑> 'a CCHashtbl.sequence ‑> 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.

  • Since: 0.16
val of_seq_count : 'a CCHashtbl.sequence ‑> ('a, int) Hashtbl.t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : ('a'b) Hashtbl.t ‑> ('a * 'b) list

List of bindings (order unspecified).

val of_list : ('a * 'b) list ‑> ('a'b) Hashtbl.t

Build a table from the given list 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 update : ('a'b) 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) 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 : 'a CCHashtbl.printer ‑> 'b CCHashtbl.printer ‑> ('a'b) Hashtbl.t CCHashtbl.printer
module type S' = CCHashtbl.S
module Make' = CCHashtbl.Make
\ No newline at end of file diff --git a/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html b/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html new file mode 100644 index 00000000..5ebe8dd7 --- /dev/null +++ b/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html @@ -0,0 +1,2 @@ + +HashedType (containers.Containers.Hashtbl.HashedType)

Module type Containers.Hashtbl.HashedType

type t
val equal : t ‑> t ‑> bool
val hash : t ‑> int
\ No newline at end of file diff --git a/dev/containers/Containers/Hashtbl/module-type-S'/index.html b/dev/containers/Containers/Hashtbl/module-type-S'/index.html new file mode 100644 index 00000000..8262087a --- /dev/null +++ b/dev/containers/Containers/Hashtbl/module-type-S'/index.html @@ -0,0 +1,21 @@ + +S' (containers.Containers.Hashtbl.S')

Module type Containers.Hashtbl.S'

include Hashtbl.S
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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> Hashtbl.statistics
val get : 'a t ‑> key ‑> 'a option

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

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 CCHashtbl.sequence

Iterate on keys (similar order as Hashtbl.iter).

val values : 'a t ‑> 'a CCHashtbl.sequence

Iterate on values in the table.

val keys_list : _ t ‑> key list

keys_list t is the list of keys in t. +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_seq : 'a t ‑> (key * 'a) CCHashtbl.sequence

Iterate on values in the table.

val of_seq : (key * 'a) CCHashtbl.sequence ‑> 'a t

From the given bindings, added in order.

val add_seq : 'a t ‑> (key * 'a) CCHashtbl.sequence ‑> unit

Add the corresponding pairs to the table, using Hashtbl.add.

  • Since: 0.16
val add_seq_count : int t ‑> key CCHashtbl.sequence ‑> 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.

  • Since: 0.16
val of_seq_count : key CCHashtbl.sequence ‑> int t

Like add_seq_count, but allocates a new table and returns it.

  • Since: 0.16
val to_list : 'a t ‑> (key * 'a) list

List of bindings (order unspecified).

val of_list : (key * 'a) list ‑> 'a t

Build a table from the given list 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 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
\ No newline at end of file diff --git a/dev/containers/Containers/Hashtbl/module-type-S/index.html b/dev/containers/Containers/Hashtbl/module-type-S/index.html new file mode 100644 index 00000000..1fc7cd07 --- /dev/null +++ b/dev/containers/Containers/Hashtbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (containers.Containers.Hashtbl.S)

Module type Containers.Hashtbl.S

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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> statistics
\ No newline at end of file diff --git a/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html b/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html new file mode 100644 index 00000000..e7c21d46 --- /dev/null +++ b/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html @@ -0,0 +1,2 @@ + +SeededHashedType (containers.Containers.Hashtbl.SeededHashedType)

Module type Containers.Hashtbl.SeededHashedType

type t
val equal : t ‑> t ‑> bool
val hash : int ‑> t ‑> int
\ No newline at end of file diff --git a/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html b/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html new file mode 100644 index 00000000..906f36c0 --- /dev/null +++ b/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html @@ -0,0 +1,2 @@ + +SeededS (containers.Containers.Hashtbl.SeededS)

Module type Containers.Hashtbl.SeededS

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
val filter_map_inplace : (key ‑> 'a ‑> 'a option) ‑> 'a t ‑> unit
val fold : (key ‑> 'a ‑> 'b ‑> 'b) ‑> 'a t ‑> 'b ‑> 'b
val length : 'a t ‑> int
val stats : 'a t ‑> statistics
\ No newline at end of file diff --git a/dev/containers/Containers/index.html b/dev/containers/Containers/index.html new file mode 100644 index 00000000..00f9e02d --- /dev/null +++ b/dev/containers/Containers/index.html @@ -0,0 +1,2 @@ + +Containers (containers.Containers)

Module Containers

Drop-In replacement to Stdlib

module Array = CCArray
module ArrayLabels = CCArrayLabels
module Array_slice = CCArray_slice
module Bool = CCBool
module Char = Char
module Equal = CCEqual
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 ListLabels = CCListLabels
module Map = CCMap
module Nativeint = CCNativeint
module Option = CCOpt
module Ord = CCOrd
module Pair = CCPair
module Parse = CCParse
module Random = CCRandom
module Ref = CCRef
module Result = CCResult
module Set = CCSet
module String = CCString
module Vector = CCVector
module Monomorphic = CCMonomorphic
module Utf8_string = CCUtf8_string
include Monomorphic
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
val (=.) : float ‑> float ‑> bool
val (<>.) : float ‑> float ‑> bool
val (<.) : float ‑> float ‑> bool
val (>.) : float ‑> float ‑> bool
val (<=.) : float ‑> float ‑> bool
val (>=.) : float ‑> float ‑> bool
val (==) : [ `Consider_using_CCEqual_physical ]
  • Deprecated Please use CCEqual.physical or Pervasives.(==) instead.
val (!=) : [ `Consider_using_CCEqual_physical ]
  • Deprecated Please use [not CCEqual.physical] or Pervasives.(!=) instead.
\ No newline at end of file diff --git a/dev/containers/containers.odoc b/dev/containers/containers.odoc new file mode 100644 index 0000000000000000000000000000000000000000..164a12bc17ee0757e2023c62f02b3f3b3355d7b9 GIT binary patch literal 9175 zcmbVSdwkT@mCtY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/dev/containers/index-generated.mld b/dev/containers/index-generated.mld new file mode 100644 index 00000000..fe7ddc94 --- /dev/null +++ b/dev/containers/index-generated.mld @@ -0,0 +1,2 @@ +{1 Library containers} +This library exposes the following toplevel modules: {!modules:CCArray CCArrayLabels CCArray_slice CCBool CCChar CCEqual CCFloat CCFormat CCFun CCHash CCHashtbl CCHeap CCIO CCInt CCInt32 CCInt64 CCList CCListLabels CCMap CCNativeint CCOpt CCOrd CCPair CCParse CCRandom CCRef CCResult CCSet CCString CCUtf8_string CCVector Containers}. \ No newline at end of file diff --git a/dev/containers/index.html b/dev/containers/index.html new file mode 100644 index 00000000..fb11fe9a --- /dev/null +++ b/dev/containers/index.html @@ -0,0 +1,3 @@ + +index (containers.index)

Library containers

+This library exposes the following toplevel modules:

CCArray
CCArrayLabels
CCArray_slice
CCBool
CCChar
CCEqual
CCFloat
CCFormat
CCFun
CCHash
CCHashtbl
CCHeap
CCIO
CCInt
CCInt32
CCInt64
CCList
CCListLabels
CCMap
CCNativeint
CCOpt
CCOrd
CCPair
CCParse
CCRandom
CCRef
CCResult
CCSet
CCString
CCUtf8_string
CCVector
Containers

.

\ No newline at end of file diff --git a/dev/containers/page-index.odoc b/dev/containers/page-index.odoc new file mode 100644 index 0000000000000000000000000000000000000000..9b8426d2595e6624cccd1a71a6a918855a9fea04 GIT binary patch literal 654 zcma)4Jx{|h5DgU!Fn|z$AV@7Ag;r2dRWY>~5J;h|%EyY_#HE(pIM{B19cIdakeJei z4GFQZApQ*hfe~@FlK>mTN$=ged*`#wJ?`dK^M(A%)!pN}Wm##6F^Cz6spqWAeTAt{ zgzRUi?~#j@%FE~VboJrwYsjCL@UM-)Vn6a- zLa2%r?GYMzf>sMm;}8lj_N!x>ELq1wnwx;V8rb)ECq7$)v@{$FM0QzXbwCUR;Xny^ k5M2iMeWY5Y6Zw;Zf@9(;Zl+~X^06vqc

OCaml package documentation

    -
  1. containers 2.0
  2. -
  3. containers.data 2.0
  4. -
  5. containers.iter 2.0
  6. -
  7. containers.monomorphic 2.0
  8. -
  9. containers.sexp 2.0
  10. -
  11. containers.thread 2.0
  12. -
  13. containers.top 2.0
  14. -
  15. containers.unix 2.0
  16. +
  17. containers.unix 2.1
  18. +
  19. containers.top 2.1
  20. +
  21. containers.thread 2.1
  22. +
  23. containers.sexp 2.1
  24. +
  25. containers.monomorphic 2.1
  26. +
  27. containers.iter 2.1
  28. +
  29. containers.data 2.1
  30. +
  31. containers 2.1
diff --git a/dev/odoc.css b/dev/odoc.css new file mode 100644 index 00000000..e7808926 --- /dev/null +++ b/dev/odoc.css @@ -0,0 +1,234 @@ +@charset "UTF-8"; +/* Copyright (c) 2016 Daniel C. Bünzli. All rights reserved. + Distributed under the ISC license, see terms at the end of the file. + odoc 1.2.0 */ + +/* Reset a few things. */ + +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre, +a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp, +small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li, +fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td, +article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup, +menu,nav,output,ruby,section,summary,time,mark,audio,video +{ margin:0; padding:0; border:0; /* outline: 0; */ + font-size:100%; font: inherit; line-height:inherit; vertical-align:baseline; + text-align: inherit; color: inherit; background: transparent; } + +table { border-collapse: collapse; border-spacing: 0; } +*, *:before, *:after { box-sizing: border-box; } + +body +{ font-family: Helvetica, "DejaVu Sans", Arial, sans-serif; + font-weight: normal; + font-size: 0.875rem; + line-height:1.25rem; + text-align: left; + min-width: 40ex; + max-width: 78ex; + padding: 1.25rem; + margin-left: 3.75rem; + color: #222; background: #FAFAFA; } + +/* Basic markup elements */ + +b, strong { font-weight: bold; } +em { font-style: italic; } + +sup { vertical-align: super; } +sub { vertical-align: sub; } +sup, sub { font-size : 0.75rem; line-height: 0; margin-left: 0.2ex; } + +p, div, img { margin-top: 1.25rem; } + +ul, ol +{ margin-top: 0.625rem; margin-bottom: 0.625rem; list-style-position: outside } + +ul { list-style-type: square } +ul > li { margin-left: 1.375rem; } +ol > li { margin-left: 1.7rem; } +li > *:first-child { margin-top: 0 } + +/* Text alignements, this should be forbidden. */ + +.left { text-align: left; } +.right { text-align: right; } +.center { text-align: center; } + +/* Links and anchors */ + +a { text-decoration:none; color:#2C5CBD; } +a:hover { box-shadow:0 1px 0 0 #2C5CBD; } +*:target /* Linked highlight */ +{ background-color: #FFF8E5; + box-shadow: 0 0 0 2px #FFF8E5, 0 0 0 3px #DDD; } + +.spec:hover > a.anchor, /* FIXME remove */ +.anchored:hover a.anchor { visibility: visible; } + +a.anchor:before { content: "#" } +a.anchor:hover { box-shadow: none; text-decoration: underline } +a.anchor +{ visibility: hidden; position: absolute; /* top: 0px; */ + margin-left: -3ex; + font-weight: normal; + font-style: normal; + padding-right: 1ex; padding-left: 1ex; /* To remain selectable */ + color: #AAA; } + +.xref-unresolved { box-shadow:0 1px 0 0 red } + +/* Section and document divisions. + Until at least 4.03 many of the modules of the stdlib start at .h7, + we restart the sequence there like h2 */ + +h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 +{ font-weight: bold; margin-top: 1.25rem; } + +h1 + *, h2 + *, .h7 + * { margin-top: 0.625rem; } +h1, h2, .h7 +{ font-size: 1.25rem; + line-height: 2.4375rem; /* 2.5rem - border width */ + padding-top: 0.625rem; + border-top: solid; + border-width: 1px; + border-color: #DDD; } + +h3, .h8 { font-size: 1.125rem; } +h2 + h3, .h7 + .h8 { margin-top: 0.625rem; } + +/* Preformatted and code */ + +tt, code, pre +{ font-family: Menlo, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", + monospace; + font-weight: normal; + font-size: 0.75rem; } + +pre +{ padding-left: 0.25rem; padding-right: 0.25rem; + margin-left: -0.25rem; margin-right: -0.25rem; + padding-top: 0.3125rem; padding-bottom: 0.3125rem; + margin-top: 1.25rem; /* margin-bottom: 0.625rem; */ + line-height: 1.1875rem; + background: #F1F1F1; } + +h1 tt, h1 code, h2 tt, h2 code, .h7 tt, .h7 code { font-size: 1.125rem } +h3 tt, h3 code { font-size: 1rem } + +/* Code lexemes */ + +.keyword { font-weight: bold; } + +/* Module member specification */ + +div.def { margin-top: 0rem; text-indent: -2ex; padding-left: 2ex; } +div.def + div.doc { margin-left: 1ex; margin-top: 0.15625rem } +div.doc > *:first-child { margin-top: 0rem; } + +/* Collapsible inlined include and module */ + +details +{ border-radius: 0.5rem; + border-left: 0.2rem solid; + border-color: #FAFAFA /* Background */; + margin-left: -1.5rem; + padding-left: 1.3rem; + padding-bottom: 0.625rem; } + +details[open] { border-color: #AAA; } + +/* Records and variants FIXME */ + +div.def table { text-indent: 0em; padding:0; margin-left: -2ex; } +td.def { padding-right: 2ex } +.record td.def { padding-left:2ex; } +td.doc *:first-child { margin-top: 0em } + +/* @ tags */ + +ul.at-tag { list-style-type: none; margin-left: 0; padding: 0; } +ul.at-tag li { margin-left:0; padding:0; } +ul.at-tag li p:first-child { margin-top: 0 } /* FIXME remove */ +span.at-tag { font-weight: bold } +.at-tag.deprecated { font-weight: normal; color: crimson } +.at-tag.raise { font-weight: bold; } + +/* FIXME random other things to review. */ + +.heading +{ margin-top: 0.625rem; + border-top: solid; + border-width: 1px; + border-color: #DDD; + text-align: right; + font-weight: normal; + font-style: italic; } + +.heading + .sig { margin-top: -1.25rem; } +.heading + .parameters { margin-top: -1.25rem; } + +/* Odig package index */ + +.by-name ol, .by-tag ol, .errors ol { list-style-type: none; margin-left:0; } +.by-name ol ol, .by-tag ol ol { margin-top:0; margin-bottom: 0 } +.by-name li, .by-tag li, .errors li { margin-left:0; } + +.by-name .version { font-size: 0.625rem; color: #AAA } +.by-name nav { margin-bottom: 0.625rem } +.by-name nav a +{ text-transform: uppercase; font-size: 1.125rem; + margin-right:1ex; color: #222; display: inline-block; } + +.by-tag nav a { margin-right:1ex; color: #222; display: inline-block; } +.by-tag > ol > li { margin-top: 0.625rem; } +.by-tag > ol > li > span, +.by-tag > ol > li > ol, +.by-tag > ol > li > ol > li { display: inline-block; margin-right: 1ex; } + +/* Odig package page */ + +.package nav { display: inline; font-size: 0.875rem; font-weight: normal; } +.package .version { font-size: 0.875rem; } + +h1 + .modules, h1 + .sel { margin-top: 0.625rem } +.sel { font-weight: normal; font-style: italic; + font-size:0.875rem; margin-top:1.25rem; } +.sel + .modules { margin-top:0.625rem; + margin-bottom: 1.25rem; margin-left: 1ex; } + +.modules { margin:0; } +.modules .module { min-width:8ex; padding-right: 2ex } + +.package.info { margin: 0;} +.package.info td:first-child { font-style: italic; padding-right: 2ex; } +.package.info ul { list-style-type: none; display: inline; margin:0; } +.package.info li { display: inline-block; margin:0; margin-right:1ex; } +#info-authors li, #info-maintainers li { display:block; } + +/* Mobile adjustements. */ + +@media only screen and (max-width: 78ex) +{ body { margin: auto; } } + +/* Print adjustements. */ + +@media print +{ body { color: black; background: white; } + body nav:first-child { visibility: hidden; }} + +/*--------------------------------------------------------------------------- + Copyright (c) 2016 Daniel C. Bünzli + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + ---------------------------------------------------------------------------*/ diff --git a/index.md b/index.md index 70a26fca..30c42dc9 100644 --- a/index.md +++ b/index.md @@ -17,6 +17,7 @@ contains a tutorial and more explanations about what Containers is about. - [current](last) - [dev](dev) +- [2.1](2.1) - [2.0](2.0) - [1.4](1.4) - [1.3](1.3) diff --git a/last b/last index 415b19fc..42f7d233 120000 --- a/last +++ b/last @@ -1 +1 @@ -2.0 \ No newline at end of file +2.1 \ No newline at end of file