Commit Graph

18 Commits (master)

Author SHA1 Message Date
Nicolas Ojeda Bar 30969895ac Add {Int32,Int64,Nativeint}.unsigned_{compare,div,rem} 2018-11-10 12:48:11 +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
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 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
Jeremie Dimino 665176d77a Switch a few externals to [@@unboxed]
Switched the following functions:
- {Nativeint,Int32,Int64}.{of,to}_float
- Int{32,64}.float_of_bits
- Int{32,64}.bits_of_float
2015-11-03 17:20:05 +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 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
Xavier Leroy 6ce858f4a8 Ensure type specialization for the 'compare' functions (PR#4194)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7818 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-01-30 09:34:36 +00:00
Damien Doligez 5a678d29f5 depollution suite (PR#1914 et PR#1956)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6045 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-01-01 16:42:43 +00:00
Xavier Leroy fa20613687 Introduction de Int32.float_of_bits et Int32.bits_of_float. Remplacement de float_of_bytes par Int64.float_of_bits.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6033 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-12-20 16:24:35 +00:00
Xavier Leroy 7abcc8799e Ajout des litteraux de type int32, nativeint, int64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5510 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-04-25 12:27:31 +00:00
Xavier Leroy 9e3dc0cd97 Ajout d'un type t et d'une fonction compare pour permettre l'utilisation de ce module avec la signature OrderedType
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4948 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-26 09:13:59 +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
Xavier Leroy f4ca3d65bd Ajout {Int32,Int64,Nativeint}.{of_float,to_float}
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3103 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-04-18 08:51:28 +00:00
Damien Doligez ffb3cbf993 renommage de min/max
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2981 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-03-21 17:43:25 +00:00
Xavier Leroy b09f44025c Ajout des types predefinis int32, int64, nativeint.
Ajout des primitives correspondantes dans le type lambda.
Optimisation de ces primitives dans le compilateur natif


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2839 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-21 18:14:56 +00:00
Xavier Leroy 15f811734e Ajout Int32, Int64 et Nativeint
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2810 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-13 16:44:06 +00:00