Commit Graph

83 Commits (f71a41daafc7a809cdac5064e326fcc7507d2aa9)

Author SHA1 Message Date
John Whitington fc101ae849 Rename tools/unlabel --> tools/sync_stdlib_docs 2020-09-10 19:17:43 +01:00
John Whitington 7bb80d434e "final" fixes 2020-08-06 14:18:18 +01:00
John Whitington 13965773ed Tildes back in ~random parameter in Hashtbl.create 2020-08-03 13:01:33 +01:00
John Whitington a5ed794b4c Check-typo and indenting all done 2020-07-31 14:24:50 +01:00
John Whitington 0fbeee11be Fix smaller review comments from @dra27 2020-07-30 13:26:20 +01:00
John Whitington dd1f3789f2 Tilde removal in place. Now will put them back in. 2020-07-29 13:58:22 +01:00
John Whitington 28f624b919 check-typo fixes 2020-07-27 15:53:57 +01:00
John Whitington bec7f8ff3d Restore Hashtbl.rebuild in .mli, fix docstring 2020-07-27 14:12:54 +01:00
John Whitington 33fdfffd5f Resolving conflicts with injectivity work 2020-07-27 13:49:42 +01:00
John Whitington 7f922569c0 Replacing {!X.y} in doc comments with {!y} 2020-07-27 13:39:12 +01:00
John Whitington 1f2daa31d3 Added injectivity annots back (clash with GPR9781) 2020-07-23 19:08:46 +01:00
John Whitington 1d19609646 Match documentation and labels 2020-07-19 13:34:25 +01:00
John Whitington e8e5b7e73f Make hashtbl.mli / set.mli / map.mli from labeled 2020-07-18 12:03:03 +01:00
alainfrisch e122acc1e7 Stronger spec for Hashtbl.to_seq w.r.t. multiple bindings on the same key 2019-04-10 13:20:46 +02:00
alainfrisch 8e695e3fbe Fix doc for Hashtbl.to_seq_keys, to_seq_values 2019-04-10 12:59:36 +02:00
Daniel Bünzli acb0e91ac6 Stdlib doc: harmonize heading levels again. (#2142) 2018-11-08 17:33:55 +01:00
Jérémie Dimino 9124ab82d1
Deprecate Pervasives (#1605)
- inline Pervasives in Stdlib and re-add Pervasives as a deprecated
module that aliases all elements of Stdlib except the stdlib modules.

- remove special case for Stdlib.Pervasives in printtyp.ml
2018-08-27 12:42:14 +01:00
Simon Cruanes df80f34a92 Stdlib functional iterators (#1002)
* add `Seq` module, expose iterator conversions in most containers

* small typo

* typo

* change order of arguments for `{Map,Set}.add_seq`

* watch for max string length in `Bytes.of_seq`

* wip: make it build again

* Fix dependency

Sys needs to be linked before Bytes in stdlib.

* Update threads/stdlib.ml

* Update stdlib_no_prefixed/.depend

* fix inconsistencies with label modules

* update testsuite to work with seq

* update change file

* small change in `Hashtbl.to_seq`, capturing only the underlying array

* add some documentation to seq.mli

* revert to good ol' module type names for hashtables

* fix test

* change style of comments in seq.mli

* follow some demands in review of GPR #1002

* some fixes for #1002

* add Seq-related functions to Ephemeron

* add some comments on `Hashtbl.of_seq`

* add more tests for `Hashtbl.{to,of}_seq`

* fix bug in `Ephemeron.to_seq`

* Update Changes
2018-03-16 18:25:10 +01:00
octachron e30e82a219 PR#7363: start documentation headers at {1 2017-10-04 13:05:05 +02:00
Török Edwin 20f61d7fb4 Documentation: improve @since annotations
Add missing @since annotations for OCaml versions 4.00.0 - 4.05.0,
and fix existing annotations as needed:

Format.ikprintf: clarify ambiguity on @since 4.0 annotation
See b81519668f

Hashtbl.is_randomized and ListLabels.sort_uniq should be @since 4.03
List.sort_uniq is 4.02 but ListLabels.sort_uniq is 4.03
See:
512d128918
189d29bfcf
2017-02-21 17:11:51 +02:00
Alain Frisch 69263a9893 Option-returning variants of stdlib functions (#885)
Provide an xxx_opt alternative for functions raising Not_found
and many instances of Failure/Invalid_arg.

The only exception is the rarely used Buffer.add_substitute, where
the [Not_found] can really be interpreted as an error condition.

Most new functions are implemented directly (instead of wrapping the
raising version).  This is for performance reasons and also to avoid
destroying the stacktrace (if the function is used in an exception
handler).  One could instead implement the raising versions on top of
the new functions, but there might be a small penalty.
2016-11-07 16:11:35 +00:00
Damien Doligez 33afceb5a5 Merge remote-tracking branch 'origin/4.03' into trunk 2016-07-07 16:58:59 +02:00
alainfrisch 1082ef6e3d Add missing @since attributes. 2016-06-20 19:01:36 +02:00
Grégoire Lionnet d0955cbae2 add missings since 4.03.0 tags in stdlib. 2016-05-21 12:00:31 +08:00
Damien Doligez 520fb2df50 Merge tag 4.03.0 into trunk. 2016-04-28 16:13:21 +02:00
Leo White 7dc1728ff4 Turn on warning 50 for the standard library 2016-03-28 19:59:09 +01:00
Leo White aa49dda9b8 Remove ;; from stdlib mli files 2016-03-28 12:34:46 +01:00
Alain Frisch 8557a86477 Also enable more warnings in stdlib/ and fix them. 2016-03-15 22:47:26 +01:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
François Bobot 189d29bfcf [Stdlib] Hashtbl: add a getter for randomize 2016-01-23 11:28:01 +01:00
alainfrisch 7dce037bdf GPR#337: Hashtbl.filter_map_inplace. 2016-01-22 18:40:16 +01:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Gabriel Scherer dd7178e2b1 [minor] documentation typo in Hashtbl
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14647 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 10:35:07 +00:00
Gabriel Scherer 1ba4d3486b [minor] improvement over the Hashtbl doc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14646 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 10:15:28 +00:00
Gabriel Scherer 5ef784b7b2 an example of functor application for Hashtbl
(Patch by Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14644 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 09:05:30 +00:00
Damien Doligez 29ad65d954 PR#6208: Hashtbl.reset @since 4.00.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14437 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-19 15:23:17 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Fabrice Le Fessant 621dd2dd5f Fix PR#5555
Add Hashtbl.reset to resize the bucket table to its initial size.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-15 08:36:25 +00:00
Xavier Leroy b2166e33f5 - Hashtbl:
. Added optional "random" parameter to Hashtbl.create to randomize
      collision patterns and improve security (PR#5572, CVE-2012-0839)
    . Added "randomize" function and "R" parameter to OCAMLRUNPARAM
      to turn randomization on by default (PR#5572, CVE-2012-0839)
- Filename: on-demand (lazy) initialization of the PRNG used by "temp_file".



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12384 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-19 13:17:40 +00:00
Damien Doligez 0ed38a9fb1 bumped version to 4.00.0 (per Xavier's decision)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12212 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-08 22:27:57 +00:00
Damien Doligez 1a4f7bd6ab doc: stats since 3.13.0; clean up whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11995 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-06 13:42:04 +00:00
Xavier Leroy 8e33ab4f2d Improve backward compatibility for Hashtbl functorial interface:
Hashtbl.Make returns a "create" function without an optional seed parameter.
(Which would be ignored anyway.)
Hashtbl.MakeSeeded returns a "create" function with an optional seed parameter.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11204 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-09-18 09:35:27 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Xavier Leroy e6d76ed5b1 Hashtbl again: simplified interface for seeding; seed is now an optional parameter of the "create" function, and it is the user's responsibility to generate a random seed if desired.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11063 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-06-04 08:08:40 +00:00
Xavier Leroy aea227fdeb Better hashing!
- New generic hash function based on Murmur 3, with better statistical
  properties (PR#5225), and better speed
- Make sure equal floats hash equally (PR#5222)
- Breadth-first traversal instead of depth-first
- Added seeded hash functions and seeded functorial interface to Hashtbl.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11056 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-05-29 09:52:27 +00:00
Alain Frisch b2520d12ea Document the fact that Hashtbl.length runs in constant time.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10931 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-01-18 12:54:57 +00:00
Damien Doligez 984fc2d8e3 typo dans un commentaire
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6854 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-05-04 13:36:47 +00:00
Xavier Leroy c8db125eae Removed misleading comment about mutable keys
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6578 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-08-10 08:46:22 +00:00
Basile Starynkevitch 2c8fe3ae6b added length function.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6167 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-03-23 12:37:19 +00:00
Damien Doligez 0c7aecb88d depollution suite (et fin?) (PR#1914 et PR#1956)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6047 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-01-02 19:23:29 +00:00