Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of June 09 to 16, 2015.

  1. Release candidate: 4.02.2+rc1
  2. Other OCaml News

Release candidate: 4.02.2+rc1


Damien Doligez announced:
Dear OCaml users,

The release of OCaml version 4.02.2 is imminent.  We have
created a release candidate for your testing pleasure. It is very
easy to install and test with opam, just type:
    opam update
    opam switch 4.02.2+rc1

We want to know about any show-stopping bugs, especially in the
compilation and installation phases.

This release candidate is also available as source code at this
address: < >

Happy hacking,

-- Damien Doligez for the OCaml team.

OCaml 4.02.2:

(Changes that can break existing programs are marked with a "*")

Language features:
- PR#6583: add a new class of binary operators with the same syntactic
  precedence as method calls; these operators start with # followed
  by a non-empty sequence of operator symbols (for instance #+, #!?).
  It is also possible to use '#' as part of these extra symbols
  (for instance ##, or #+#); this is rejected by the type-checker,
  but can be used e.g. by ppx rewriters.
  (Alain Frisch, request by Gabriel Radanne)
* PR#6016: add a "nonrec" keyword for type declarations
  (Jérémie Dimino)

- PR#6600: make -short-paths faster by building the printing map
  (Jacques Garrigue)
- PR#6642: replace $CAMLORIGIN in -ccopt with the path to cma or cmxa
  (Peter Zotov, Gabriel Scherer, review by Damien Doligez)
- PR#6797: new option -output-complete-obj
  to output an object file with included runtime and autolink libraries
  (Peter Zotov)
- PR#6845: -no-check-prims to tell ocamlc not to check primitives in runtime
  (Alain Frisch)
- GPR#149: Attach documentation comments to parse tree
  (Leo White)
- GPR#159: Better locations for structure/signature items
  (Leo White)

Toplevel and debugger:
- PR#5958: generalized polymorphic #install_printer
  (Pierre Chambart and Grégoire Henry)

- PR#6237: explicit "infer" tag to control or disable menhir --infer
  (Hugo Heuzard)
- PR#6625: pass -linkpkg to files built with -output-obj.
  (Peter Zotov)
- PR#6702: explicit "linkpkg" and "dontlink(foo)" flags
  (Peter Zotov, Gabriel Scherer)
- PR#6712: Ignore common VCS directories
  (Peter Zotov)
- PR#6720: pass -g to C compilers when tag 'debug' is set
  (Peter Zotov, Gabriel Scherer)
- PR#6733: add and targets to pass
  -output-obj -cclib -shared.
  (Peter Zotov)
- PR#6733: "runtime_variant(X)" to pass -runtime-variant X option.
  (Peter Zotov)
- PR#6774: new menhir-specific flags "only_tokens" and "external_tokens(Foo)"
  (François Pottier)

- PR#6285: Add support for nanosecond precision in Unix.stat()
  (Jérémie Dimino, report by user 'gfxmonk')
- PR#6781: Add higher baud rates to Unix termios
  (Damien Doligez, report by Berke Durak)
- PR#6834: Add Obj.{first,last}_non_constant_constructor_tag
  (Mark Shinwell, request by Gabriel Scherer)

- PR#6078: Release the runtime system when calling caml_dlopen
  (Jérémie Dimino)
- PR#6675: GC hooks
  (Damien Doligez and Roshan James)

Build system:
- PR#5418 (comments) : generate dependencies with $(CC) instead of gcc
  (Damien Doligez and Michael Grünewald)
- PR#6266: Cross compilation for iOs, Android etc
  (Peter Zotov, review by Damien Doligez and Mark Shinwell)

Installation procedure:
- Update instructions for x86-64 PIC mode and POWER architecture builds
  (Mark Shinwell)

Bug fixes:
- PR#5271: Location.prerr_warning is hard-coded to use Format.err_formatter
  (Damien Doligez, report by Rolf Rolles)
- PR#5395: OCamlbuild mishandles relative symlinks and include paths
  (Damien Doligez, report by Didier Le Botlan)
- PR#5822: wrong value of Options.ext_dll on windows
  (Damien Doligez and Daniel Weil)
- PR#5836, PR#6684: printing lazy values in ocamldebug may segfault
  (Gabriel Scherer, request by the Coq team)
- PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid
  header name clashes
  (Jérôme Vouillon and Adrien Nader and Peter Zotov)
- PR#6281: Graphics window does not acknowledge second click (double click)
  (Kyle Headley)
- PR#6490: incorrect backtraces in gdb on AArch64.  Also fixes incorrect
  backtraces on 32-bit ARM.
  (Mark Shinwell)
- PR#6573: extern "C" for systhreads/threads.h
  (Mickaël Delahaye)
- PR#6575: Array.init evaluates callback although it should not do so
  (Alain Frisch, report by Gerd Stolpmann)
- PR#6607: The manual doesn't mention 0x200 flag for OCAMLRUNPARAM=v
  (Alain Frisch)
- PR#6616: allow meaningful use of -use-runtime without -custom.
  (Peter Zotov)
- PR#6617: allow android build with pthreads support (since SDK r10c)
  (Peter Zotov)
- PR#6626: ocamlbuild on cygwin cannot find ocamlfind
  (Gergely Szilvasy)
- PR#6628: Configure script rejects legitimate arguments
  (Michael Grünewald, Damien Doligez)
- PR#6630: Failure of tests/prim-bigstring/{big,} on big-endian
  (Pierre Chambart, testing by Mark Shinwell)
- PR#6640: ocamlbuild: wrong "unused tag" warning on "precious"
  (report by user 'william')
- PR#6652: ocamlbuild -clean does not print a newline after output
  (Damien Doligez, report by Andi McClure)
- PR#6658: cross-compiler: version check not working on OS X
  (Gerd Stolpmann)
- PR#6665: Failure of tests/asmcomp on sparc
  (Stéphane Glondu)
- PR#6667: wrong implementation of %bswap16 on ARM64
  (Xavier Leroy)
- PR#6669: fix 4.02 regression in toplevel printing of lazy values
  (Leo White, review by Gabriel Scherer)
- PR#6671: Windows: environment variable 'TZ' affects Unix.gettimeofday
  (Mickael Delahaye and Damien Doligez)
- PR#6680: Missing parentheses in warning about polymorphic variant value
  (Jacques Garrigue and Gabriel Scherer, report by Philippe Veber)
- PR#6686: Bug in [subst_boxed_number]
  (Jérémie Dimino, Mark Shinwell)
- PR#6690: Uncaught exception (Not_found) with (wrong) wildcard or unification
  type variable in place of a local abstract type
  (Jacques Garrigue, report by Mikhail Mandrykin)
- PR#6693 (part two): Incorrect relocation types in x86-64 runtime system
  (Peter Zotov, review by Jacques-Henri Jourdan, Xavier Leroy and Mark Shinwell)
- PR#6717: Pprintast does not print let-pattern attributes
  (Gabriel Scherer, report by Peter Zotov)
- PR#6727: Printf.sprintf "%F" misbehavior
  (Benoît Vaugon, report by Vassili Karpov)
- PR#6747: ocamlobjinfo: missing symbol caml_plugin_header due to underscore
  (Damien Doligez, Maverick Woo)
- PR#6749: ocamlopt returns n for (n mod 1) instead of 0
  (Mark Shinwell and Jérémie Dimino)
- PR#6753: Num.quo_num and Num.mod_num incorrect for some negative arguments
  (Xavier Leroy)
- PR#6758: Ocamldoc "analyse_module: parsetree and typedtree don't match"
  (Damien Doligez, report by user 'maro')
- PR#6759: big_int_of_string incorrectly parses some hexa literals
  (Damien Doligez, report by Pierre-yves Strub)
- PR#6763: #show with -short-paths doesn't select shortest type paths
  (Jacques Garrigue, report by David Sheets)
- PR#6768: Typechecker overflow the stack on cyclic type
  (Jacques Garrigue, report by user 'darktenaibre')
- PR#6772: asmrun/signals_asm.c doesn't compile on NetBSD/i386
  (Kenji Tokudome)
- PR#6775: Digest.file leaks file descriptor on error
  (Valentin Gatien-Baron)
- PR#6779: Cross-compilers cannot link bytecode using custom primitives
  (Damien Doligez, request by Peter Zotov)
- PR#6787: Soundness bug with polymorphic variants
  (Jacques Garrigue, with help from Leo White and Grégoire Henry,
   report by Michael O'Connor)
- PR#6790: otherlibs should be built with -g
  (Damien Doligez, report by Peter Zotov)
- PR#6791: "%s@[", "%s@{" regression in Scanf
  (Benoît Vaugon)
- PR#6793: ocamlbuild passes nonsensical "-ocamlc ..." commands to menhir
  (Gabriel Scherer, report by Damien Doligez)
- PR#6799: include guards missing for unixsupport.h and other files
  (Andreas Hauptmann)
- PR#6810: Improve documentation of Bigarray.Genarray.map_file
  (Mark Shinwell and Daniel Bünzli)
- PR#6812: -short-paths and -no-alias-deps can create inconsistent assumptions
  (Jacques Garrigue, report by Valentin Gatien-Baron)
- PR#6817: GADT exhaustiveness breakage with modules
  (Leo White, report by Pierre Chambart)
- PR#6824: fix buffer sharing on partial application of Format.asprintf
  (Gabriel Scherer, report by Alain Frisch)
- PR#6831: Build breaks for -aspp gcc on solaris-like OSs
  (John Tibble)
- PR#6836: Assertion failure using -short-paths
  (Jacques Garrigue, report by David Sheets)
- PR#6837: Build profiling libraries on FreeBSD and NetBSD x86-64
  (Mark Shinwell, report by Michael Grünewald)
- PR#6841: Changing compilation unit name with -o breaks ocamldebug
  (Jacques Garrigue, report by Jordan Walke)
- PR#6843: record weak dependencies even when the .cmi is missing
  (Leo White, Gabriel Scherer)
- PR#6849: Inverted pattern unification error
  (Jacques Garrigue, report by Leo White)
- PR#6857: __MODULE__ doesn't give the current module with -o
  (Jacques Garrigue, report by Valentin Gatien-Baron)
- PR#6862: Exhaustiveness check wrong for class constructor arguments
  (Jacques Garrigue)
- PR#6869: Improve comment on [Hashtbl.hash_param]
  (Mark Shinwell, report by Jun Furuse)
- PR#6870: Unsoundness when -rectypes fails to detect non-contractive type
  (Jacques Garrigue, report by Stephen Dolan)
- PR#6872: Type-directed propagation fails to disambiguate variants
  that are also exception constructors
  (Jacques Garrigue, report by Romain Beauxis)
- PR#6878: AArch64 backend generates invalid asm: conditional branch
  out of range (Mark Shinwell, report by Richard Jones, testing by Richard
  Jones and Xavier Leroy, code review by Xavier Leroy and Thomas Refis)
- PR#6879: Wrong optimization of 1 mod n
  (Mark Shinwell, report by Jean-Christophe Filliâtre)
- PR#6884: The __CYGWIN32__ #define should be replaced with __CYGWIN__
  (Adrien Nader)
- PR#6886: -no-alias-deps allows to build self-referential compilation units
  (Jacques Garrigue, report by Valentin Gatien-Baron)
- PR#6889: ast_mapper fails to rewrite class attributes
  (Sébastien Briais)
- PR#6893: ocamlbuild:  "tag not used" warning when using (p)dep
  (Gabriel Scherer, report by Christiano Haesbaert)
- GPR#143: fix getsockopt behaviour for boolean socket options
  (Anil Madhavapeddy and Andrew Ray)
- GPR#190: typo in pervasives
  (Guillaume Bury)
- Misplaced assertion in major_gc.c for no-naked-pointers mode
  (Stephen Dolan, Mark Shinwell)

Feature wishes:
- PR#6452, GPR#140: add internal suport for custom printing formats
  (Jérémie Dimino)
- PR#6641: add -g, -ocamlcflags, -ocamloptflags options to ocamlmklib
  (Peter Zotov)
- PR#6693: also build and lib{asm,caml}run_pic.a
  (Peter Zotov, review by Mark Shinwell)
- PR#6842: export Typemod.modtype_of_package
  (Jacques Garrigue, request by Jun Furuse)
- GPR#139: more versatile specification of locations of .annot
  (Christophe Troestler, review by Damien Doligez)
- GPR#157: store the path of cmos inside debug section at link time
  (Hugo Heuzard, review by Damien Doligez)
- GPR#191: Making gc.h and some part of memory.h public
  (Thomas Refis)

Other OCaml News

From the ocamlcore planet blog:
Thanks to Alp Mestan, we now include in the OCaml Weekly News the links to the
recent posts from the ocamlcore planet blog at

Aesthetic Integration joins the Caml Consortium:

Spam problem, lot of mails cannot be sent:

Third alpha version:

Run length encoding data compression method:

Signing the OPAM repository:

Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.

Alan Schmitt