./lang/ocaml, The latest implementation of the Caml dialect of ML

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 4.04.0, Package name: ocaml-4.04.0, Maintainer: jaapb

Objective Caml is the latest implementation of the Caml dialect of ML. The main
novelties compared with its ancestor, Caml Light, are:

* Full support for objects and classes -- here combined for the first time
with ML-style type reconstruction.
* A powerful module calculus in the style of Standard ML (but retaining
separate compilation).
* A high-performance native code compiler (in addition to a Caml
Light-style bytecode compiler).

Required to build:

Master sites:

SHA1: 49c4d406f5eb4dc2d8ac006103f2bc459fa5a5a6
RMD160: 98cbfac14cf93983ae62bfa2042058d0af1734bd
Filesize: 3474.156 KB

Version history: (Expand)

CVS history: (Expand)

   2017-03-27 14:54:59 by Jonathan Perkin | Files touched by this commit (3)
Log message:
Enable profiling on SunOS/x86_64.  Note to DragonFly developers that the
existing patch for enabling profiling for that platform is clearly
incorrect, but I'm not going to change it without being able to test it.
   2017-03-27 14:51:58 by Jonathan Perkin | Files touched by this commit (2)
Log message:
Move some files from PLIST.prof to the main PLIST, as the install phase
creates symlinks for them if profiling is not supported by the target.
   2017-03-27 13:51:30 by Jonathan Perkin | Files touched by this commit (4)
Log message:
Move raw_spacetime_lib components to a separate PLIST file, they are only
built for native 64-bit targets.
   2017-03-23 19:23:58 by Jonathan Perkin | Files touched by this commit (1) | Package updated
Log message:
Restore PKGMANDIR support lost in previous update.
   2017-03-23 19:22:34 by Jonathan Perkin | Files touched by this commit (2) | Package updated
Log message:
Restore x86_64-*-solaris support lost in previous update.
   2016-12-30 12:15:00 by Jaap Boender | Files touched by this commit (18) | Package updated
Log message:
Updated package to latest version, ocaml 4.04.0. This involved removing
some patches that have been migrated upstream.

