caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] Batteries 2.5.0, compatible with OCaml 4.03
@ 2016-05-12 14:41 Gabriel Scherer
  2016-05-13  7:53 ` Christoph Höger
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel Scherer @ 2016-05-12 14:41 UTC (permalink / raw)
  To: caml users

## Batteries

Batteries Included is a community-maintained standard library
extension, with a focus on stability and compatibility. Bug reports,
pull requests and other contributions are warmly welcome, see the
project page at
  https://github.com/ocaml-batteries-team/batteries-included/

The library's API documentation at:
  http://ocaml-batteries-team.github.io/batteries-included/hdoc2/

Batteries 2.5.0 is a minor release, coming shortly after 2.4.0
released in December 2015. The main change in 2.5.0 is that it is
compatible with the newly released OCaml 4.03.

Note that, as usual for Batteries release, Batteries 2.5.0 is
compatible with older OCaml releases as well, and provides back-ported
versions of most standard library functions made available in 4.03
only. For example, BatString.uppercase_ascii is usable under all OCaml
versions.

If the documentation of a Batteries function says
  @since 2.5.0
then it is available under all supported OCaml versions (3.12.1 and
up). If it says
  @since 2.5.0 and OCaml 4.03.0
then it is only available under OCaml 4.03.0.

Many thanks to the contributors for this release, Cedric Cellier,
Pieter Goetschalckx KC Sivaramakrishnan, Gabriel Scherer, and Thibault
Suzanne.

## Detailed Changelog

- BatTuple: add Tuple{N}.make : 'a1 -> ... -> 'an -> 'a1 * ... * 'an
  #657
  (Thibault Suzanne)
- BatBig_int: fix sequence operators (--), (---) to avoid polymorphic comparison
  #674, #675, #676
  (Pieter Goetschalckx and Cedric Cellier)
- Extend all Batteries module to cover OCaml 4.03 features
  #670
  (Gabriel Scherer, KC Sivaramakrishnan)

## Future plans

OCaml 4.03 introduced a type `('a, 'b) result` contributed by Yaron
Minsky, meant to serve as common denominator between the various
libraries relying on some kind of sum/either type.

    type ('a,'b) result = Ok of 'a | Error of 'b

Batteries has long had its own `result` type, which unfortunately uses
a different name for the second constructor:

    type ('a, 'b) result = Ok  of 'a | Bad of 'b

Unfortunately, this means that the two types are incompatible (see
PR#7102 for a feature request on renaming variant
constructors). Batteries 2.5.0 is compatible with previous Batteries
versions, and keeps using Batteries' result type.

Of course, the right long-term move for Batteries is to drop its own
result type and use the standard result type instead. But this means
a breaking change for our users as well. We plan to make a major
release 3.0 in the following months, that integrates this breaking
changes and some other incompatible interface changes that were
proposed over the 2.x lifetime.

Happy hacking!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] [ANN] Batteries 2.5.0, compatible with OCaml 4.03
  2016-05-12 14:41 [Caml-list] [ANN] Batteries 2.5.0, compatible with OCaml 4.03 Gabriel Scherer
@ 2016-05-13  7:53 ` Christoph Höger
  2016-05-13  8:59   ` Matej Kosik
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Höger @ 2016-05-13  7:53 UTC (permalink / raw)
  To: caml-list

Unfortunately, I am unable to use some modules:

consider the following simple test:

% cat foo.ml
let () = Printf.printf "%s\n" Batteries.Sys.os_type
% ocamlbuild -pkg batteries foo.native
...
File "_none_", line 1:
Error: No implementations provided for the following modules:
         BatConcreteQueue_402 referenced from
[..]/opam/4.02.3/lib/batteries/batteries.cmxa(BatQueue)
         BatOpaqueInnerSys referenced from
[..]/opam/4.02.3/lib/batteries/batteries.cmxa(BatSys)
Command exited with code 2.

This is opam 1.2.2, OCaml 4.02.3 and batteries 2.5.0

Did I break something or is this an actual bug?

Am 12.05.2016 um 16:41 schrieb Gabriel Scherer:
> ## Batteries
> 
> Batteries Included is a community-maintained standard library
> extension, with a focus on stability and compatibility. Bug reports,
> pull requests and other contributions are warmly welcome, see the
> project page at
>   https://github.com/ocaml-batteries-team/batteries-included/
> 
> The library's API documentation at:
>   http://ocaml-batteries-team.github.io/batteries-included/hdoc2/
> 
> Batteries 2.5.0 is a minor release, coming shortly after 2.4.0
> released in December 2015. The main change in 2.5.0 is that it is
> compatible with the newly released OCaml 4.03.
> 
> Note that, as usual for Batteries release, Batteries 2.5.0 is
> compatible with older OCaml releases as well, and provides back-ported
> versions of most standard library functions made available in 4.03
> only. For example, BatString.uppercase_ascii is usable under all OCaml
> versions.
> 
> If the documentation of a Batteries function says
>   @since 2.5.0
> then it is available under all supported OCaml versions (3.12.1 and
> up). If it says
>   @since 2.5.0 and OCaml 4.03.0
> then it is only available under OCaml 4.03.0.
> 
> Many thanks to the contributors for this release, Cedric Cellier,
> Pieter Goetschalckx KC Sivaramakrishnan, Gabriel Scherer, and Thibault
> Suzanne.
> 
> ## Detailed Changelog
> 
> - BatTuple: add Tuple{N}.make : 'a1 -> ... -> 'an -> 'a1 * ... * 'an
>   #657
>   (Thibault Suzanne)
> - BatBig_int: fix sequence operators (--), (---) to avoid polymorphic comparison
>   #674, #675, #676
>   (Pieter Goetschalckx and Cedric Cellier)
> - Extend all Batteries module to cover OCaml 4.03 features
>   #670
>   (Gabriel Scherer, KC Sivaramakrishnan)
> 
> ## Future plans
> 
> OCaml 4.03 introduced a type `('a, 'b) result` contributed by Yaron
> Minsky, meant to serve as common denominator between the various
> libraries relying on some kind of sum/either type.
> 
>     type ('a,'b) result = Ok of 'a | Error of 'b
> 
> Batteries has long had its own `result` type, which unfortunately uses
> a different name for the second constructor:
> 
>     type ('a, 'b) result = Ok  of 'a | Bad of 'b
> 
> Unfortunately, this means that the two types are incompatible (see
> PR#7102 for a feature request on renaming variant
> constructors). Batteries 2.5.0 is compatible with previous Batteries
> versions, and keeps using Batteries' result type.
> 
> Of course, the right long-term move for Batteries is to drop its own
> result type and use the standard result type instead. But this means
> a breaking change for our users as well. We plan to make a major
> release 3.0 in the following months, that integrates this breaking
> changes and some other incompatible interface changes that were
> proposed over the 2.x lifetime.
> 
> Happy hacking!
> 


-- 
Christoph Höger

Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen

Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin

Tel.: +49 (30) 314-24890
E-Mail: christoph.hoeger@tu-berlin.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] [ANN] Batteries 2.5.0, compatible with OCaml 4.03
  2016-05-13  7:53 ` Christoph Höger
