English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Objective Caml 3.04 released
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-12-13 (08:42)
From: Xavier Leroy <xleroy@p...>
Subject: [Caml-list] Objective Caml 3.04 released
End-of-year clearance!  Version 3.04 of the Objective Caml system is
now available from the usual places:


This release is essentially a stabilization of the 3.03 Alpha release
of october 2001.  To avoid potential confusion with 3.03 Alpha, we
just skipped over the 3.03 release number.

A detailed list of changes is appended below.  The main changes
w.r.t. the previous final release (3.02) are:

1- Labels on function arguments are now strict (non-optional) by default,
   and the standard library modules are now not labeled, instead
   labeled versions of some of these modules are provided.
   The previous treatment of labels (optional by default, and
   generously sprinkled throughout the standard library) was unsatisfactory
   (insufficient static checking).  This change breaks compatibility with
   versions 3.00--3.02: some programs that used labels in "classic" mode
   (optional, non-commuting labels) need to be cleaned up.
   The distribution provides tools and detailed hints to help doing this.

2- As an alternative to building "custom bytecode executables"
   (containing C code statically linked), the bytecode interpreter now
   supports dynamic loading of the C part of mixed Caml/C libraries.
   This change does not break any existing program or libraries, yet
   makes it much easier to use mixed Caml/C libraries in a toplevel or
   dynamic loading context, and to preserve machine-independence of
   bytecode executables.

3- The CamlP4 pre-processor-pretty-printer is now integrated in the
   distribution.  Again, this should only make life easier for users,
   although we took advantage of CamlP4's better implementation of
   streams and stream parsers to remove them from the core OCaml language.

4- The Windows native port has received some attention, and now sports
   a new GUI for the toplevel, a new installer, and an implementation
   of the Graphics library usable from stand-alone executables.

5- The libraries and run-time system are now distributed under a
   special exception to the LGPL, allowing unrestricted static linking.

For general info on Objective Caml, see http://caml.inria.fr.  Bug
reports go to caml-bugs@inria.fr, messages for the implementors to
caml@inria.fr, and general discussions to the mailing-list
caml-list@inria.fr, or the comp.lang.ml or comp.lang.functional

Season's greetings,

- Xavier Leroy, for the Objective Caml team.

Objective Caml 3.04:

- Allowed coercing self to the type of the current class, avoiding
  an obscure error message about "Self type cannot be unified..."

Both compilers:
- Use OCAMLLIB environment variable to find standard library, falls
  back on CAMLLIB if not defined.
- Report out-of-range ASCII escapes in character or string literals
  such as "\256".

Byte-code compiler:
- The -use-runtime and -make-runtime flags are back by popular demand
  (same behavior as in 3.02).
- Dynamic loading (of the C part of mixed Caml/C libraries): arrange that
  linking in -custom mode uses the static libraries for the C parts,
  not the shared libraries, for maximal robustness and compatibility with

Native-code compiler:
- Fixed bug in link-time consistency checking.

- ocamlyacc: added parser debugging support (set OCAMLRUNPARAM=p to get
  a trace of the pushdown automaton actions).
- ocamlcp: was broken in 3.03 (Sys_error), fixed.

Run-time system:
- More work on dynamic loading of the C part of mixed Caml/C libraries.
- On uncaught exception, flush output channels before printing exception
  message and backtrace.
- Corrected several errors in exception backtraces.

Standard library:
- Pervasives: integer division and modulus are now fully specified
  on negative arguments (with round-towards-zero semantics).
- Pervasives.float_of_string: now raises Failure on ill-formed input.
- Pervasives: added useful float constants max_float, min_float, epsilon_float.
- printf functions in Printf and Format: added % formats for int32, nativeint,
  int64; "*" in width and precision specifications now supported 
  (contributed by Thorsten Ohl).
- Added Hashtbl.copy, Stack.copy.
- Hashtbl: revised resizing strategy to avoid quadratic behavior 
  on Hashtbl.add.