Changes (bug numbers removed so they don't trigger our system) include:
(Changes that can break existing programs are marked with a "*")

### Language features:

- Support GADT equations on non-local abstract types
  (Jacques Garrigue)

- Local opening of modules in a pattern.
  Syntax: "M.(p)", "M.[p]","M.[| p |]", \ 
  (Florian Angeletti, Jacques Garrigue, review by Alain Frisch)

- local exception declarations "let exception ... in"
  (Alain Frisch)

- Allow shortcut for extension on semicolons: ;%foo
  (Jeremie Dimino)

- optimized representation for immutable records with a single
  field, and concrete types with a single constructor with a single argument.
  This is triggered with a [@@unboxed] attribute on the type definition.
  Currently mutually recursive datatypes are not well supported, this
  limitation should be lifted in the future (see M).
  (Damien Doligez)

### Compiler user-interface and warnings:

* interpret all command-line options before compiling any
  files, changes (improves) the semantics of repeated -o options or -o
  combined with -c see the super-detailed commit message at
  https://github.com/ocaml/ocaml/commit/d … 9c8346eec8

- clarify the wording of Warning 38
  (Unused exception or extension constructor)
  (Gabriel Scherer)

* add colors when reporting errors generated by ppx rewriters.
  Remove the `Location.errorf_prefixed` function which is no longer relevant
  (Simon Cruanes, Jérémie Dimino)

- clarify the wording of Warning 8
  (Non-exhaustivity warning for pattern matching)
  (Florian Angeletti, review and report by Gabriel Scherer)

* Improve support for OCAMLPARAM: (i) do not use objects
  files with -a, -pack, -shared; (ii) use "before" objects in the toplevel
  (but not "after" objects); (iii) use -I dirs in the toplevel,
  (iv) fix bug where -I dirs were ignored when using threads
  (Marc Lasson, review by Damien Doligez and Alain Frisch)

- New -plugin option for ocamlc and ocamlopt, to dynamically extend
  the compilers at runtime.
  (Fabrice Le Fessant)

- Detect unused module declarations
  (Alain Frisch)

- Add a settable Env.Persistent_signature.load function so
  that cmi files can be loaded from other sources. This can be used to
  create self-contained toplevels.
  (Jérémie Dimino)

### Standard library:

- Provide `Sys.backend_type` so that user can write backend-specific
  code in some cases (for example,  code generator).
  (Hongbo Zhang)

- implement Set.map
  (Gabriel Scherer)

- Add Obj.reachable_words to compute the
  "transitive" heap size of a value
  (Alain Frisch, review by Mark Shinwell and Damien Doligez)

- Add a non-allocating function to recover the number of
  allocated minor words.
  (Pierre Chambart, review by Damien Doligez and Gabriel Scherer)

- String.split_on_char
  (Alain Frisch)

- Filename.extension and Filename.remove_extension
  (Alain Frisch, request by Edgar Aroutiounian, review by Daniel Bunzli
  and Damien Doligez)

### Code generation and optimizations:

- Optimize Hashtbl by using in-place updates of its
  internal bucket lists.  All operations run in constant stack size
  and are usually faster, except Hashtbl.copy which can be much
  (Alain Frisch)

* Optimize performance of record update:
  no more performance cliff when { foo with t1 = ..; t2 = ...; ... }
  hits 6 updated fields
  (Olivier Nicole, review by Thomas Braibant and Pierre Chambart)

- Better unboxing strategy
  (Alain Frisch, Pierre Chambart)

- Ocamlopt + flambda requires a lot of memory
  to compile large array literal expressions
  (Pierre Chambart, review by Mark Shinwell)

- Handle specialisation of recursive function that does
  not always preserve the arguments
  (Pierre Chambart, Mark Shinwell, report by Simon Cruanes)

- Obj.is_block is now an inlined OCaml function instead of a
  C external.  This should be faster.
  (Demi Obenour)

- Optimize immutable float records
  (Pierre Chambart, review by Mark Shinwell)

- Do not generate dummy code to force module linking
  (Pierre Chambart, reviewed by Jacques Garrigue)

- Do not eliminate boxed int divisions by zero and
  avoid checking twice if divisor is zero with flambda.
  (Pierre Chambart, report by Jeremy Yallop)

- Optimize some constant string operations when the "-safe-string"
  configure time option is enabled.
  (Pierre Chambart)

- Load cross module information during a meet
  (Pierre Chambart, report by Leo White, review by Mark Shinwell)

- Share a few more equal switch branches
  (Pierre Chambart, review by Gabriel Scherer)

- Small improvements to type-based optimizations for array
  and lazy
  (Alain Frisch, review by Pierre Chambart)

- Prevent warning 59 from triggering on Lazy of constants
  (Pierre Chambart, review by Leo White)

-  Sort emitted functions according to source location
  (Pierre Chambart, review by Mark Shinwell)

- Lack of type normalization lead to missing simple compilation for "lazy \ 
  (Alain Frisch)

### Runtime system:

- Allows to register finalisation function that are
  called only when a value will never be reachable anymore. The
  drawbacks compared to the existing one is that the finalisation
  function is not called with the value as argument. These finalisers
  are registered with `GC.finalise_last`
  (François Bobot reviewed by Damien Doligez and Leo White)

- Do not perform compaction if the real overhead is less than expected
  (Thomas Braibant)

### Tools:

- toplevel #show, follow chains of module aliases
  (Gabriel Scherer, report by Daniel Bünzli, review by Thomas Refis)

- have ocamldep interpret -open arguments in left-to-right order
  (Gabriel Scherer, report by Anton Bachin)

- ocamldoc, missing line breaks in type_*.html files
  (Florian Angeletti)

- ocamldoc, improved support for inline records
  (Florian Angeletti)

- ensure "ocamllex -ml" works with -safe-string
  (Hongbo Zhang)

- ocamldoc, add viewport metadata to generated html pages
  (Florian Angeletti, request by Daniel Bünzli)

- Make the output of ocamldep more stable
  (Alain Frisch)

- empty documentation comments
  (Florian Angeletti)

- Add the -no-version option to the toplevel
  (Sébastien Hinderer)

- Add a --strict option to ocamlyacc treat conflicts as errors
  (this option is now used for the compiler's parser)
  (Jeremy Yallop)

- make ocamldoc use -open arguments
  (Florian Angeletti)

- ocamldoc, fix order of extensible variant constructors
  (Florian Angeletti)

### Debugging and profiling:

- Spacetime, a new memory profiler (Mark Shinwell, Leo White)

### Runtime system:

- Add a new primitive caml_alloc_float_array to allocate an
  array of floats
  (Thomas Braibant)

### Manual and documentation:

- document the existence of OCAMLPARAM and
  (Damien Doligez, reports by Wim Lewis and Gabriel Scherer)

- warn users against using WinZip to unpack the source archive
  (Damien Doligez, report by Shayne Fletcher)

- clarification to the wording and documentation
  of Warning 52 (fragile constant pattern)
  (Gabriel Scherer, William, Adrien Nader, Jacques Garrigue)

- Restore 4.02.3 behaviour of Unix.fstat, if the
  file descriptor doesn't wrap a regular file (win32unix only)
  (Andreas Hauptmann, review by David Allsopp)

- flatten : Avoid confusion
  (Damien Doligez, report by user 'tormen')

- Gc.finalise and lazy values
  (Jeremy Yallop)

- Document that [Store_field] must not be used to populate
  arrays of values declared using [CAMLlocalN] (Mark Shinwell)

### Build system:

- Compiler developers: Adding new primitives to the
  standard runtime doesn't require anymore to run `make bootstrap`
  (François Bobot)

- Fix compilation using old Microsoft C Compilers not
  supporting secure CRT functions (SDK Visual Studio 2005 compiler and
  earlier) and standard 64-bit integer literals (Visual Studio .NET
  2002 and earlier)
  (David Allsopp)

- More sharing between Unix and Windows makefiles
  (whitequark, review by Alain Frisch)

* Installed `ocamlc`, `ocamlopt`, and `ocamllex` are
  now the native-code versions of the tools, if those versions were
  (Demi Obenour)

- "./configure -safe-string" to get a system where
  "-unsafe-string" is not allowed, thus giving stronger non-local
  guarantees about immutability of strings
  (Alain Frisch, review by Hezekiah M. Carty)

### Bug fixes:

* Missed Type-error leads to a segfault upon record access.
  (Jacques Garrigue, extra report by Stephen Dolan)
  Proper fix required a more restrictive approach to recursive types:
  mutually recursive types are seen as abstract types (i.e. non-contractive)
  when checking the well-foundedness of the recursion.

* Nominal types and scope escaping.
  Revert to strict scope for non-generalizable type variables, cf. Mantis.
  Note that this is actually stricter than the behavior before 4.03,
  cf. , meaning that you may sometimes need to add type annotations
  to explicitly instantiate non-generalizable type variables.
  (Jacques Garrigue, following discussion with Jeremy Yallop,
   Nicolas Ojeda Bar and Alain Frisch)

- Aliased arguments ignored for equality of module types
  (Jacques Garrigue, report by Leo White)

- compiler forcing aliases it shouldn't while reporting type errors
  (Jacques Garrigue, report and suggestion by sliquister)

- document that Unix.SOCK_SEQPACKET is not really usable.

- uncaught exception on invalid lexer directive
  (Gabriel Scherer, report by KC Sivaramakrishnan using afl-fuzz)

- revert a 4.03 change of behavior on (Unix.sleep 0.),
  it now calls (nano)sleep for 0 seconds as in (< 4.03) versions.
  (Hannes Mehnert, review by Damien Doligez)

- GADT + subtyping compile time crash
  (Jacques Garrigue, report by Nicolas Ojeda Bar)

- Segfault from conjunctive constraints in GADT
  (Jacques Garrigue, report by Stephen Dolan)

- Support more than FD_SETSIZE sockets in Windows' emulation
  of select
  (David Scott, review by Alain Frisch)

* Prevent private inline records from being mutated
  (Alain Frisch, report by Pierre Chambart)

- Bug in mcomp_fields leads to segfault
  (Jacques Garrigue, report by Leo White)

- Relaxed value restriction broken with principal
  (Jacques Garrigue, report by Leo White)

- -strict-sequence turns off Warning 21
  (Jacques Garrigue, report by Valentin Gatien-Baron)

- remove access to OCaml heap inside blocking section in win32unix
  (David Allsopp, report by Andreas Hauptmann)

- remove access to OCaml heap inside blocking in Unix.sleep on Windows
  (David Allsopp)

- -principal causes loop in type checker when compiling
  (Jacques Garrigue, report by Anil Madhavapeddy, analysis by Leo White)

- Missing exhaustivity check for extensible variant
  (Jacques Garrigue, report by Elarnon *)

- Contractiveness check unsound with constraints
  (Jacques Garrigue, report by Leo White)

- GADT constructors can be re-exposed with an incompatible type
  (Jacques Garrigue, report by Alain Frisch)

- Unsoundness in GADT exhaustiveness with existential variables
  (Jacques Garrigue, report by Stephen Dolan)

* Thread library: fixed [Thread.wait_signal] so that it
  converts back the signal number returned by [sigwait] to an
  OS-independent number
  (Jérémie Dimino)

- (similar to ) ensure that register typing constraints are
  respected at N-way join points in the control flow graph
  (Mark Shinwell)

- Fix float_of_hex parser to correctly reject some invalid forms
  (Bogdan Tătăroiu, review by Thomas Braibant and Alain Frisch)

- Fix maximum weak bucket size
  (Nicolas Ojeda Bar, review by François Bobot)

-  Allow more module aliases in strengthening (Leo White)

- Fix wrong code generation involving lazy values in Flambda
  (Mark Shinwell, review by Pierre Chambart and Alain Frisch)

- Fix infinite loop in flambda due to [@@specialise] annotations

- Building native runtime on Windows could fail when bootstrapping
  FlexDLL if there was also a system-installed flexlink
  (David Allsopp, report Michael Soegtrop)

- check for integer overflow in String.concat
  (Jeremy Yallop,
   review by Damien Doligez, Alain Frisch, Daniel Bünzli, Fabrice Le Fessant)

- check for integer overflow in Array.concat
  (Jeremy Yallop)

- fix the Buffer.add_substring bounds check to handle overflow
  (Jeremy Yallop)

- Fix [@@inline] with default parameters in flambda (Leo White)

- fix build on OpenIndiana
  (Sergey Avseyev, review by Damien Doligez)

### Internal/compiler-libs changes:

- Improve, fix, and add test for parsing/pprintast.ml
  (Runhang Li, David Sheets, Alain Frisch)

- make driver/pparse.ml functions type-safe
  (Gabriel Scherer, Dmitrii Kosarev, review by Jérémie Dimino)

- Improve Texp_record constructor representation, and
  propagate updated record type information
  (Pierre Chambart, review by Alain Frisch)

- Graphics.close_graph crashes 64-bit Windows ports (re-implementation
  of )
  (David Allsopp)

- delay registration of docstring after the mapper is applied
  (Hugo Heuzard, review by Leo White)

- don't attach (**/**) comments to any particular node
  (Thomas Refis, review by Leo White)
   2016-11-04 23:55:58 by John Marino | Files touched by this commit (1)
Log message:
lang/ocaml: regenerate checksum for configure patch

distinfo from cvs:     trusted to convey hashes
patches from same cvs: untrusted thus require hashes to verify
absurdness: Any intruder that can modify the patch in cvs can also modify
            the distinfo file.

Only externally hosted patches require hashes.  Hopefully some day
thousands of future commits to distinfo files everywhere can be avoided by
making the framework smarter.  </rant>
   2016-11-04 21:11:40 by John Marino | Files touched by this commit (1) | Package updated
Log message:
lang/ocaml: update configure patch to fix packaging on DragonFly