Commit Graph

36 Commits (bdd9ca391e3a56253d7480b07bb1a8aac361904c)

Author SHA1 Message Date
El-Hassan Wanas 8a614d79de Comment fixes
Co-Authored-By: David Allsopp <david.allsopp@metastack.com>
2019-10-15 14:14:31 +03:00
ElHassan Wanas e271e8fa4d Updated documentation for StringLabels, ArrayLabels, ListLabels and BytesLabels to show StdLabels usage 2019-10-15 12:44:44 +03: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
zapashcanon 6ca69c2546
Fix a typo 2018-04-01 16:58:40 +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
alainfrisch a5b1a39bd2 Fix missing deprecated attribute. 2017-04-05 19:27:06 +02:00
Gabriel Scherer 40ad626cc3 Merge pull request #972 from dra27/string-primitive-compatibility
Make %string_safe_set and %string_unsafe_set deprecated aliases for bytes versions
2017-03-08 20:49:17 -05: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
Roma Sokolov 4da2b30b98 Adds missing functions to *Labels modules (#875)
This fix makes it possible to use labeled modules as drop-in replacement with
`open StdLabels`.

Added signatures:

```ocaml
(* arrayLabels.mli *)
val iter2 : f:('a -> 'b -> unit) -> 'a array -> 'b array -> unit
val map2 : f:('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

(* bytesLabels.mli *)
val extend : bytes -> left:int -> right:int -> bytes
val blit_string :
val cat : bytes -> bytes -> bytes
val uppercase_ascii : bytes -> bytes
val lowercase_ascii : bytes -> bytes
val capitalize_ascii : bytes -> bytes
val uncapitalize_ascii : bytes -> bytes
val equal: t -> t -> bool

(* listLabels.mli *)
val compare_lengths : 'a list -> 'b list -> int
val compare_length_with : 'a list -> len:int -> int
val cons : 'a -> 'a list -> 'a list

(* moreLabels.Hashtbl *)
val is_randomized : unit -> bool

(* stringLabels.mli *)
val uppercase_ascii : string -> string
val lowercase_ascii : string -> string
val capitalize_ascii : string -> string
val uncapitalize_ascii : string -> string
val equal: t -> t -> bool
val split_on_char: sep:char -> string -> string list
```
2017-01-03 15:03:05 +01:00
Damien Doligez 4b9e196d52 restore compatibility for String.{unsafe_set,create,fill} 2016-12-14 13:20:17 +00:00
Hongbo Zhang 026248378b change primitive names back to %string_safe_set 2016-12-14 13:20:12 +00: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
Hongbo Zhang 82d2375cc6 apply changes to stdlib and test suite 2016-08-07 11:19:26 -04: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
Jérémie Dimino 62b89a3a5c Replace uses of "noalloc" by [@@noalloc]
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16455 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-06 10:58:22 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Gabriel Scherer 6d3318df9f I forgot about {Bytes,String}Labels.mapi; thanks Alain!
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-16 17:48:45 +00:00
Alain Frisch 68fe1ebd5a Use labeled arguments. (Cherry-picked from commit 15031 on 4.02).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15032 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-28 16:14:44 +00:00
Alain Frisch aeead32662 #6500: add String.init, Bytes.init, Labels couterparts, Stream.of_byte. (Cherry-picked from 15029 on 4.02.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15030 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-28 13:29:50 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56: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
Damien Doligez f95e7f4a59 uniformization of the warnings at the head of the hidden sections of the .mli
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12243 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-14 16:03:15 +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 6c24f4f90b merge version 3.12 from 3.12.1 to r12205
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-08 19:52:03 +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
Alain Frisch f537ba28b0 Adding String.iteri.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10762 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-11-05 08:15:36 +00:00
Jacques Garrigue 60710728de sync comments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7805 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-01-22 08:06:09 +00:00
Xavier Leroy 63c1789b5e Fusion des modifs faites sur la branche release jusqu'a la release 3.08.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-07-13 12:25:21 +00:00
Damien Doligez aa46693dc5 depollution (PR#1914, PR#1956)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6023 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-12-16 18:09:44 +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 1ae43c02ae correction typo
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4104 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-04 21:30:02 +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 acd469c220 Modif commentaires OCamldoc.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3960 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-10-30 16:52:04 +00:00
Maxence Guesdon b31320d10b Modification emplacement et syntaxe commentaires pour OCamldoc.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3938 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-10-29 17:58:08 +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