Skip to content

Commit

Permalink
merge 3.12
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/jocamltrunk@10523 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
maranget committed Jun 4, 2010
1 parent 1695cc5 commit fb1917e
Show file tree
Hide file tree
Showing 11 changed files with 835 additions and 523 deletions.
2 changes: 1 addition & 1 deletion .cvsignore
@@ -1,4 +1,3 @@
.cvsignore
.depend
configure
ocamlc
Expand All @@ -17,3 +16,4 @@ _boot_log2
_build
_log
myocamlbuild_config.ml
ocamlnat
811 changes: 413 additions & 398 deletions .depend

Large diffs are not rendered by default.

128 changes: 124 additions & 4 deletions Changes
@@ -1,3 +1,123 @@
Objective Caml 3.12.0:
----------------------

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

Language features:
- Shorthand notation for records: in expressions and patterns,
{ lbl } stands for { lbl = lbl } and { M.lbl } for { M.lbl = lbl }
- Record patterns of the form { lbl = pat; _ } to mark that not all
labels are listed, purposefully. (See new warning below.)
- Explicit naming of a generic type; in an expression
"fun ... (type t) ... -> e", the type t is considered abstract in its
scope (the arguments that follow it and the body of the function),
and then replaced by a fresh type variable. In particular, the type
t can be used in contexts where a type variable is not allowed
(e.g. for defining an exception in a local module).
- Explicit polymorphic types and polymorphic recursion. In let
definitions, one can write an explicit polymorphic type just
immediately the function name; the polymorphism will be enforced,
and recursive calls may use the polymorphism.
The syntax is the same as for polymorphic methods:
"let [rec] <ident> : 'a1 ... 'an. <typexp> = ..."
- First-class packages modules.
New kind of type expression, for packaged modules: (module PT).
New kind of expression, to pack a module as a first-class value:
(module MODEXPR : PT).
New kind of module expression, to unpack a first-class value as a module:
(val EXPR : PT).
PT is a package type of the form "S" or
"S with type t1 = ... and ... and type tn = ..." (S refers to a module type).
- Local opening of modules in a subexpression.
Syntax: "let open M in e", or "M.(e)"
- In class definitions, method and instance variable override can now
be made explicit, by writing "method!", "val!" or "inherit!" in place of
"method", "val" and "inherit". It is an error to override an
undefined member (or to use overriding inheritance when nothing get
overridden). Additionally, these constructs disactivate respectively
warnings 7 (method override, code 'M') and 13 (instance variable
override, code 'V'). Note that, by default, warning 7 is inactive
and warning 13 is active.
- "Destructive" substitution in signatures.
By writing "<signature> with type t := <typeconstr>" and
"<signature> with module M := <module-path>" one replaces "t" and "M"
inside the signature, removing their respective fields. Among other
uses, this allows to merge two signatures containing identically
named fields.

Compilers and toplevel:
- Warnings are now numbered and can be switched on and off individually.
The old system with letters referring to sets of warnings is still
supported.
- New warnings:
+ 9 (code 'R') to signal record patterns without "; _" where
some labels of the record type are not listed in the pattern.
+ 28 when giving a wildcard argument to a constant constructor in
a pattern-matching.
+ 29 when an end-of-line appears unescaped in a string constant.
+ 30 when the same constructor or record field is defined twice in
mutually-recursive type definitions.
* The semantics of warning 7 (code 'M', method override) have changed
(it now detects all overrides, not just repeated definitions inside
the same class body), and it is now inactive by default.
- Better error report in case of unbound qualified identifier: if the module
is unbound this error is reported in the first place.
- Added option '-strict-sequence' to force left hand part of sequence to have
type unit.
- Added option '-no-app-funct' to turn applicative functors off.
This option can help working around mysterious type incompatibilities
caused by the incomplete comparison of applicative paths F(X).t.

Native-code compiler:
- AMD64: shorter and slightly more efficient code generated for
float comparisons.

Standard library:
- Format: new function ikfprintf analoguous to ifprintf with a continuation
argument.
* PR#4210, #4245: stricter range checking in string->integer conversion
functions (int_of_string, Int32.of_string, Int64.of_string,
Nativeint.of_string). The decimal string corresponding to
max_int + 1 is no longer accepted.
- Scanf: to prevent confusion when mixing Scanf scanning functions and direct
low level input, value Scanf.stdin has been added.
* Random: changed the algorithm to produce better randomness. Now passes the
DieHard tests.
- Map: implement functions from Set that make sense for Map.

