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
Max Mouratov
c329255521
Fixed grammar in user-facing comments and README
2017-04-06 14:16:18 +02:00
alainfrisch
4ea470feb1
Fix, add since tag.
2017-02-28 14:20:47 +01:00
Sébastien Briais
0c9de3c93a
Modify API of update.
2017-02-28 14:11:45 +01:00
Sébastien Briais
84b03d9e6d
Define Map.update.
2017-02-28 14:11:45 +01:00
Xavier Leroy
9dcdc361f1
PR#7343: add specifications for Map.merge and Map.union
2017-02-18 16:47:44 +01:00
Xavier Leroy
581c8f403b
Map: nonsensical documentation of find_opt
...
Cut and paste causes much damage. Does anyone proofread documentation?
2017-02-18 16:29:39 +01:00
Gabriel de Perthuis
bf4b142586
[Stdlib] Implement find_first, find_last for maps and sets ( #869 )
...
Finds the first/last binding where the key satisfies a monotonic
predicate.
Addresses #665 , supersedes #868 .
Thanks @alainfrisch for the idea and most of the implementation.
2016-11-12 22:47:46 +01: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
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
alainfrisch
324ed6b711
PR#6449: add Map.union.
2016-01-04 18:21:18 +01:00
iguer
fd163982d7
update the doc of Map.(add, remove, filter)
2015-11-22 18:29:16 +01:00
iguer
d689a686b9
Map.add x y m returns the original map if x is already bound to a value that is physically equal to y in m
2015-11-22 18:29:16 +01:00
iguer
37159fbc42
Map.filter returns the original map when the given predicate satisfies all the bindings of the map
2015-11-22 18:29:16 +01:00
iguer
81ca324ef3
Map.remove returns the original map when the binding to be removed is not present in the map
2015-11-22 18:29:15 +01:00
Gabriel Scherer
c03e155885
stdlib/map: Add some usage exemple in the documentation.
...
(Patch by Nicolas Braud-Santoni)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03 13:24:29 +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
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
Damien Doligez
575555eecd
merge changes from branching of 3.12 to release/3.12.0
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-08-02 14:37:22 +00:00
Damien Doligez
49e3d68bb5
cut long lines
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10483 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-31 12:48:13 +00:00
Alain Frisch
3671db5389
Adding @since ocamldoc tags.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10481 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-31 12:28:03 +00:00
Alain Frisch
66092ce6ff
Extend Map with functions from Set.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10468 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-25 13:29:43 +00:00
Damien Doligez
ed32f569e3
merge changes from ocaml3110 to ocaml3111rc0
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-05-20 11:52:42 +00:00
Damien Doligez
0e5ca9dca5
nettoyage
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7164 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-10-25 18:34:07 +00:00
Xavier Leroy
32077394fe
Ajout Map.is_empty, Map.compare, Map.equal
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6250 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-04-23 10:01:34 +00:00
Xavier Leroy
92f6138607
Specifier l'ordre de calcul pour les fonctions map et iter (PR#1947)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6114 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-02-14 16:52:22 +00:00
Xavier Leroy
6c5d5d9e03
MAJ documentation:
...
- comportement de nan avec les comparaisons et avec la fonction compare
- exceptions levees par les acces hors-bornes
- exceptions de debordement dans les conversions string -> int
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5963 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-11-21 16:06:08 +00:00
Damien Doligez
7ded3641b2
meilleure doc de la fonction de comparaison
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5870 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-10-16 13:05:34 +00:00
Xavier Leroy
e9cc0ac2ff
Nettoyage commentaires de doc
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4152 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-10 12:33:55 +00:00
Xavier Leroy
7501784c80
MAJ en-tetes pour mentionner la 'special exception' sur la LGPL
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-07 13:41:02 +00:00
Maxence Guesdon
69d5ded204
correction comments
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4096 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-04 15:42:07 +00:00
Jacques Garrigue
101a390b47
do not forget +'a
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4086 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-04 02:31:57 +00:00
Maxence Guesdon
ef3d334d4a
commentaires après
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4083 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-03 22:16:03 +00:00
Maxence Guesdon
241f51d429
Modification emplacements et syntaxe commentaires pour OCamldoc.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3927 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-10-26 23:33:00 +00:00
Maxence Guesdon
b95796f461
Modification emplacement et syntaxe commentaires pour OCamldoc
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3926 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-10-26 22:38:48 +00:00
Jacques Garrigue
ea299bbbc1
passage aux labels stricts
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3696 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-09-06 08:52:32 +00:00
Xavier Leroy
41dc6c3f04
Typo dans doc de Map.mem (PR#440)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3585 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-07-16 19:41:51 +00:00
Jacques Garrigue
96e7b2baa3
add variance annotation
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3409 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-02-12 23:46:18 +00:00
Xavier Leroy
918275b574
Espacement
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3391 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-02-05 08:54:28 +00:00
Jacques Garrigue
19fede7478
passage aux labels legers
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3024 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-04-03 01:57:52 +00:00
Jacques Garrigue
db3dca5482
give mapi same labels as iter
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2843 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-22 03:05:28 +00:00
Xavier Leroy
5cdfd65c27
Ajout de mapi
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2835 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-21 18:12:16 +00:00
Jacques Garrigue
296fc05470
Merge olabl branch
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-30 16:07:38 +00:00
Xavier Leroy
cc0f32b054
Changement de la licence
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy
a5eb7789fd
Revu le module Buffer.
...
Utilise Buffer dans Printf.sprintf; ajout Printf.bprintf.
Ajout Map.mem.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-25 10:26:38 +00:00
Xavier Leroy
59c6038a01
Il est faux que - est une bonne fonction de comparaison entre entiers (debordements!)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1837 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-12-09 09:11:48 +00:00
Damien Doligez
b8ccccff49
Makefiles: fix disparition de weak.cmo
...
Changement de type des fonctions iter
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-10-31 12:59:29 +00:00
Damien Doligez
03ec746bf1
deTABisation
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1563 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-05-19 15:42:21 +00:00