Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] OCaml test release 3.07 beta 1
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-07-22 (09:14)
From: Xavier Leroy <xavier.leroy@i...>
Subject: [Caml-list] OCaml test release 3.07 beta 1
A pre-release (3.07 beta 1) of what should soon become the next stable
release of Objective Caml is available for testing at

This is a source-only release: no precompiled binaries are available,
however the provided sources compile cleanly under Unix / Linux, MacOS X
and MS Windows.  The documentation was updated and is available from
the URL above.

The purpose of this release is to give all OCaml users an opportunity
to test it against their favorite Caml applications and libraries,
and help us make a really solid stable release of OCaml by the end of
August if everything goes well.

Please keep us informed of the results of the tests: a short message
to of the form "I tested library Foo and program Bar and
it worked" will be very much appreciated.  Of course, bug reports
should be sent to instead.

A detailed list of changes since OCaml 3.06 is appended below.  The
main novelties are:

- Experimental support for recursive module definitions.
- "Private types", i.e. variant or record types that can be destructured
  but not constructed outside of their defining module.
- Browsing of inferred types (point to an expression in the source
  code and see its inferred type).
- AMD64 (Opteron) port of the native-code compiler.


- Xavier Leroy


Objective Caml 3.07:

Language features:
- Experimental support for recursive module definitions
      module rec A : SIGA = StructA and B : SIGB = StructB and ...
- Support for "private types", or more exactly concrete data types
  with private constructors or labels.  These data types can be
  de-structured normally in pattern matchings, but values of these
  types cannot be constructed directly outside of their defining module.
- Added integer literals of types int32, nativeint, int64
  (written with an 'l', 'n' or 'L' suffix respectively).

- Allow polymorphic generalization of covariant parts of expansive 
  expressions.  For instance, if f: unit -> 'a list, "let x = f ()"
  gives "x" the generalized type forall 'a. 'a list, instead of '_a list
  as before.
- Lots of bug fixes in the handling of polymorphism and recursion inside
- Added a new "-dtypes" option to ocamlc/ocamlopt, and an emacs extension
  "emacs/caml-types.el".  The compiler option saves inferred type information
  to file *.types, and the emacs extension allows the user to look at the
  type of any subexpression in the source file.  Works even in the case
  of a type error (all the types computed up to the error are available).
  This new feature is also supported by ocamlbrowser.

Both compilers:
- Added option "-dtypes" to dump detailed type information to a file.
- The "-i" option no longer generates compiled files, it only prints
  the inferred types.
- The sources for the module named "Mod" can be placed either in or
- Compilation of "let rec" on non-functional values: tightened some checks,
  relaxed some other checks.
- Fixed wrong code that was generated for "for i = a to max_int"
  or "for i = a downto min_int".
- An explicit interface Mod.mli can now be provided for the module obtained
  by ocamlc -pack -o Mod.cmo ... or ocamlopt -pack -o Mod.cmx ...
- Revised internal handling of source code locations, now handles
  preprocessed code better.
- Pattern-matching bug on float literals fixed.
- Minor improvements on pattern-matching over variants.
- More efficient compilation of string comparisons and the "compare" function.
- More compact code generated for arrays of constants.
- Fixed GC bug with mutable record fields of type "exn".
- Added warning "E" for "fragile patterns": pattern matchings that would
  not be flagged as partial if new constructors were added to the data type.

Bytecode compiler:
- Added option -vmthread to select the threads library with VM-level
  scheduling.  The -thread option now selects the system threads library.

Native-code compiler:
- New port: AMD64 (Opteron).
- Fixed instruction selection bug on expressions of the kind (raise Exn)(arg).
- Several bug fixes in ocamlopt -pack (tracking of imported modules,
  command line too long).
- Signal handling bug fixed.
- x86 port:
    Added -ffast-math option to use inline trigo and log functions.
    Small performance tweaks for the Pentium 4.
    Fixed illegal "imul" instruction generated by reloading phase.
- Sparc port:
    Enhanced code generation for Sparc V8 (option -march=v8) and 
    Sparc V9 (option -march=v9).
    Profiling support added for Solaris.
- PowerPC port:
    Keep stack 16-aligned for compatibility with C calling conventions.

Toplevel interactive system:
- Tightened interface consistency checks between .cmi files, .cm[oa] files
  loaded by #load, and the running toplevel.
- #trace on mutually-recursive functions was broken, works again.

Standard library:
- Match_failure and Assert_failure exceptions now report
  (file, line, column), instead of (file, starting char, ending char).
- float_of_string, int_of_string: some ill-formed input strings were not
- Added format concatenation, string_of_format, format_of_string.
- Module Arg: added new option handlers Set_string, Set_int, Set_float,
    Symbol, Tuple.
- Modules Lexing and Parsing: added better handling of positions
    in source file.
- Module Scanf: %n and %N formats to count characters / items read so far;
    assorted bug fixes.
- Modules Set and Map: fixed bugs causing trees to become unbalanced.
- Module Printf: less restrictive typing of kprintf.
- Module Random: better seeding; functions to generate random int32, int64,
    nativeint; added support for explicit state management.
- Module Sys: added Sys.readdir for reading the contents of a directory.

Runtime system:
- output_value/input_value: fixed bug with large blocks (>= 4 Mwords)
  produced on a 64-bit platform and incorrectly read back on a 32-bit
- Fixed memory compaction bug involving input_value.
- Added MacOS X support for dynamic linking of C libraries.
- Improved stack backtraces on uncaught exceptions.
- Fixed float alignment problem on Sparc V9 with gcc 3.2.

Other libraries:
- Dynlink:
    By default, dynamically-loaded code now has access to all
      modules defined by the program; new functions Dynlink.allow_only
      and Dynlink.prohibit implement access control.
    Fixed Dynlink problem with files generated with ocamlc -pack.
    Protect against references to modules not yet fully initialized.
- LablTK/CamlTK: added support for TCL/TK 8.4.
- Str: reimplemented regexp matching engine, now less buggy, faster,
    and LGPL instead of GPL.
- Graphics: fixed draw_rect and fill_rect bug under X11.
- System threads and bytecode threads libraries can be both installed.
- System threads: better implementation of Thread.exit.
- Bytecode threads: fixed two library initialization bugs.
- Unix: make Unix.openfile blocking to account for named pipes;
  GC bug in Unix.*stat fixed; fixed problem with Unix.dup2 on Windows.

- Can name parts of the matched input text, e.g.
    "0" (['0'-'7']+ as s) { ... s ... }

- Handle programs that run for more than 2^30 steps.
- Better support for preprocessed code.

Emacs mode:
- Added file caml-types.el to interactively display the type information
  saved by option -dtypes.

Win32 ports:
- Cygwin port: recognize \ as directory separator in addition to /
- MSVC port: ocamlopt -pack works provided GNU binutils are installed.
- Graphics library: fixed bug in Graphics.blit_image; improved event handling.

- new ty_code field for types, to keep code of a type (with option -keep-code)
- new ex_code field for types, to keep code of an exception
    (with option -keep-code)
- some fixes in html generation
- don't overwrite existing style.css file when generating HTML
- create the ocamldoc.sty file when generating LaTeX (if nonexistent)
- man pages are now installed in man/man3 rather than man/mano
- fix: empty [] in generated HTML indexes

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: