From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 7692E80054 for ; Fri, 4 Nov 2016 18:41:32 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=ivg@ieee.org; spf=Pass smtp.mailfrom=ivg@ieee.org; spf=None smtp.helo=postmaster@mail-lf0-f47.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=209.85.215.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of ivg@ieee.org designates 209.85.215.47 as permitted sender) identity=mailfrom; client-ip=209.85.215.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lf0-f47.google.com) identity=helo; client-ip=209.85.215.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="postmaster@mail-lf0-f47.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AeJBFwR1k8/RL7o7MsmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?segRKPad9pjvdHbS+e9qxAeQG96KsbQU2qGP6/iocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIs?= =?us-ascii?q?YL+kQMiC3o/uj7j60qaQSj0AvCC6b7J2IUf+hiTqne5Sv7FfLL0swADCuHpCdr?= =?us-ascii?q?ce72ppIVWOg0S0vZ/or9ZLuh5dsPM59sNGTb6yP+FhFeQZX3waNDUZ7cjquB+L?= =?us-ascii?q?YQyL53QRQC1CnhNNAgXDqh39Wpb+vznSt+xn2SDcM9egHp4uXjH3zrliTlfHjz?= =?us-ascii?q?sAKTU58X3Mwphxkq1zoR+sqlp42YGCM9LdD+Z3Yq6IJYBSfmFGRMsEEnUZWo4?= =?us-ascii?q?=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0A8AgAUxxxYhi/XVdFdGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBFQEBAQECAQEBAQgBAQEBgwMBAQEBAT06fAeCeqE3gliJXYoZKoU/OgK?= =?us-ascii?q?CEAdCEQEBAQEBAQEBAQEBEgEBAQgLCwkdMIIzBAEVAQSCEAEBAwEMBggJHQEBN?= =?us-ascii?q?wEECwkCCy0KAgIiEgEFAQ4BDQYTGgiILggOkVePTYEyPzKKJw00Z4RJAQEFiCY?= =?us-ascii?q?BAQEBBgEBAQEBARkIEIYvg1CBBYQYXIJXglyIUJFYhjSDC4cBgW5OjU6HKYV4g?= =?us-ascii?q?kITHoERDyWBDYJtLCCCBCI0AQSFcYFOAQEB?= X-IPAS-Result: =?us-ascii?q?A0A8AgAUxxxYhi/XVdFdGgEBAQECAQEBAQgBAQEBFQEBAQE?= =?us-ascii?q?CAQEBAQgBAQEBgwMBAQEBAT06fAeCeqE3gliJXYoZKoU/OgKCEAdCEQEBAQEBA?= =?us-ascii?q?QEBAQEBEgEBAQgLCwkdMIIzBAEVAQSCEAEBAwEMBggJHQEBNwEECwkCCy0KAgI?= =?us-ascii?q?iEgEFAQ4BDQYTGgiILggOkVePTYEyPzKKJw00Z4RJAQEFiCYBAQEBBgEBAQEBA?= =?us-ascii?q?RkIEIYvg1CBBYQYXIJXglyIUJFYhjSDC4cBgW5OjU6HKYV4gkITHoERDyWBDYJ?= =?us-ascii?q?tLCCCBCI0AQSFcYFOAQEB?= X-IronPort-AV: E=Sophos;i="5.31,444,1473112800"; d="scan'208,217";a="199269585" Received: from mail-lf0-f47.google.com ([209.85.215.47]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 04 Nov 2016 18:41:29 +0100 Received: by mail-lf0-f47.google.com with SMTP id b81so69637804lfe.1 for ; Fri, 04 Nov 2016 10:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Wi/+grICxYVCqT4Gt2AyXjXV0iyhuVKDhLMa/b0UxjI=; b=asTvtqMhLGw5pkyrkMwxENqlUUjJJ8ZEfsat6jh+dfJX0dba7M9IfzOpLfSIyRYaUD /jA0rwe7stsJZ56GXuSYG6V/KRED8UpNtKokeorpWcIg/AMXmUv+qdkDo+ceavI5uOd4 ExDpnDPHTGKh/RIY09TweFJnW6ImX1jexnMmsAI6x6uBql64eKs1F5KmDJ9VL9ipIH7H 85GFUCMZES02nfr4wW4XkBmRVJ2RJkMUJ+CXD4oitOMGGE63sT42glng5K1F9TlzsseK HPipX1+nU6wHGg4k0a0Hvi6MZeKHi5PRS5P4QWgeAASqDDGQXteTa+C/UtnYzUKl8NjB DJOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Wi/+grICxYVCqT4Gt2AyXjXV0iyhuVKDhLMa/b0UxjI=; b=W02b7eMstq6YlV66DlEd8A0hd8XeZszmhhqbx2ViafGW37/mYfaSigIGm+hvuCVLg2 z5+OwxmfydjMKn2i62/ad/fxyw9Ir9Vmx5UIFvl68yXEkWHdbOHl4NIWJcwe5QOKNfEt aIWsLma+yd5dF+d5lRVPmsVze7XvNKPwdNrvnvjplHOfQs9KQA7ce/oPoOnJygRcLrcx ojOBuvLB/ZuF428YpHvcwpSA1srz8IR2g1JdvFKV6G/FlPyYM93XsFPv1dsl0/okPew/ rksUwCtPoaMXaVjj8ytEnjzZskYjNmZ7mn+389mKcJLREinYZloqVXGNsUfYXzDOFhBp xS0g== X-Gm-Message-State: ABUngveoTtN9qvV0Yi5gKU0iRjzC6CUMzNS7JZgC/uwXiWYl7LBJmJHj67AgRICmHRnWRELrmmf9NWob4C9CGvfZ X-Received: by 10.25.203.148 with SMTP id b142mr8417510lfg.145.1478281288315; Fri, 04 Nov 2016 10:41:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.28.34 with HTTP; Fri, 4 Nov 2016 10:41:27 -0700 (PDT) In-Reply-To: References: From: Ivan Gotovchits Date: Fri, 4 Nov 2016 13:41:27 -0400 Message-ID: To: Damien Doligez Cc: caml users , caml announce Content-Type: multipart/alternative; boundary=94eb2c1a0770119ffd05407d2f0f Subject: Re: [Caml-list] [caml-announce] OCaml version 4.04.0 is released. --94eb2c1a0770119ffd05407d2f0f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Great news, thank you! Is flambda enabled by default in 4.04? On Fri, Nov 4, 2016 at 1:29 PM, Damien Doligez wrote: > Dear OCaml users, > > We have the pleasure of celebrating the discovery of Tutankhamun's > tomb by announcing the release of OCaml version 4.04.0. > This is a major release with several new features (most notably, > Spacetime). See the list of changes below. > > It is (or soon will be) available as an OPAM switch, or as a source > download here: < http://caml.inria.fr/distrib/ocaml-4.04/ > > > Happy hacking, > > -- Damien Doligez for the OCaml team. > > > OCaml 4.04.0: > ------------- > > (Changes that can break existing programs are marked with a "*") > > ### Language features: > > - PR#7233: Support GADT equations on non-local abstract types > (Jacques Garrigue) > > - GPR#187, GPR#578: Local opening of modules in a pattern. > Syntax: "M.(p)", "M.[p]","M.[| p |]", "M.{p}" > (Florian Angeletti, Jacques Garrigue, review by Alain Frisch) > > - GPR#301: local exception declarations "let exception ... in" > (Alain Frisch) > > - GPR#508: Allow shortcut for extension on semicolons: ;%foo > (Jeremie Dimino) > > - GPR#606: optimized representation for immutable records with a single > field, and concrete types with a single constructor with a single > argument. > This is triggered with a [@@unboxed] attribute on the type definition. > Currently mutually recursive datatypes are not well supported, this > limitation should be lifted in the future (see MPR#7364). > (Damien Doligez) > > ### Compiler user-interface and warnings: > > * PR#6475, GPR#464: interpret all command-line options before compiling a= ny > files, changes (improves) the semantics of repeated -o options or -o > combined with -c see the super-detailed commit message at > https://github.com/ocaml/ocaml/commit/da56cf6dfdc13c09905c2e07f1d484 > 9c8346eec8 > (whitequark) > > - PR#7139: clarify the wording of Warning 38 > (Unused exception or extension constructor) > (Gabriel Scherer) > > * PR#7147, GPR#475: add colors when reporting errors generated by ppx > rewriters. > Remove the `Location.errorf_prefixed` function which is no longer > relevant > (Simon Cruanes, J=C3=A9r=C3=A9mie Dimino) > > - PR#7169, GPR#501: clarify the wording of Warning 8 > (Non-exhaustivity warning for pattern matching) > (Florian Angeletti, review and report by Gabriel Scherer) > > * GPR#591: Improve support for OCAMLPARAM: (i) do not use objects > files with -a, -pack, -shared; (ii) use "before" objects in the toplevel > (but not "after" objects); (iii) use -I dirs in the toplevel, > (iv) fix bug where -I dirs were ignored when using threads > (Marc Lasson, review by Damien Doligez and Alain Frisch) > > - GPR#648: New -plugin option for ocamlc and ocamlopt, to dynamically > extend > the compilers at runtime. > (Fabrice Le Fessant) > > - GPR#684: Detect unused module declarations > (Alain Frisch) > > - GPR#706: Add a settable Env.Persistent_signature.load function so > that cmi files can be loaded from other sources. This can be used to > create self-contained toplevels. > (J=C3=A9r=C3=A9mie Dimino) > > ### Standard library: > > - GPR#473: Provide `Sys.backend_type` so that user can write > backend-specific > code in some cases (for example, code generator). > (Hongbo Zhang) > > - PR#6279, GPR#553: implement Set.map > (Gabriel Scherer) > > - PR#6820, GPR#560: Add Obj.reachable_words to compute the > "transitive" heap size of a value > (Alain Frisch, review by Mark Shinwell and Damien Doligez) > > - GPR#589: Add a non-allocating function to recover the number of > allocated minor words. > (Pierre Chambart, review by Damien Doligez and Gabriel Scherer) > > - GPR#626: String.split_on_char > (Alain Frisch) > > - GPR#669: Filename.extension and Filename.remove_extension > (Alain Frisch, request by Edgar Aroutiounian, review by Daniel Bunzli > and Damien Doligez) > > ### Code generation and optimizations: > > - PR#4747, GPR#328: Optimize Hashtbl by using in-place updates of its > internal bucket lists. All operations run in constant stack size > and are usually faster, except Hashtbl.copy which can be much > slower > (Alain Frisch) > > * PR#6217, GPR#538: Optimize performance of record update: > no more performance cliff when { foo with t1 =3D ..; t2 =3D ...; ... } > hits 6 updated fields > (Olivier Nicole, review by Thomas Braibant and Pierre Chambart) > > - PR#7023, GPR#336: Better unboxing strategy > (Alain Frisch, Pierre Chambart) > > - PR#7244, GPR#840: Ocamlopt + flambda requires a lot of memory > to compile large array literal expressions > (Pierre Chambart, review by Mark Shinwell) > > - PR#7291, GPR#780: Handle specialisation of recursive function that does > not always preserve the arguments > (Pierre Chambart, Mark Shinwell, report by Simon Cruanes) > > - GPR#427: Obj.is_block is now an inlined OCaml function instead of a > C external. This should be faster. > (Demi Obenour) > > - GPR#580: Optimize immutable float records > (Pierre Chambart, review by Mark Shinwell) > > - GPR#602: Do not generate dummy code to force module linking > (Pierre Chambart, reviewed by Jacques Garrigue) > > - PR#7328, GPR#702: Do not eliminate boxed int divisions by zero and > avoid checking twice if divisor is zero with flambda. > (Pierre Chambart, report by Jeremy Yallop) > > - GPR#703: Optimize some constant string operations when the "-safe-strin= g" > configure time option is enabled. > (Pierre Chambart) > > - GPR#707: Load cross module information during a meet > (Pierre Chambart, report by Leo White, review by Mark Shinwell) > > - GPR#709: Share a few more equal switch branches > (Pierre Chambart, review by Gabriel Scherer) > > - GPR#712: Small improvements to type-based optimizations for array > and lazy > (Alain Frisch, review by Pierre Chambart) > > - GPR#714: Prevent warning 59 from triggering on Lazy of constants > (Pierre Chambart, review by Leo White) > > - GPR#723 Sort emitted functions according to source location > (Pierre Chambart, review by Mark Shinwell) > > - Lack of type normalization lead to missing simple compilation for "lazy > x" > (Alain Frisch) > > ### Runtime system: > > - PR#7210, GPR#562: Allows to register finalisation function that are > called only when a value will never be reachable anymore. The > drawbacks compared to the existing one is that the finalisation > function is not called with the value as argument. These finalisers > are registered with `GC.finalise_last` > (Fran=C3=A7ois Bobot reviewed by Damien Doligez and Leo White) > > - GPR#590: Do not perform compaction if the real overhead is less than > expected > (Thomas Braibant) > > ### Tools: > > - PR#7189: toplevel #show, follow chains of module aliases > (Gabriel Scherer, report by Daniel B=C3=BCnzli, review by Thomas Refis) > > - PR#7248: have ocamldep interpret -open arguments in left-to-right order > (Gabriel Scherer, report by Anton Bachin) > > - PR#7272, GPR#798: ocamldoc, missing line breaks in type_*.html files > (Florian Angeletti) > > - PR#7290: ocamldoc, improved support for inline records > (Florian Angeletti) > > - PR#7323, GPR#750: ensure "ocamllex -ml" works with -safe-string > (Hongbo Zhang) > > - PR#7350, GPR#806: ocamldoc, add viewport metadata to generated html pag= es > (Florian Angeletti, request by Daniel B=C3=BCnzli) > > - GPR#452: Make the output of ocamldep more stable > (Alain Frisch) > > - GPR#548: empty documentation comments > (Florian Angeletti) > > - GPR#575: Add the -no-version option to the toplevel > (S=C3=A9bastien Hinderer) > > - GPR#598: Add a --strict option to ocamlyacc treat conflicts as errors > (this option is now used for the compiler's parser) > (Jeremy Yallop) > > - GPR#613: make ocamldoc use -open arguments > (Florian Angeletti) > > - GPR#718: ocamldoc, fix order of extensible variant constructors > (Florian Angeletti) > > ### Debugging and profiling: > > - GPR#585: Spacetime, a new memory profiler (Mark Shinwell, Leo White) > > ### Runtime system: > > - PR#7203, GPR#534: Add a new primitive caml_alloc_float_array to allocate > an > array of floats > (Thomas Braibant) > > ### Manual and documentation: > > - PR#7007, PR#7311: document the existence of OCAMLPARAM and > ocaml_compiler_internal_params > (Damien Doligez, reports by Wim Lewis and Gabriel Scherer) > > - PR#7243: warn users against using WinZip to unpack the source archive > (Damien Doligez, report by Shayne Fletcher) > > - PR#7245, GPR#565: clarification to the wording and documentation > of Warning 52 (fragile constant pattern) > (Gabriel Scherer, William, Adrien Nader, Jacques Garrigue) > > - #PR7265, GPR#769: Restore 4.02.3 behaviour of Unix.fstat, if the > file descriptor doesn't wrap a regular file (win32unix only) > (Andreas Hauptmann, review by David Allsopp) > > - PR#7288: flatten : Avoid confusion > (Damien Doligez, report by user 'tormen') > > - PR#7355: Gc.finalise and lazy values > (Jeremy Yallop) > > - GPR#841: Document that [Store_field] must not be used to populate > arrays of values declared using [CAMLlocalN] (Mark Shinwell) > > ### Build system: > > - GPR#324: Compiler developers: Adding new primitives to the > standard runtime doesn't require anymore to run `make bootstrap` > (Fran=C3=A7ois Bobot) > > - GPR#384: Fix compilation using old Microsoft C Compilers not > supporting secure CRT functions (SDK Visual Studio 2005 compiler and > earlier) and standard 64-bit integer literals (Visual Studio .NET > 2002 and earlier) > (David Allsopp) > > - GPR#507: More sharing between Unix and Windows makefiles > (whitequark, review by Alain Frisch) > > * GPR#512, GPR#587: Installed `ocamlc`, `ocamlopt`, and `ocamllex` are > now the native-code versions of the tools, if those versions were > built. > (Demi Obenour) > > - GPR#687: "./configure -safe-string" to get a system where > "-unsafe-string" is not allowed, thus giving stronger non-local > guarantees about immutability of strings > (Alain Frisch, review by Hezekiah M. Carty) > > ### Bug fixes: > > * PR#6505: Missed Type-error leads to a segfault upon record access. > (Jacques Garrigue, extra report by Stephen Dolan) > Proper fix required a more restrictive approach to recursive types: > mutually recursive types are seen as abstract types (i.e. > non-contractive) > when checking the well-foundedness of the recursion. > > * PR#6752: Nominal types and scope escaping. > Revert to strict scope for non-generalizable type variables, cf. Mantis. > Note that this is actually stricter than the behavior before 4.03, > cf. PR#7313, meaning that you may sometimes need to add type annotations > to explicitly instantiate non-generalizable type variables. > (Jacques Garrigue, following discussion with Jeremy Yallop, > Nicolas Ojeda Bar and Alain Frisch) > > - PR#7112: Aliased arguments ignored for equality of module types > (Jacques Garrigue, report by Leo White) > > - PR#7134: compiler forcing aliases it shouldn't while reporting type > errors > (Jacques Garrigue, report and suggestion by sliquister) > > - PR#7153: document that Unix.SOCK_SEQPACKET is not really usable. > > - PR#7165, GPR#494: uncaught exception on invalid lexer directive > (Gabriel Scherer, report by KC Sivaramakrishnan using afl-fuzz) > > - PR#7257, GPR#583: revert a 4.03 change of behavior on (Unix.sleep 0.), > it now calls (nano)sleep for 0 seconds as in (< 4.03) versions. > (Hannes Mehnert, review by Damien Doligez) > > - PR#7260: GADT + subtyping compile time crash > (Jacques Garrigue, report by Nicolas Ojeda Bar) > > - PR#7269: Segfault from conjunctive constraints in GADT > (Jacques Garrigue, report by Stephen Dolan) > > - PR#7276: Support more than FD_SETSIZE sockets in Windows' emulation > of select > (David Scott, review by Alain Frisch) > > * PR#7278: Prevent private inline records from being mutated > (Alain Frisch, report by Pierre Chambart) > > - PR#7284: Bug in mcomp_fields leads to segfault > (Jacques Garrigue, report by Leo White) > > - PR#7285: Relaxed value restriction broken with principal > (Jacques Garrigue, report by Leo White) > > - PR#7297: -strict-sequence turns off Warning 21 > (Jacques Garrigue, report by Valentin Gatien-Baron) > > - PR#7299: remove access to OCaml heap inside blocking section in win32un= ix > (David Allsopp, report by Andreas Hauptmann) > > - PR#7300: remove access to OCaml heap inside blocking in Unix.sleep on > Windows > (David Allsopp) > > - PR#7305: -principal causes loop in type checker when compiling > (Jacques Garrigue, report by Anil Madhavapeddy, analysis by Leo White) > > - PR#7330: Missing exhaustivity check for extensible variant > (Jacques Garrigue, report by Elarnon *) > > - PR#7374: Contractiveness check unsound with constraints > (Jacques Garrigue, report by Leo White) > > - PR#7378: GADT constructors can be re-exposed with an incompatible type > (Jacques Garrigue, report by Alain Frisch) > > - PR#7389: Unsoundness in GADT exhaustiveness with existential variables > (Jacques Garrigue, report by Stephen Dolan) > > * GPR#533: Thread library: fixed [Thread.wait_signal] so that it > converts back the signal number returned by [sigwait] to an > OS-independent number > (J=C3=A9r=C3=A9mie Dimino) > > - GPR#600: (similar to GPR#555) ensure that register typing constraints a= re > respected at N-way join points in the control flow graph > (Mark Shinwell) > > - GPR#672: Fix float_of_hex parser to correctly reject some invalid forms > (Bogdan T=C4=83t=C4=83roiu, review by Thomas Braibant and Alain Frisch) > > - GPR#700: Fix maximum weak bucket size > (Nicolas Ojeda Bar, review by Fran=C3=A7ois Bobot) > > - GPR#708 Allow more module aliases in strengthening (Leo White) > > - GPR#713, PR#7301: Fix wrong code generation involving lazy values in > Flambda > mode > (Mark Shinwell, review by Pierre Chambart and Alain Frisch) > > - GPR#721: Fix infinite loop in flambda due to [@@specialise] annotations > > - GPR#779: Building native runtime on Windows could fail when bootstrappi= ng > FlexDLL if there was also a system-installed flexlink > (David Allsopp, report Michael Soegtrop) > > - GPR#805, GPR#815, GPR#833: check for integer overflow in String.concat > (Jeremy Yallop, > review by Damien Doligez, Alain Frisch, Daniel B=C3=BCnzli, Fabrice Le > Fessant) > > - GPR#810: check for integer overflow in Array.concat > (Jeremy Yallop) > > - GPR#814: fix the Buffer.add_substring bounds check to handle overflow > (Jeremy Yallop) > > - GPR#880: Fix [@@inline] with default parameters in flambda (Leo White) > > - GPR#525: fix build on OpenIndiana > (Sergey Avseyev, review by Damien Doligez) > > ### Internal/compiler-libs changes: > > - PR#7200, GPR#539: Improve, fix, and add test for parsing/pprintast.ml > (Runhang Li, David Sheets, Alain Frisch) > > - GPR#351: make driver/pparse.ml functions type-safe > (Gabriel Scherer, Dmitrii Kosarev, review by J=C3=A9r=C3=A9mie Dimino) > > - GPR#516: Improve Texp_record constructor representation, and > propagate updated record type information > (Pierre Chambart, review by Alain Frisch) > > - GPR#678: Graphics.close_graph crashes 64-bit Windows ports > (re-implementation > of PR#3963) > (David Allsopp) > > - GPR#679: delay registration of docstring after the mapper is applied > (Hugo Heuzard, review by Leo White) > > - GPR#872: don't attach (**/**) comments to any particular node > (Thomas Refis, review by Leo White) > > --94eb2c1a0770119ffd05407d2f0f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Great news, thank you!