Other libraries:
* Str: letters that constitute a word now include digits 0-9 and
underscore _. This changes the interpretation of '\b' (word boundary)
in regexps, but is more consistent with other regexp libraries. (PR#4874).

Ocamlbuild:
- Add support for native dynlink.

New tool:
- ocamlobjinfo: displays various information, esp. dependencies, for
compiled OCaml files (.cmi, .cmo, .cma, .cmx, .cmxa, .cmxs, and bytecode
executables). Extends and makes more official the old objinfo tool
that was installed by some OCaml packages.

All tools:
- PR#4857: add a -vnum option to display the version number and nothing else

Bug Fixes:
- PR#4012: Map.map and Map.mapi do not conform to specification
- PR#4478: better error messages for type definition mismatches
- PR#4742: finalisation function raising an exception blocks other finalisations
- PR#4775: compiler crash on crazy types (temporary fix)
- PR#4964: parenthesized names for infix functions in annot files
- PR#4970: better error message for instance variables
- PR#4975: spelling mistakes
- PR#4988: contravariance lost with ocamlc -i
- PR#5004: problem in Buffer.add_channel with very large lengths.
- PR#5008: on AMD64/MSVC port, rare float corruption during GC.
- PR#5018: wrong exception raised by Dynlink.loadfile.
- PR#5057: fatal typing error with local module + functor + polymorphic variant
- Wrong type for Obj.add_offset.
- Small problem with the representation of Int32, Int64, and Nativeint constants.

Objective Caml 3.11.2:
----------------------

Expand Down Expand Up @@ -128,7 +248,7 @@ Compilers:
are tail calls.
- All compiler error messages now include a file name and location, for
better interaction with Emacs' compilation mode.
- Optimized compilation of "lazy e" when the argument "e" is
- Optimized compilation of "lazy e" when the argument "e" is
already evaluated.
- Optimized compilation of equality tests with a variant constant constructor.
- The -dllib options recorded in libraries are no longer ignored when
Expand Down Expand Up @@ -181,7 +301,7 @@ Other libraries:
- Dynlink: on some platforms, the Dynlink library is now available in
native code. The boolean Dynlink.is_native allows the program to
know whether it has been compiled in bytecode or in native code.
- Bigarrays: added "unsafe_get" and "unsafe_set"
- Bigarrays: added "unsafe_get" and "unsafe_set"
(non-bound-checking versions of "get" and "set").
- Bigarrays: removed limitation "array dimension < 2^31".
- Labltk: added support for TK 8.5.
Expand Down Expand Up @@ -211,7 +331,7 @@ Bug fixes:
out-of-heap pointers.
- PR#3915: updated most man pages.
- PR#4261: type-checking of recursive modules
- PR#4308: better stack backtraces for "spontaneous" exceptions such as
- PR#4308: better stack backtraces for "spontaneous" exceptions such as
Stack_overflow, Out_of_memory, etc.
- PR#4338: Str.global_substitute, Str.global_replace and the Str.*split*
functions are now tail-recursive.
Expand Down Expand Up @@ -866,7 +986,7 @@ Type-checking:
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.
- Disable "method is overriden" warning when the method was explicitly
- Disable "method is overridden" warning when the method was explicitly
redefined as virtual beforehand (i.e. not through inheritance). Typing
and semantics are unchanged.

Expand Down
118 changes: 118 additions & 0 deletions INSTALL
Expand Up @@ -15,6 +15,21 @@ CONTEXT
* plus: the POSIX threads library 'phreads' is required.


<<<<<<< .courant
=======
* Under HP/UX, the GNU C compiler gcc, the GNU assembler gas, and GNU make
are all *required*. The vendor-provided compiler, assembler and make
have major problems.

* GNU make is needed to build ocamlbuild and camlp4. If your system's
default make is not GNU make, you need to define the GNUMAKE environment
variable to the name of GNU make, typically with this command:

export GNUMAKE=gnumake

INSTALLATION INSTRUCTIONS

>>>>>>> .fusion-droit.r10497
1- Configure the system. From the top directory, do:

./configure
Expand Down Expand Up @@ -45,6 +60,109 @@ Added options.
The Objective Caml library is <dir>. No version check is performed. Use
this option at your own risk.

<<<<<<< .courant
=======
-no-curses
Do not use the curses library.

-host <hosttype> (default: determined automatically)
The type of the host machine, in GNU's "configuration name"
format (CPU-COMPANY-SYSTEM). This info is generally determined
automatically by the "configure" script, and rarely ever
needs to be provided by hand. The installation instructions
for gcc or emacs contain a complete list of configuration names.

-x11include <include_dir> (default: determined automatically)
-x11lib <lib_dir> (default: determined automatically)
Location of the X11 include directory (e.g. /usr/X11R6/include)
and the X11 library directory (e.g. /usr/X11R6/lib).

-tkdefs <cpp flags> (default: none)
-tklibs <flags and libraries> (default: determined automatically)
These options specify where to find the Tcl/Tk libraries for
LablTk. "-tkdefs" helps to find the headers, and "-tklibs"
the C libraries. "-tklibs" may contain either only -L/path and
-Wl,... flags, in which case the library names are determined
automatically, or the actual libraries, which are used as given.
Example: for a Japanese tcl/tk whose headers are in specific
directories and libraries in /usr/local/lib, you can use
./configure -tklibs "-L/usr/local/lib -ltk8.0jp -ltcl8.0jp"
-tkdefs "-I/usr/local/include/tcl8.0jp -I/usr/local/include/tk8.0jp"

-tk-no-x11
Build LablTk without using X11. This option is needed on Cygwin.

-no-tk
Do not attempt to build LablTk.

-no-pthread
Do not attempt to use POSIX threads.

-with-pthread
Attempt to use POSIX threads (this is the default).

-no-shared-libs
Do not configure support for shared libraries

-dldefs <cpp flags>
-dllibs <flags and libraries>
These options specify where to find the libraries for dynamic
linking (i.e. use of shared libraries). "-dldefs" specifies
options for finding the header files, and "-dllibs" for finding
the C libraries.

-as <assembler and options> (default: determined automatically)
The assembler to use for assembling ocamlopt-generated code.

-aspp <assembler and options> (default: determined automatically)
The assembler to use for assembling the parts of the
run-time system manually written in assembly language.
This assembler must preprocess its input with the C preprocessor.

-verbose
Verbose output of the configuration tests. Use it if the outcome
of configure is not what you were expecting.

Examples:

Standard installation in /usr/{bin,lib,man} instead of /usr/local:
./configure -prefix /usr

Installation in /usr, man pages in section "l":
./configure -bindir /usr/bin -libdir /usr/lib/ocaml -mandir /usr/man/manl

On a MacOSX 10.5/Intel Core 2 or MacOSX 10.5/PowerPC host,
to build a 64-bit version of OCaml:
./configure -cc "gcc -m64"

On a MacOSX 10.6/Intel Core 2, to build a 32-bit version of OCaml:
./configure -cc "gcc -m32" -as "as -arch i386" -aspp "gcc -m32 -c"

On a Linux x86/64 bits host, to build a 32-bit version of OCaml:
./configure -cc "gcc -m32" -as "as --32" -aspp "gcc -m32 -c"

On a Linux x86/64 bits host, to build the run-time system in PIC mode
(enables putting the runtime in a shared library,
at a small performance cost):
./configure -cc "gcc -fPIC" -aspp "gcc -c -fPIC"

For Sun Solaris with the "acc" compiler:
./configure -cc "acc -fast" -libs "-lucb"

For AIX 4.3 with the IBM compiler xlc:
./configure -cc "xlc_r -D_AIX43 -Wl,-bexpall,-brtl -qmaxmem=8192"


If something goes wrong during the automatic configuration, or if the
generated files cause errors later on, then look at the template files

config/Makefile-templ
config/m-templ.h
config/s-templ.h

for guidance on how to edit the generated files by hand.

>>>>>>> .fusion-droit.r10497
2- From the top directory, do:

make world
Expand Down

0 comments on commit fb1917e

Please sign in to comment.