@ 2016-05-13  8:59   ` Matej Kosik
  2016-05-13 11:56     ` Gabriel Scherer
  0 siblings, 1 reply; 4+ messages in thread
From: Matej Kosik @ 2016-05-13  8:59 UTC (permalink / raw)
  To: caml-list

Hi,

On 05/13/2016 09:53 AM, Christoph Höger wrote:
> Unfortunately, I am unable to use some modules:
> 
> consider the following simple test:
> 
> % cat foo.ml
> let () = Printf.printf "%s\n" Batteries.Sys.os_type
> % ocamlbuild -pkg batteries foo.native
> ...
> File "_none_", line 1:
> Error: No implementations provided for the following modules:
>          BatConcreteQueue_402 referenced from
> [..]/opam/4.02.3/lib/batteries/batteries.cmxa(BatQueue)
>          BatOpaqueInnerSys referenced from
> [..]/opam/4.02.3/lib/batteries/batteries.cmxa(BatSys)
> Command exited with code 2.
> 
> This is opam 1.2.2, OCaml 4.02.3 and batteries 2.5.0
> 
> Did I break something or is this an actual bug?

In my context, after switching to 4.02.3, I noticed the same problem.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] [ANN] Batteries 2.5.0, compatible with OCaml 4.03
  2016-05-13  8:59   ` Matej Kosik
@ 2016-05-13 11:56     ` Gabriel Scherer
  0 siblings, 0 replies; 4+ messages in thread
From: Gabriel Scherer @ 2016-05-13 11:56 UTC (permalink / raw)
  To: Matej Kosik; +Cc: caml users

There is indeed a packaging problem with 2.5.0 -- I did two quick
bugfix releases in succession, and 2.5.2 should land in opam any time
now. Apologies for the hiccup.

On Fri, May 13, 2016 at 4:59 AM, Matej Kosik
<5764c029b688c1c0d24a2e97cd764f@gmail.com> wrote:
> Hi,
>
> On 05/13/2016 09:53 AM, Christoph Höger wrote:
>> Unfortunately, I am unable to use some modules:
>>
>> consider the following simple test:
>>
>> % cat foo.ml
>> let () = Printf.printf "%s\n" Batteries.Sys.os_type
>> % ocamlbuild -pkg batteries foo.native
>> ...
>> File "_none_", line 1:
>> Error: No implementations provided for the following modules:
>>          BatConcreteQueue_402 referenced from
>> [..]/opam/4.02.3/lib/batteries/batteries.cmxa(BatQueue)
>>          BatOpaqueInnerSys referenced from
>> [..]/opam/4.02.3/lib/batteries/batteries.cmxa(BatSys)
>> Command exited with code 2.
>>
>> This is opam 1.2.2, OCaml 4.02.3 and batteries 2.5.0
>>
>> Did I break something or is this an actual bug?
>
> In my context, after switching to 4.02.3, I noticed the same problem.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-13 11:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 14:41 [Caml-list] [ANN] Batteries 2.5.0, compatible with OCaml 4.03 Gabriel Scherer
2016-05-13  7:53 ` Christoph Höger
2016-05-13  8:59   ` Matej Kosik
2016-05-13 11:56     ` Gabriel Scherer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).