- New module MoreLabels providing labelized versions of modules
  Hashtbl, Map and Set.
- Pervasives.output_value and Marshal.to_* : improved hashing strategy
  for internal data structures, avoid excessive slowness on 
  quasi-linearly-allocated inputs.

Other libraries:
- Num: fixed bug in big integer exponentiation (Big_int.power_*).

Windows port:
- New GUI for interactive toplevel (Jacob Navia).
- The Graphics library is now available for stand-alone executables
  (Jacob Navia).
- Unix library: improved reporting of system error codes.
- Fixed error in "globbing" of * and ? patterns on command line.

Emacs mode: small fixes; special color highlighting for ocamldoc comments.

License: added special exception to the LGPL'ed code (libraries and
  runtime system) allowing unrestricted linking, whether static or dynamic.

Objective Caml 3.03 ALPHA:

- Removed built-in syntactic sugar for streams and stream patterns
  [< ... >], now supported via CamlP4, which is now included in the
- Switched the default behaviour to labels mode (labels are compulsory),
  but allows omitting labels when a function application is complete.
  -nolabels mode is available but deprecated for programming.
  (See also scrapelabels and addlabels tools below.)
- Removed all labels in the standard libraries, except labltk.
  Labelized versions are kept for ArrayLabels, ListLabels, StringLabels
  and UnixLabels. "open StdLabels" gives access to the first three.
- Extended polymorphic variant type syntax, allowing union types and
  row abbreviations for both sub- and super-types. #t deprecated in types.
- See the Upgrading file for how to adapt to all the changes above.

- Fixed obscure bug in module typing causing the type-checker to loop
  on signatures of the form
        module type M
        module A: sig module type T = sig module T: M end end
        module B: A.T
- Improved efficiency of module type-checking via lazy computation of
  certain signature summary information.
- An empty polymorphic variant type is now an error.

Both compilers:
- Fixed wrong code generated for "struct include M ... end" when M
  contains one or several "external" declarations.

Byte-code compiler:
- Protect against VM stack overflow caused by module initialization code
  with many local variables.
- Support for dynamic loading of the C part of mixed Caml/C libraries.
- Removed the -use-runtime and -make-runtime flags, obsoleted by dynamic
  loading of C libraries.

Native-code compiler:
- Attempt to recover gracefully from system stack overflow.  Currently
  works on x86 under Linux and BSD.
- Alpha: work around "as" bug in Tru64 5.1.

Toplevel environment:
- Revised printing of inferred types and evaluation results
  so that an external printer (e.g. Camlp4's) can be hooked in.

- The CamlP4 pre-processor-pretty-printer is now included in the standard
- New tool ocamlmklib to help build mixed Caml/C libraries.
- New tool scrapelabels and addlabels, to either remove (non-optional)
  labels in interfaces, or automatically add them in the definitions.
  They provide easy transition from classic mode ocaml 3.02 sources,
  depending on whether you want to keep labels or not.
- ocamldep: added -pp option to handle preprocessed source files.

Run-time system:
- Support for dynamic loading of the C part of mixed Caml/C libraries.
  Currently works under Linux, FreeBSD, Windows, Tru64, Solaris and Irix.
- Implemented registration of global C roots with a skip list,
  runs much faster when there are many global C roots.
- Autoconfiguration script: fixed wrong detection of Mac OS X; problem
  with the Sparc, gcc 3.0, and float alignment fixed.

Standard library:
- Added Pervasives.flush_all to flush all opened output channels.

Other libraries:
- All libraries revised to allow dynamic loading of the C part.
- Graphics under X Windows: revised event handling, should no longer lose
    mouse events between two calls to wait_next_event(); wait_next_event()
    now interruptible by signals.
- Bigarrays: fixed bug in marshaling of big arrays.

Windows port:
- Fixed broken Unix.{get,set}sockopt*
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr