Commit Graph

25 Commits (master)

Author SHA1 Message Date
Pierre-Marie Pédrot 94175c9f60 Mark the Bytes.equal external as not-allocating C. 2018-11-21 13:09:42 +01:00
Alain Frisch 1ec0ece0ab
Extend Bytes and Buffer with functions to read/write binary representations of numbers (#1864) 2018-11-09 13:40:33 +01: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
David Allsopp b5d1929e87 Whitespace and overlong line fixes. 2018-06-14 15:15:34 +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
ygrek afaa291c25 get rid of compare_val in String.concat 2017-07-07 10:44:34 +02:00
Jeremy Yallop 31f87765c2 Check for overflow in Bytes.extend. 2016-12-19 14:18:57 +00:00
David Allsopp a0ce2a22b7 Merge PR#801 into 4.04 2016-12-14 13:14:21 +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
yallop 7a7a7d81c1 Fix an overflow bug in String.concat (#833)
Fix an overflow bug in String.concat and make the function faster.
2016-10-04 14:01:05 +02:00
Hongbo Zhang 82d2375cc6 apply changes to stdlib and test suite 2016-08-07 11:19:26 -04:00
Damien Doligez 520fb2df50 Merge tag 4.03.0 into trunk. 2016-04-28 16:13:21 +02: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
Pierre Weis 24b8bf59f9 Escaping " in character constants
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16420 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-13 13:17:23 +00:00
Damien Doligez e60a2db81c PR#6521: {Bytes,Char,String}.escaped are locale-dependent
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-11 18:41:15 +00:00
Gabriel Scherer bcaa58a035 PR6694: Deprecate Latin-1 string manipulation functions.
Also, add documentation for the US-ASCII variants.

From: Peter Zotov <whitequark@whitequark.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15729 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:18 +00:00
Gabriel Scherer a533618a7a PR6695: Add ASCII counterparts to case-mapping functions.
This updates Char, String, Bytes in the stdlib.

For now, they are hidden from documentation and are only for
internal compiler use.

From: Peter Zotov <whitequark@whitequark.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15726 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:10 +00:00
Gabriel Scherer 85b75d7963 PR#6494: Add equal function in modules Big_int, Bytes, Char, Digest, Int32, Int64, Nativeint, Num and String
(Romain Calascibetta)

From: Romain Calascibetta <romain.calascibetta@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15725 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:08 +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
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Gabriel Scherer b7dd6d2c91 implement {Bytes,String}.mapi
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15058 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 15:57:38 +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