Is flambda=C2=A0= enabled by default in 4.04?

On Fri, Nov 4, 2016 at 1:29 PM, Damien Doligez <damien.doligez@inria.fr> wrote:
Dear OCaml users,

We have the pleasure of celebrating the discovery of Tutankhamun's
tomb by announcing the release of OCaml version 4.04.0.
This is a major release with several new features (most notably,
Spacetime). See the list of changes below.

It is (or soon will be) available as an OPAM switch, or as a source
download here: < http://caml.inria.fr/distrib/ocaml-= 4.04/ >

Happy hacking,

-- Damien Doligez for the OCaml team.


OCaml 4.04.0:
-------------

(Changes that can break existing programs are marked with a "*")<= br>
### Language features:

- PR#7233: Support GADT equations on non-local abstract types
=C2=A0 (Jacques Garrigue)

- GPR#187, GPR#578: Local opening of modules in a pattern.
=C2=A0 Syntax: "M.(p)", "M.[p]","M.[| p |]", = "M.{p}"
=C2=A0 (Florian Angeletti, Jacques Garrigue, review by Alain Frisch)

- GPR#301: local exception declarations "let exception ... in"
=C2=A0 (Alain Frisch)

- GPR#508: Allow shortcut for extension on semicolons: ;%foo
=C2=A0 (Jeremie Dimino)

