caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Objective Caml 3.09 released
@ 2005-10-27 14:24 Xavier Leroy
  2005-10-27 14:36 ` [Caml-list] " Damien Doligez
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Xavier Leroy @ 2005-10-27 14:24 UTC (permalink / raw)
  To: caml-list, caml-announce

It is my pleasure to announce the release of Objective Caml version 3.09.0,
the "Halloween" release.  Be very afraid :-)

Novelties in this release include:

- Introduction of private row types, for abstracting the row in object
  and variant types.  (See Jacques Garrigue's paper, " Private rows:
  abstracting the unnamed", available from
  http://www.math.nagoya-u.ac.jp/~garrigue/papers/).

- New warnings for variables locally bound and never used.

- A revised implementation of "ocamlopt -pack" that does not depend
  on GNU binutils and should work on all platforms supported by ocamlopt.
  The downside is that object files intended for later packing should
  be compiled with an appropriate "-for-pack" option.

Plus the usual assortment of corrections and small improvements listed
below.

The release can be found at http://caml.inria.fr/ocaml/release
and is currently available as source code and Windows binaries.
More binaries will be added in the coming weeks.

Enjoy,

- Xavier Leroy, for the OCaml development team

----------------------------------------------------------------------

Objective Caml 3.09.0:
----------------------

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

Language features:
- Introduction of private row types, for abstracting the row in object
  and variant types.

Type checking:
- Polymorphic variants with at most one constructor [< `A of t] are no
  longer systematically promoted to the exact type [`A of t]. This was
  more confusing than useful, and created problems with private row
  types.

Both compilers:
- Added warnings 'Y' and 'Z' for local variables that are bound but
  never used.
- Added warning for some uses non-returning functions (e.g. raise), when
they are
  passed extra arguments, or followed by extra statements.
- Pattern matching: more prudent compilation in case of guards; fixed PR#3780.
- Compilation of classes: reduction in size of generated code.
- Compilation of "module rec" definitions: fixed a bad interaction with
  structure coercion (to a more restrictive signature).

Native-code compiler (ocamlopt):
* Revised implementation of the -pack option (packing of several compilation
  units into one).  The .cmx files that are to be packed with
  "ocamlopt -pack -o P.cmx" must be compiled with "ocamlopt -for-pack P".
  In exchange for this additional constraint, ocamlopt -pack is now
  available on all platforms (no need for binutils).
* Fixed wrong evaluation order for arguments to certain inlined functions.
- Modified code generation for "let rec ... and ..." to reduce compilation
  time (which was quadratic in the number of mutually-recursive functions).
- x86 port: support tail-calls for functions with up to 21 arguments.
- AMD64 port, Linux: recover from system stack overflow.
- Sparc port: more portable handling of out-of-bound conditions
  on systems other than Solaris.

Standard library:
- Pervasives: faster implementation of close_in, close_out.
  set_binary_mode_{out,in} now working correctly under Cygwin.
- Printf: better handling of partial applications of the printf functions.
- Scanf: new function sscanf_format to read a format from a
  string. The type of the resulting format is dynamically checked and
  should be the type of the template format which is the second argument.
- Scanf: no more spurious lookahead attempt when the end of file condition
  is set and a correct token has already been read and could be returned.

Other libraries:
- System threads library: added Thread.sigmask; fixed race condition
  in signal handling.
- Bigarray library: fixed bug in Array3.of_array.
- Unix library: use canonical signal numbers in results of Unix.wait*;
  hardened Unix.establish_server against EINTR errors.

Run-time system:
- Support platforms where sizeof(void *) = 8 and sizeof(long) = 4.
- Improved and cleaned up implementation of signal handling.

Replay debugger:
- Improved handling of locations in source code.

OCamldoc:
- extensible {foo } syntax
- user can give .txt files on the command line, containing ocamldoc formatted
  text, to be able to include bigger texts out of source files
- -o option is now used by the html generator to indicate the prefix
  of generated index files (to avoid conflict when a Index module exists
  on case-insensitive file systems).

Miscellaneous:
- Configuration information is installed in `ocamlc -where`/Makefile.config
  and can be used by client Makefiles or shell scripts.


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

* Re: [Caml-list] Objective Caml 3.09 released
  2005-10-27 14:24 Objective Caml 3.09 released Xavier Leroy
@ 2005-10-27 14:36 ` Damien Doligez
  2005-10-27 15:40 ` skaller
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Damien Doligez @ 2005-10-27 14:36 UTC (permalink / raw)
  To: caml users

On Oct 27, 2005, at 16:24, Xavier Leroy wrote:

> Replay debugger:
> - Improved handling of locations in source code.

Please note that this entails an incompatible change to the  
ocamldebug-emacs
interface, so you will have to reinstall the emacs mode files when  
you switch
to 3.09.0.

-- Damien


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

* Re: [Caml-list] Objective Caml 3.09 released
  2005-10-27 14:24 Objective Caml 3.09 released Xavier Leroy
  2005-10-27 14:36 ` [Caml-list] " Damien Doligez
@ 2005-10-27 15:40 ` skaller
  2005-10-28  2:44 ` Eijiro Sumii
  2005-10-28  7:28 ` [Caml-list] " Aleksey Nogin
  3 siblings, 0 replies; 11+ messages in thread
From: skaller @ 2005-10-27 15:40 UTC (permalink / raw)
  To: Xavier Leroy; +Cc: caml-list, caml-announce

On Thu, 2005-10-27 at 16:24 +0200, Xavier Leroy wrote:
> It is my pleasure to announce the release of Objective Caml version 3.09.0,
> the "Halloween" release.  Be very afraid :-)

It's my please to report I built it without any problems,
and it recompiled my system without any problems.

Occasionally I get to say something about Ocaml that
Xavier can't disagree with ... and as an added bonus
now, I can do it and disagree with Xavier too :)

This is a fine piece of software. 

THANK YOU.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


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

* Re: [Caml-list] Objective Caml 3.09 released
  2005-10-27 14:24 Objective Caml 3.09 released Xavier Leroy
  2005-10-27 14:36 ` [Caml-list] " Damien Doligez
  2005-10-27 15:40 ` skaller
@ 2005-10-28  2:44 ` Eijiro Sumii
  2005-10-28  4:08   ` Aleksey Nogin
  2005-10-28  7:28 ` [Caml-list] " Aleksey Nogin
  3 siblings, 1 reply; 11+ messages in thread
From: Eijiro Sumii @ 2005-10-28  2:44 UTC (permalink / raw)
  To: caml-list

| It is my pleasure to announce the release of Objective Caml version 3.09.0,
| the "Halloween" release.  Be very afraid :-)

