From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 26BD6822AC for ; Thu, 16 Nov 2017 10:20:16 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.44,402,1505772000"; d="scan'208";a="301033461" Received: from zmbs5.inria.fr ([128.93.142.18]) by mail2-relais-roc.national.inria.fr with ESMTP; 16 Nov 2017 10:20:16 +0100 Date: Thu, 16 Nov 2017 10:20:15 +0100 (CET) From: Thierry Martinez To: caml-list@inria.fr Message-ID: <1771189138.16960833.1510824015146.JavaMail.zimbra@inria.fr> In-Reply-To: <703910623.16955712.1510823518237.JavaMail.zimbra@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: [128.93.82.93] X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF57 (Mac)/8.0.9_GA_6191) Thread-Topic: Announce: Stdcompat, a compatibility module for OCaml standard library Thread-Index: QPvHmRS20rXi7He111nNsFDL2+e3fg== Subject: [Caml-list] Announce: Stdcompat, a compatibility module for OCaml standard library Hi, everybody! I am pleased to announce Stdcompat: a compatibility module for OCaml standard library. Stdcompat.* redefines (most of the) symbols available in the standard library of OCaml 4.06.0, such as List.find_opt, floatarray, Uchar.t, etc., and compiles on all versions of OCaml since 3.12.0. If the version of OCaml is recent enough, these types and values are just aliases to the corresponding symbols of the standard library, Otherwise, they are redefined. For instance, Stdcompat.floatarray is an alias for floatarray with OCaml 4.06.0 and for float array with OCaml 4.05.0 and older. Sub-modules signatures include the signatures of the standard library modules, in order to allow Stdcompat to be opened globally if preferred. For instance, Stdcompat.List reexports all the symbols of List. See the .mlip file or the preprocessed .mli and the generated documentation for the complete list of available symbols. The provided redefinitions do not make anything magic with the internal data structures: some of them are not as efficient as the one of the standard library (for instance, Hashtbl.filter_map_inplace), and can be even insecure (for instance, seeds are ignored for hash tables prior OCaml 4.00). This is a design choice that can possibly change in the future. Of course, these lesser redefinitions are used only if the OCaml version is not recent enough. The module is intended to follow future changes of the standard library, and the API can change, for instance if some symbols become deprecated. However, I will try to keep the ability to be compiled on old versions of OCaml (at least 3.12.0). GitHub repository: https://github.com/thierry-martinez/stdcompat Available in OPAM: opam install stdcompat Happy hacking! -- Thierry.