- GPR#606: optimized representation for immutable records with a single
=C2=A0 field, and concrete types with a single constructor with a single ar= gument.
=C2=A0 This is triggered with a [@@unboxed] attribute on the type definitio= n.
=C2=A0 Currently mutually recursive datatypes are not well supported, this<= br> =C2=A0 limitation should be lifted in the future (see MPR#7364).
=C2=A0 (Damien Doligez)

### Compiler user-interface and warnings:

* PR#6475, GPR#464: interpret all command-line options before compiling any=
=C2=A0 files, changes (improves) the semantics of repeated -o options or -o=
=C2=A0 combined with -c see the super-detailed commit message at
=C2=A0 https://github.= com/ocaml/ocaml/commit/da56cf6dfdc13c09905c2e07f1d4849c8346e= ec8
=C2=A0 (whitequark)

- PR#7139: clarify the wording of Warning 38
=C2=A0 (Unused exception or extension constructor)
=C2=A0 (Gabriel Scherer)

* PR#7147, GPR#475: add colors when reporting errors generated by ppx rewri= ters.
=C2=A0 Remove the `Location.errorf_prefixed` function which is no longer re= levant
=C2=A0 (Simon Cruanes, J=C3=A9r=C3=A9mie Dimino)

- PR#7169, GPR#501: clarify the wording of Warning 8
=C2=A0 (Non-exhaustivity warning for pattern matching)
=C2=A0 (Florian Angeletti, review and report by Gabriel Scherer)

* GPR#591: Improve support for OCAMLPARAM: (i) do not use objects
=C2=A0 files with -a, -pack, -shared; (ii) use "before" objects i= n the toplevel
=C2=A0 (but not "after" objects); (iii) use -I dirs in the toplev= el,
=C2=A0 (iv) fix bug where -I dirs were ignored when using threads
=C2=A0 (Marc Lasson, review by Damien Doligez and Alain Frisch)

- GPR#648: New -plugin option for ocamlc and ocamlopt, to dynamically exten= d
=C2=A0 the compilers at runtime.
=C2=A0 (Fabrice Le Fessant)

- GPR#684: Detect unused module declarations
=C2=A0 (Alain Frisch)

- GPR#706: Add a settable Env.Persistent_signature.load function so
=C2=A0 that cmi files can be loaded from other sources. This can be used to=
=C2=A0 create self-contained toplevels.
=C2=A0 (J=C3=A9r=C3=A9mie Dimino)

### Standard library:

- GPR#473: Provide `Sys.backend_type` so that user can write backend-specif= ic
=C2=A0 code in some cases (for example,=C2=A0 code generator).
=C2=A0 (Hongbo Zhang)

- PR#6279, GPR#553: implement Set.map
=C2=A0 (Gabriel Scherer)

- PR#6820, GPR#560: Add Obj.reachable_words to compute the
=C2=A0 "transitive" heap size of a value
=C2=A0 (Alain Frisch, review by Mark Shinwell and Damien Doligez)

- GPR#589: Add a non-allocating function to recover the number of
=C2=A0 allocated minor words.
=C2=A0 (Pierre Chambart, review by Damien Doligez and Gabriel Scherer)

- GPR#626: String.split_on_char
=C2=A0 (Alain Frisch)

- GPR#669: Filename.extension and Filename.remove_extension
=C2=A0 (Alain Frisch, request by Edgar Aroutiounian, review by Daniel Bunzl= i
=C2=A0 and Damien Doligez)

### Code generation and optimizations:

- PR#4747, GPR#328: Optimize Hashtbl by using in-place updates of its
=C2=A0 internal bucket lists.=C2=A0 All operations run in constant stack si= ze
=C2=A0 and are usually faster, except Hashtbl.copy which can be much
=C2=A0 slower
=C2=A0 (Alain Frisch)

* PR#6217, GPR#538: Optimize performance of record update:
=C2=A0 no more performance cliff when { foo with t1 =3D ..; t2 =3D ...; ...= }
=C2=A0 hits 6 updated fields
=C2=A0 (Olivier Nicole, review by Thomas Braibant and Pierre Chambart)

- PR#7023, GPR#336: Better unboxing strategy
=C2=A0 (Alain Frisch, Pierre Chambart)

- PR#7244, GPR#840: Ocamlopt + flambda requires a lot of memory
=C2=A0 to compile large array literal expressions
=C2=A0 (Pierre Chambart, review by Mark Shinwell)

- PR#7291, GPR#780: Handle specialisation of recursive function that does =C2=A0 not always preserve the arguments
=C2=A0 (Pierre Chambart, Mark Shinwell, report by Simon Cruanes)

- GPR#427: Obj.is_block is now an inlined OCaml function instead of a
=C2=A0 C external.=C2=A0 This should be faster.
=C2=A0 (Demi Obenour)

- GPR#580: Optimize immutable float records
=C2=A0 (Pierre Chambart, review by Mark Shinwell)

- GPR#602: Do not generate dummy code to force module linking
=C2=A0 (Pierre Chambart, reviewed by Jacques Garrigue)

- PR#7328, GPR#702: Do not eliminate boxed int divisions by zero and
=C2=A0 avoid checking twice if divisor is zero with flambda.
=C2=A0 (Pierre Chambart, report by Jeremy Yallop)

- GPR#703: Optimize some constant string operations when the "-safe-st= ring"
=C2=A0 configure time option is enabled.
=C2=A0 (Pierre Chambart)

- GPR#707: Load cross module information during a meet
=C2=A0 (Pierre Chambart, report by Leo White, review by Mark Shinwell)

- GPR#709: Share a few more equal switch branches
=C2=A0 (Pierre Chambart, review by Gabriel Scherer)

- GPR#712: Small improvements to type-based optimizations for array
=C2=A0 and lazy
=C2=A0 (Alain Frisch, review by Pierre Chambart)

- GPR#714: Prevent warning 59 from triggering on Lazy of constants
=C2=A0 (Pierre Chambart, review by Leo White)

- GPR#723 Sort emitted functions according to source location
=C2=A0 (Pierre Chambart, review by Mark Shinwell)

- Lack of type normalization lead to missing simple compilation for "l= azy x"
=C2=A0 (Alain Frisch)

### Runtime system:

- PR#7210, GPR#562: Allows to register finalisation function that are
=C2=A0 called only when a value will never be reachable anymore. The
=C2=A0 drawbacks compared to the existing one is that the finalisation
=C2=A0 function is not called with the value as argument. These finalisers<= br> =C2=A0 are registered with `GC.finalise_last`
=C2=A0 (Fran=C3=A7ois Bobot reviewed by Damien Doligez and Leo White)

- GPR#590: Do not perform compaction if the real overhead is less than expe= cted
=C2=A0 (Thomas Braibant)

### Tools:

- PR#7189: toplevel #show, follow chains of module aliases
=C2=A0 (Gabriel Scherer, report by Daniel B=C3=BCnzli, review by Thomas Ref= is)

- PR#7248: have ocamldep interpret -open arguments in left-to-right order =C2=A0 (Gabriel Scherer, report by Anton Bachin)

- PR#7272, GPR#798: ocamldoc, missing line breaks in type_*.html files
=C2=A0 (Florian Angeletti)

- PR#7290: ocamldoc, improved support for inline records
=C2=A0 (Florian Angeletti)

- PR#7323, GPR#750: ensure "ocamllex -ml" works with -safe-string=
=C2=A0 (Hongbo Zhang)

- PR#7350, GPR#806: ocamldoc, add viewport metadata to generated html pages=
=C2=A0 (Florian Angeletti, request by Daniel B=C3=BCnzli)

- GPR#452: Make the output of ocamldep more stable
=C2=A0 (Alain Frisch)

- GPR#548: empty documentation comments
=C2=A0 (Florian Angeletti)

- GPR#575: Add the -no-version option to the toplevel
=C2=A0 (S=C3=A9bastien Hinderer)

- GPR#598: Add a --strict option to ocamlyacc treat conflicts as errors
=C2=A0 (this option is now used for the compiler's parser)
=C2=A0 (Jeremy Yallop)

- GPR#613: make ocamldoc use -open arguments
=C2=A0 (Florian Angeletti)

- GPR#718: ocamldoc, fix order of extensible variant constructors
=C2=A0 (Florian Angeletti)

### Debugging and profiling:

- GPR#585: Spacetime, a new memory profiler (Mark Shinwell, Leo White)

### Runtime system:

- PR#7203, GPR#534: Add a new primitive caml_alloc_float_array to allocate = an
=C2=A0 array of floats
=C2=A0 (Thomas Braibant)

### Manual and documentation:

- PR#7007, PR#7311: document the existence of OCAMLPARAM and
=C2=A0 ocaml_compiler_internal_params
=C2=A0 (Damien Doligez, reports by Wim Lewis and Gabriel Scherer)

- PR#7243: warn users against using WinZip to unpack the source archive
=C2=A0 (Damien Doligez, report by Shayne Fletcher)

- PR#7245, GPR#565: clarification to the wording and documentation
=C2=A0 of Warning 52 (fragile constant pattern)
=C2=A0 (Gabriel Scherer, William, Adrien Nader, Jacques Garrigue)

- #PR7265, GPR#769: Restore 4.02.3 behaviour of Unix.fstat, if the
=C2=A0 file descriptor doesn't wrap a regular file (win32unix only)
=C2=A0 (Andreas Hauptmann, review by David Allsopp)

- PR#7288: flatten : Avoid confusion
=C2=A0 (Damien Doligez, report by user 'tormen')

- PR#7355: Gc.finalise and lazy values
=C2=A0 (Jeremy Yallop)

- GPR#841: Document that [Store_field] must not be used to populate
=C2=A0 arrays of values declared using [CAMLlocalN] (Mark Shinwell)

### Build system:

- GPR#324: Compiler developers: Adding new primitives to the
=C2=A0 standard runtime doesn't require anymore to run `make bootstrap`=
=C2=A0 (Fran=C3=A7ois Bobot)

- GPR#384: Fix compilation using old Microsoft C Compilers not
=C2=A0 supporting secure CRT functions (SDK Visual Studio 2005 compiler and=
=C2=A0 earlier) and standard 64-bit integer literals (Visual Studio .NET
=C2=A0 2002 and earlier)
=C2=A0 (David Allsopp)

- GPR#507: More sharing between Unix and Windows makefiles
=C2=A0 (whitequark, review by Alain Frisch)

* GPR#512, GPR#587: Installed `ocamlc`, `ocamlopt`, and `ocamllex` are
=C2=A0 now the native-code versions of the tools, if those versions were
=C2=A0 built.
=C2=A0 (Demi Obenour)

- GPR#687: "./configure -safe-string" to get a system where
=C2=A0 "-unsafe-string" is not allowed, thus giving stronger non-= local
=C2=A0 guarantees about immutability of strings
=C2=A0 (Alain Frisch, review by Hezekiah M. Carty)

### Bug fixes:

* PR#6505: Missed Type-error leads to a segfault upon record access.
=C2=A0 (Jacques Garrigue, extra report by Stephen Dolan)
=C2=A0 Proper fix required a more restrictive approach to recursive types:<= br> =C2=A0 mutually recursive types are seen as abstract types (i.e. non-contra= ctive)
=C2=A0 when checking the well-foundedness of the recursion.

* PR#6752: Nominal types and scope escaping.
=C2=A0 Revert to strict scope for non-generalizable type variables, cf. Man= tis.
=C2=A0 Note that this is actually stricter than the behavior before 4.03, =C2=A0 cf. PR#7313, meaning that you may sometimes need to add type annotat= ions
=C2=A0 to explicitly instantiate non-generalizable type variables.
=C2=A0 (Jacques Garrigue, following discussion with Jeremy Yallop,
=C2=A0 =C2=A0Nicolas Ojeda Bar and Alain Frisch)

- PR#7112: Aliased arguments ignored for equality of module types
=C2=A0 (Jacques Garrigue, report by Leo White)

- PR#7134: compiler forcing aliases it shouldn't while reporting type e= rrors
=C2=A0 (Jacques Garrigue, report and suggestion by sliquister)

- PR#7153: document that Unix.SOCK_SEQPACKET is not really usable.

- PR#7165, GPR#494: uncaught exception on invalid lexer directive
=C2=A0 (Gabriel Scherer, report by KC Sivaramakrishnan using afl-fuzz)

- PR#7257, GPR#583: revert a 4.03 change of behavior on (Unix.sleep 0.),
=C2=A0 it now calls (nano)sleep for 0 seconds as in (< 4.03) versions. =C2=A0 (Hannes Mehnert, review by Damien Doligez)

- PR#7260: GADT + subtyping compile time crash
=C2=A0 (Jacques Garrigue, report by Nicolas Ojeda Bar)

- PR#7269: Segfault from conjunctive constraints in GADT
=C2=A0 (Jacques Garrigue, report by Stephen Dolan)

- PR#7276: Support more than FD_SETSIZE sockets in Windows' emulation =C2=A0 of select
=C2=A0 (David Scott, review by Alain Frisch)

* PR#7278: Prevent private inline records from being mutated
=C2=A0 (Alain Frisch, report by Pierre Chambart)

- PR#7284: Bug in mcomp_fields leads to segfault
=C2=A0 (Jacques Garrigue, report by Leo White)

- PR#7285: Relaxed value restriction broken with principal
=C2=A0 (Jacques Garrigue, report by Leo White)

- PR#7297: -strict-sequence turns off Warning 21
=C2=A0 (Jacques Garrigue, report by Valentin Gatien-Baron)

- PR#7299: remove access to OCaml heap inside blocking section in win32unix=
=C2=A0 (David Allsopp, report by Andreas Hauptmann)

- PR#7300: remove access to OCaml heap inside blocking in Unix.sleep on Win= dows
=C2=A0 (David Allsopp)

- PR#7305: -principal causes loop in type checker when compiling
=C2=A0 (Jacques Garrigue, report by Anil Madhavapeddy, analysis by Leo Whit= e)

- PR#7330: Missing exhaustivity check for extensible variant
=C2=A0 (Jacques Garrigue, report by Elarnon *)

- PR#7374: Contractiveness check unsound with constraints
=C2=A0 (Jacques Garrigue, report by Leo White)

- PR#7378: GADT constructors can be re-exposed with an incompatible type
=C2=A0 (Jacques Garrigue, report by Alain Frisch)

- PR#7389: Unsoundness in GADT exhaustiveness with existential variables
=C2=A0 (Jacques Garrigue, report by Stephen Dolan)

* GPR#533: Thread library: fixed [Thread.wait_signal] so that it
=C2=A0 converts back the signal number returned by [sigwait] to an
=C2=A0 OS-independent number
=C2=A0 (J=C3=A9r=C3=A9mie Dimino)

- GPR#600: (similar to GPR#555) ensure that register typing constraints are=
=C2=A0 respected at N-way join points in the control flow graph
=C2=A0 (Mark Shinwell)

- GPR#672: Fix float_of_hex parser to correctly reject some invalid forms =C2=A0 (Bogdan T=C4=83t=C4=83roiu, review by Thomas Braibant and Alain Fris= ch)

- GPR#700: Fix maximum weak bucket size
=C2=A0 (Nicolas Ojeda Bar, review by Fran=C3=A7ois Bobot)

- GPR#708 Allow more module aliases in strengthening (Leo White)

- GPR#713, PR#7301: Fix wrong code generation involving lazy values in Flam= bda
=C2=A0 mode
=C2=A0 (Mark Shinwell, review by Pierre Chambart and Alain Frisch)

- GPR#721: Fix infinite loop in flambda due to [@@specialise] annotations
- GPR#779: Building native runtime on Windows could fail when bootstrapping=
=C2=A0 FlexDLL if there was also a system-installed flexlink
=C2=A0 (David Allsopp, report Michael Soegtrop)

- GPR#805, GPR#815, GPR#833: check for integer overflow in String.concat
=C2=A0 (Jeremy Yallop,
=C2=A0 =C2=A0review by Damien Doligez, Alain Frisch, Daniel B=C3=BCnzli, Fa= brice Le Fessant)

- GPR#810: check for integer overflow in Array.concat
=C2=A0 (Jeremy Yallop)

- GPR#814: fix the Buffer.add_substring bounds check to handle overflow
=C2=A0 (Jeremy Yallop)

- GPR#880: Fix [@@inline] with default parameters in flambda (Leo White)

- GPR#525: fix build on OpenIndiana
=C2=A0 (Sergey Avseyev, review by Damien Doligez)

### Internal/compiler-libs changes:

- PR#7200, GPR#539: Improve, fix, and add test for parsing/pprintast.ml
=C2=A0 (Runhang Li, David Sheets, Alain Frisch)

- GPR#351: make driver/pparse.ml functions type-safe
=C2=A0 (Gabriel Scherer, Dmitrii Kosarev, review by J=C3=A9r=C3=A9mie Dimin= o)

- GPR#516: Improve Texp_record constructor representation, and
=C2=A0 propagate updated record type information
=C2=A0 (Pierre Chambart, review by Alain Frisch)

- GPR#678: Graphics.close_graph crashes 64-bit Windows ports (re-implementa= tion
=C2=A0 of PR#3963)
=C2=A0 (David Allsopp)

- GPR#679: delay registration of docstring after the mapper is applied
=C2=A0 (Hugo Heuzard, review by Leo White)

- GPR#872: don't attach (**/**) comments to any particular node
=C2=A0 (Thomas Refis, review by Leo White)


--94eb2c1a0770119ffd05407d2f0f--