Thanks and congratulations!  (Thanks also for fixing the line number
problem in exception history reports.)

| - New warnings for variables locally bound and never used.

I suppose they do not include local variables bound by pattern
matching - is this correct?

        Eijiro

> cat > test.ml
let x = 3 in 5
> ocamlc test.ml -o /dev/null
File "test.ml", line 1, characters 4-5:
Warning Y: unused variable x.
> cat > test2.ml
match 3 with x -> 5
> ocamlc test2.ml -o /dev/null


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

* Re: [Caml-list] Objective Caml 3.09 released
  2005-10-28  2:44 ` Eijiro Sumii
@ 2005-10-28  4:08   ` Aleksey Nogin
  2005-10-28  6:49     ` Eijiro Sumii
  2005-10-28 19:14     ` Damien Doligez
  0 siblings, 2 replies; 11+ messages in thread
From: Aleksey Nogin @ 2005-10-28  4:08 UTC (permalink / raw)
  To: Caml List

On 27.10.2005 19:44, Eijiro Sumii wrote:

> | It is my pleasure to announce the release of Objective Caml version 3.09.0,
> | the "Halloween" release.  Be very afraid :-)
> 
> Thanks and congratulations!  (Thanks also for fixing the line number
> problem in exception history reports.)
> 
> | - New warnings for variables locally bound and never used.
> 
> I suppose they do not include local variables bound by pattern
> matching - is this correct?

AFAIU, there are two warnings - "Y" for variables bound with let and "Z" 
for variables bound by pattern matching. By default, Y is enabled and Z 
is not. Use "ocamlc -wA" to enable all the warnings.

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200


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

* Re: [Caml-list] Objective Caml 3.09 released
  2005-10-28  4:08   ` Aleksey Nogin
@ 2005-10-28  6:49     ` Eijiro Sumii
  2005-10-28 19:14     ` Damien Doligez
  1 sibling, 0 replies; 11+ messages in thread
From: Eijiro Sumii @ 2005-10-28  6:49 UTC (permalink / raw)
  To: Aleksey Nogin; +Cc: Caml List

> AFAIU, there are two warnings - "Y" for variables bound with let and "Z"
> for variables bound by pattern matching. By default, Y is enabled and Z
> is not. Use "ocamlc -wA" to enable all the warnings.

I see - thanks for the correction.

        Eijiro

> cat test2.ml
match 3 with x -> 5
> ocamlc -w A test2.ml -o /dev/null
File "test2.ml", line 1, characters 13-14:
Warning Z: unused variable x.


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

* Re: [Caml-list] Objective Caml 3.09 released
  2005-10-27 14:24 Objective Caml 3.09 released Xavier Leroy
                   ` (2 preceding siblings ...)
  2005-10-28  2:44 ` Eijiro Sumii
@ 2005-10-28  7:28 ` Aleksey Nogin
  2005-10-29  5:18   ` Vincenzo Ciancia
  3 siblings, 1 reply; 11+ messages in thread
From: Aleksey Nogin @ 2005-10-28  7:28 UTC (permalink / raw)
  To: Caml List

On 27.10.2005 07:24, Xavier Leroy wrote:

> The release can be found at http://caml.inria.fr/ocaml/release
> and is currently available as source code and Windows binaries.
> More binaries will be added in the coming weeks.

I have built binary and source RPMs for Fedora Core 2, 3 and 4, Red Hat 
Enterprise Linux 3 and 4, and Mandrake 10.1. Get them from 
http://rpm.nogin.org/ocaml.html

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200


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

* Re: [Caml-list] Objective Caml 3.09 released
  2005-10-28  4:08   ` Aleksey Nogin
  2005-10-28  6:49     ` Eijiro Sumii
@ 2005-10-28 19:14     ` Damien Doligez
  2005-10-28 21:12       ` Jon Harrop
  2005-10-29 14:31       ` Stefan Monnier
  1 sibling, 2 replies; 11+ messages in thread
