OCaml Changelog

RSS

Official stable release announcements and updates from the OCaml compiler, OCaml infrastructure and the OCaml Platform Tools.

See full changelog
  • Add a --null argument to suppress the output. This is used to write linters
  • Use the new generic ppx driver support of jbuilder

Utop 2.1.0

See full changelog
  • Add support for company-mode based completion in utop.el (#233)
See full changelog

Features

  • Wrap lines in string literals, comments and docstrings
  • Improve char escaping to ascii / uniform hexa / utf8 (#73)
  • Add support for Pexp_new expressions (#76, @smondet)
  • Add support for Pexp_send _ expressions (#72, @smondet)
  • Add options to format chars and break strings (#70, @smondet)
  • Formatting of %ext on if/while/for/match/try/; (#63, @hcarty)
  • Disable formatting with [@@@ocamlformat.disable] (#66, @hcarty)

Formatting improvements

  • Improve sequences under if-then-else with unnecessary but safer parens
  • Improve optional arguments with type constraints
  • Improve let-bound functions with type constraints
  • Improve newtype constraints in let-bindings
  • Improve placement of exception docstrings

Bug fixes

  • Fix missing break hint before comment on sugared []
  • Fix formatting of [%ext e1]; e2 (#75, @hcarty)
  • Fix missing parens around let exception, let module, for, while under apply
  • Fix missing parens under alias patterns
  • Fix placement of attributes on extension constructors
  • Fix missing parens around unpack patterns
  • Fix let-bindings with pattern constraints
  • Fix mutually recursive signatures
See full changelog

Features

  • Check fatal warnings not only in inplace mode

Documentation

  • Improve doc of --no-warn-error
  • Mention object language not implemented
  • Update documentation of --output

Bug fixes

  • Colon instead of arrow before type for GADT constructors with no arguments (@mbouaziz)
  • Fix some dropped comments attached to idents
  • Fix missing parens around Ppat_alias under Ppat_variant
  • Fix module type constraints on functors
  • Fix broken record field punning
  • Fix broken docstring attachment with multiple docstrings
  • Fix missing parens around application operators
  • Fix missing parens around Ppat_or under Ppat_variant
  • Fix missing/excess parens around Pexp_open under Pexp_apply/Pexp_construct
  • Fix duplicated attributes on Pexp_function
  • Fix missing parens around Ptyp_package under Pstr_type
  • Add '#' to the list of infix operator prefix (@octachron)
  • Do not add space between [ and < or > in variant types
  • Add a break hint before "constraint" in a type def (@hcarty)

Formatting improvements

  • Remove unnecessary parens around Pexp_tuple under Pexp_open
  • Improve single-case matches
  • Improve constructor arguments
  • Remove unnecessary parens around match, etc. with attributes
  • Fix missing parens around constraint arg of variant type
  • Fix missing parens on left arg of infix list constructor
  • Fix missing parens around arrow type args of variant constructors
  • Fix missing parens around type of constraints on module exps

Build and packaging

  • Separate Format patch into ocamlformat_support package
  • Fix test script
  • Unbreak build of ocamlformat_reason.ml (@mroch)
  • Improve opam installation (JacquesPa)
  • Install emacs support via opam package
See full changelog

Features

  • Output to stdout if output file omitted

Bug fixes

  • Fix Ppat_any value bindings
  • Fix missing parens around variant patterns in fun arg
  • Fix position of comments attached to end of sugared lists
  • Fix missing comments on module names
  • Fix package type constraints
  • Fix first-class module alias patterns
  • Fix first-class module patterns in let bindings
  • Fix missing parens around Ptyp_package under Psig_type
  • Fix missing "as" in Ptyp_alias formatting (@hcarty)
  • Fix let bindings with constraints under 4.06

Formatting improvements

  • Improve line breaking of or-patterns
  • Improve placement of comments within pattern matches
  • Improve clarity of aliased or-patterns with parens
  • Improve matches on aliased or-patterns
  • Improve infix applications in limbs of if-then-else
  • Improve final function arguments following other complex arguments
  • Improve consistency of paren spacing after Pexp_fun
  • Improve sugar for Pexp_let under Pexp_extension
  • Improve sugar for newtype
  • Improve first-class module expressions
  • Improve indentation when comments are sprinkled through types
  • Do not add open line after last binding in a structure

Build and packaging

  • Simplify build and packaging, and adopt some common practices
  • Add Warnings.Errors argument for < 4.06 compatibility (@hcarty)
  • Update base to v0.10.0 (@hcarty)

Odoc 1.2.0

See full changelog
  • Support for standalone documentation pages (.mld files) (#61).
  • Display [@@deprecated] attributes as the @deprecated tag (#57).
  • Allow each component of OCaml paths to be disambiguated using the kind-identifer syntax (part of #61).
  • Support OCaml 4.06.
  • Fix spurious leading blank lines in verbatim text (ocaml-doc/octavius#6).

Add support for 4.06. Use Leo White's short-path for 4.05. Various bug fixes (in locate, in emacs serialization).

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

The major change Windows support is contributed by David Allsopp.

Other changes are a bunch of fixes:

  • compilation on FreeBSD contributed by Malcolm Matalka
  • improvement to emacs mode contributed by Olivier Andrieu, Christophe Troestler and Steve Purcell
  • improvement to vim mode by Fabian Hemmer and Gregory Nisbet
  • fixes to ppx invocation by Keigo Imai
  • fixes to Merlin s-expr dialect to bring UTF-8 compatibility with Emacs (WIP)
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Bug fix after 3.0.1:

  • CMT magic number for 4.05 was wrong
  • handle merlin.focus, merlin.ignore, merlin.loc/merlin.relaxed-loc and merlin.syntax-error
  • missing include preventing build on some platforms contributed by Bernhard Schommer
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Bug fix release after 3.0.0 major release.

  • portability fixes by David Allsop in configure script and vim mode (tough Windows support is not ready yet)
  • preliminary support for findlib toolchains with FINDLIB_TOOLCHAIN .merlin directive
  • make ocamlmerlin.c frontend more portable
  • various fixes to the frontend
See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

The major change is a new protocol that moves process management inside Merlin codebase, saving a lot of pain in Emacs and Vim. There are not much new user facing features.

Windows support is not yet available.

In editor configuration is now done with merlin-flags, merlin-extensions and merlin-use in Emacs and :MerlinFlags, :MerlinExtensions and :MerlinPackages in Vim. In previous versions, enabled extensions, flags and packages were retained while now only the last command is remembered.

"M-x merlin-use a", "M-x merlin-use b" should be replaced by "M-x merlin-use a,b". ":MerlinUse a", ":MerlinUse b" should be replaced by ":MerlinUse a b".

The old protocol is still supported, so existing editor modes should not be affected (tested with Atom, Visual Studio and Sublime-text).

Other main changes:

  • Support for OCaml 4.05 was added
  • Merlin uses a new implementation of short-path by Leo White which addresses performance problems
  • Merlin now works with the upstream version of Menhir
  • numerous cleanup and refactoring to decrease the amount of changes to upstream typechecker
  • emacs-imenu feature was contributed by tddsg. It is similar the "outline" feature in vim for navigating in a buffer.

Thanks to the many contributors (Jochen Bartl, tddsg, Ximin Luo, Jason Staten, Leo White, Leandro Ostera, Jacob Bass, Xavier Guérin, Yotam Barnoy, Jacques Pascal Deplaix, David Allsopp, ...).

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

See full changelog
  • Support .opam files
  • Add Travis CI tests
  • Support the simultaneous publication of multiple packages from the same repo

Odoc 1.1.1

See full changelog
  • make odoc more noisy when generating html for hidden units
  • changed html-deps subcommand behavior: it now expects to be given a directory, not a single odoc file.

Utop 2.0.1

See full changelog
  • Fix: restore the installation of utop.el (#210, Louis Gesbert)

Utop 2.0.0

See full changelog
  • Add -implicit-bindings option to automatically bind expressions to names _0, _1 and so on. For example, 3 + 4;; becomes let _0 = 3 + 4;; (#161, #193, Fabian Hemmer)
  • Add tab completion for #mod_use (#181, Leonid Rozenberg)
  • Mention #help in #utop_help (#190, Fabian Hemmer)
  • Add #utop_stash and #utop_save to save the session to a file (#169, #199, Christopher Mcalpine and Fabian Hemmer)
  • Add support for reason in the emacs mode (#206, Andrea Richiardi)
  • Fix a bug where utop wouldn't apply ppx rewriters when running in emacs (Bug report: #192, fix: #202, Deokhwan Kim)
  • Refactor the use of hooks to support the various OCaml emacs mode (#201, Andrea Richiardi)
  • Drop support for camlp4/camlp5
  • Drop support for OCaml <= 4.01
  • Switch the build system to jbuilder
  • Resurect UTop_main.interact
See full changelog
  • Driver: add --as-pp and --embed-errors flags.

    --embed-errors causes the driver to embed exceptions raised by rewriters as extension points in the Ast

    --as-pp is a shorthand for: --dump-ast --embed-errors

  • Expose more primitives for embedding the driver.

  • Fix bug where reset_args functions where not being called.

  • Fix "OCaml OCaml" in error messages (contributed by Adrien Guatto).

See full changelog
  • Fix findlib predicates:
    • replace omp_driver by ppx_driver
    • replace -custom_ppx by -custom_ppx,-ppx_driver
See full changelog
  • fixes some cases of comments
  • supports new cases of ppx
  • fixed cases of unstable indentation within records
  • supports local excemtions
  • fixed handling of polymorphic methods
  • uses cmdliner 1.0.0

opam-lib 1.3

The package for opam-lib version 1.3 has just been released in the official opam repository. There is no release of opam with version 1.3, but this is an intermediate version of the library that retains compatibility of the file formats with 1.2.2.

The purpose of this release is twofold:

  • provide some fixes and enhancements over opam-lib 1.2.2. For example, 1.3 has an enhanced lint function
  • be a step towards migration to opam-lib 2.0.

This version is compatible with the current stable release of opam (1.2.2), but dependencies have been updated so that you are not (e.g.) stuck on an old version of ocamlgraph.

Therefore, I encourage all maintainers of tools based on opam-lib to migrate to 1.3.

The respective APIs are available in HTML for 1.2 and 1.3.

A note on plugins: when you write opam-related tools, remember that by setting flags: plugin in their definition and installing a binary named opam-toolname, you will enable the users to install package toolname and run your tool with a single opam toolname command.

Architectural changes

If you need to migrate from 1.2 to 1.3, these tips may help:

  • there are now 6 different ocamlfind sub-libraries instead of just 4: format contains the handlers for opam types and file formats, has been split out from the core library, while state handles the state of a given opam root and switch and has been split from the client library.

  • OpamMisc is gone and moved into the better organised OpamStd, with submodules for String, List, etc.

  • OpamGlobals is gone too, and its contents have been moved to:

    • OpamConsole for the printing, logging, and shell interface handling part
    • OpamXxxConfig modules for each of the libraries for handling the global configuration variables. You should call the respective init functions, with the options you want to set, for proper initialisation of the lib options (and handling the OPAMXXX environment variables)
  • OpamPath.Repository is now OpamRepositoryPath, and part of the repository sub-library.

opam-lib 2.0 ?

The development version of the opam-lib (2.0~alpha5 as of writing) is already available on opam. The name has been changed to provide a finer granularity, so it can actually be installed concurrently -- but be careful not to confuse the ocamlfind package names (opam-lib.format for 1.3 vs opam-format for 2.0).

The provided packages are:

  • opam-file-format: now separated from the opam source tree, this has no dependencies and can be used to parse and print the raw opam syntax.
  • opam-core: the basic toolbox used by opam, which actually doesn't include the opam specific part. Includes a tiny extra stdlib, the engine for running a graph of processes in parallel, some system handling functions, etc. Depends on ocamlgraph and re only.
  • opam-format: defines opam data types and their file i/o functions. Depends just on the two above.
  • opam-solver: opam's interface with the dose3 library and external solvers.
  • opam-repository: fetching repositories and package sources from all handled remote types.
  • opam-state: handling of the opam states, at the global, repository and switch levels.
  • opam-client: the client library, providing the top-level operations (installing packages...), and CLI.
  • opam-devel: this packages the development version of the opam tool itself, for bootstrapping. You can install it safely as it doesn't install the new opam in the PATH.

The new API can be also be browsed ; please get in touch if you have trouble migrating.

This release mainly brings support for OCaml 4.04. Internal code was simplified and bugs were fixed in the meantime (cache invalidation, ast traversal, type error recovery, certain cases of completion, ppx working directory, locate, ...).

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Bug fix release before major version.

See full changelog
  • reintroduce lazy substitution to fix performance issue
  • add "FINDLIB_PATH" directive to .merlin (contributed by Gerd Stolpmann)
  • relax arity checks on externals (harmless, requested by Hongbo Zang)
  • handle case insensitivity of OS X (fix longstanding bug)
  • fix build under Cygwin
  • minor cleanup, portability and usability improvements in build system and editor modes
See full changelog
  • fixes on nested try-with and some cases of comments
  • better alignment of stand-alone semicolons in records
  • improved emacs and vim scripts
  • better indentation within extension blocks
See full changelog
  • frontend:
    • now all commands can take a context, this reduce the amount of state in the command interpreter. Long term goal is to make protocol stateless
    • merlin now supports customizable "readers": processes responsible for parsing and pretty-printing. Main use-case is Reason, cppo/optcomp support might be added later
  • backend:
    • drop support for 4.00 / 4.01
    • support for 4.03 has been added
    • new implementation of type recovery, should diverge less from upstream
    • support for 4.02 was reimplemented to use the same design
    • menhir's fork has been synchronized with upstream, recovery algorithm is completely new
  • vim: add support for python3, update to new protocol
  • emacs: update to new protocol, bug fixes

Utop 1.19

See full changelog
  • allow to configure the external editor with UTop.set_external_editor
  • add UTop.set_margin_function to allow users to set the margin for the toplevel outcome. It is 80 by default
  • better for quoted strings ({|...|})
  • add a #pwd directive
  • experimental support for running utop in the middle of a program with UTop_main.interact
  • fix Async integration (automatic waiting of _ Deferred.t value). The new version is more robust against future change in Async
  • fix use of the non-existing replace-in-string function in the emacs mode (Syohei Yoshida)
  • fallback to Latin-1 for invalid UTF-8 sequences in the compiler output
See full changelog
  • backend:

    • improve support for module aliases in completion, locate and short-path
    • change management of flags
    • Cuillère ou Dorade
    • fix grammar for 4.02.3, support attributes on core_types
  • emacs & vim: minor fixes

This release also contains contributions from: Rudi Grinberg, Fourchaux, Christopher Reichert, David Allsopp, Nick Borden, Mario Rodas, @Twinside, Pierre Chambart, Philipp Haselwarter, Tomasz Kołodziejski and Syohei Yoshida.

See full changelog
  • backend:

    • locate: fix assert failure on first class modules inclusion
    • outline: add support for classes and object types
    • nonrec: enable by default for OCaml >= 4.02.2
    • error reporting: less aggressive filtering on ghost locs
    • finer-grained tracking of usage (values, opened modules, etc)
    • significant improvement in the handling of PPX extensions:
      • fix shell commandline and working directory
      • normalize parsetree locations
      • implement caching of intermediate rewriting
    • merged support for MetaOCaml
    • path to the standard library can now be specified with STDLIB command in .merlin
    • BrowseT: split into Browse_node (OCaml version specific) and Merlin_browse, extract recursion scheme
    • add Jump command, contributed by Tomasz KoÅ‚odziejski
    • contextual-commands: optionnally specify the context (file, project) in which each command is interpreted
    • better support for trunk
    • many bugfixes
  • documentation:

    • update ARCHITECTURE and PROTOCOL documentations
  • emacs:

    • make use of contextual-commands, non backward compatible protocol change
    • new merlin-set-flags command
    • split into multiple files
    • cleanup symbol namespaces:
      • merlin- for user targeted definitions
      • merlin-- for internal definitions,
      • merlin/ for API definitions
    • usability tweaks, notably on error display and navigation
    • general cleanup and bugfixes
  • vim:

    • expose custom .merlin loading through buffer variable
    • cleanup and bugfixes, notably process liveness check and restart
See full changelog
  • generic handling of ppx keywords
  • much improved vim binding
  • changed installation location of vim bindings (to share/ocp-indent/vim/indent) for easier autoload
  • don't increase indentation level for sequences of try..with
  • support for '[@'
  • restore back-alignment of '&&', '||' after 'if' and 'when'
  • support for extensible variant types
See full changelog
  • Add two-factor authentication support
  • Now requires github >= 1.0.0, opam-lib = 1.2.2
  • Use the finer lint results from opam-lib
  • Fix a terminal corruption bug from Ctrl-C at password prompt
  • Improve GitHub API error reporting
  • Fix GitHub token file permissions security vulnerability
  • Fix GitHub token errors for revoked or unknowable (since 2015/04/20) tokens
If you want to contribute to a new release announcement, check out the Contributing Guide on GitHub.