From: Damien Doligez @ 2005-10-28 19:14 UTC (permalink / raw)
  To: Caml List

On Oct 28, 2005, at 06:08, Aleksey Nogin wrote:

> AFAIU, there are two warnings - "Y" for variables bound with let  
> and "Z" for variables bound by pattern matching. By default, Y is  
> enabled and Z is not.

The rules for Y are a bit complex.  They are designed to match our style
of programming, where we sometimes document patterns by giving names to
all the arguments, even if they are unused.

Y will warn you on all variables bound with an "as" (in a let-in or a
match).  For the other variables of a let-in pattern, it will warn you
only if all of them are unused.  Examples:

   let (x, y) = (0, 0) in 0;;            (* warning on x and y *)
   let (x, y) = (0, 0) in x;;            (* no warning *)

   let (x, y) as z = (0, 0) in (x, y);;  (* warning on z *)
   match 1 with _ as z -> 1;;            (* warning on z *)

Variables whose names start with _ are always ignored for the  
purposes of
these warnings (both Y and Z):

   let (_x, y) = (0, 0) in 0;;           (* warning on y *)
   let (_x, y) = (0, 0) in _x;;          (* warning on y *)

Z will warn you on all unused variables bound by "let-in" or "match",
except the ones that are (or would be) reported by Y.  Note that it  
doesn't
make much sense to have Y disabled and Z enabled.

Pattern-matchings introduced by the "fun" and "function" keywords behave
like the ones that start with "match".


> Use "ocamlc -wA" to enable all the warnings.

That should be "ocamlc -w A" with a space.

-- Damien


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

* Re: [Caml-list] Objective Caml 3.09 released
  2005-10-28 19:14     ` Damien Doligez
@ 2005-10-28 21:12       ` Jon Harrop
  2005-10-29 14:31       ` Stefan Monnier
  1 sibling, 0 replies; 11+ messages in thread
From: Jon Harrop @ 2005-10-28 21:12 UTC (permalink / raw)
  To: caml-list

On Friday 28 October 2005 20:14, Damien Doligez wrote:
> On Oct 28, 2005, at 06:08, Aleksey Nogin wrote:
> > AFAIU, there are two warnings - "Y" for variables bound with let
> > and "Z" for variables bound by pattern matching. By default, Y is
> > enabled and Z is not.
>
> The rules for Y are a bit complex.  They are designed to match our style
> of programming, where we sometimes document patterns by giving names to
> all the arguments, even if they are unused.
> ...

An alternative solution might be to highlight unused pattern bindings in the 
editor?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists


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

* Re: Objective Caml 3.09 released
  2005-10-28  7:28 ` [Caml-list] " Aleksey Nogin
@ 2005-10-29  5:18   ` Vincenzo Ciancia
  0 siblings, 0 replies; 11+ messages in thread
From: Vincenzo Ciancia @ 2005-10-29  5:18 UTC (permalink / raw)
  To: caml-list

Aleksey Nogin wrote:

> 
> I have built binary and source RPMs for Fedora Core 2, 3 and 4, Red Hat
> Enterprise Linux 3 and 4, and Mandrake 10.1. Get them from

Do you also run it as a yum or apt repository?

Thanks

Vincenzo

-- 
Please note that I do not read the e-mail address used in the from field but
I read vincenzo_ml at yahoo dot it
Attenzione: non leggo l'indirizzo di posta usato nel campo from, ma leggo
vincenzo_ml at yahoo dot it


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

* Re: Objective Caml 3.09 released
  2005-10-28 19:14     ` Damien Doligez
  2005-10-28 21:12       ` Jon Harrop
@ 2005-10-29 14:31       ` Stefan Monnier
  1 sibling, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2005-10-29 14:31 UTC (permalink / raw)
  To: caml-list

> The rules for Y are a bit complex.  They are designed to match our style
> of programming, where we sometimes document patterns by giving names to
> all the arguments, even if they are unused.

I like the use of "_foo", since it not only documents the pattern by giving
it a name (like "foo" does), it also documents the fact that this variable
is not used (like "_" does).


        Stefan


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

end of thread, other threads:[~2005-10-29 14:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27 14:24 Objective Caml 3.09 released Xavier Leroy
2005-10-27 14:36 ` [Caml-list] " Damien Doligez
2005-10-27 15:40 ` skaller
2005-10-28  2:44 ` Eijiro Sumii
2005-10-28  4:08   ` Aleksey Nogin
2005-10-28  6:49     ` Eijiro Sumii
2005-10-28 19:14     ` Damien Doligez
2005-10-28 21:12       ` Jon Harrop
2005-10-29 14:31       ` Stefan Monnier
2005-10-28  7:28 ` [Caml-list] " Aleksey Nogin
2005-10-29  5:18   ` Vincenzo Ciancia

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).