This is pre-release of the long awaited GHC 4.00.  I decided to put
together a release today because the sources are in pretty good shape
at the moment, not because it is at all ready.  In particular, we plan
to have some sort of profiling working for the real 4.00 release.

The source snapshot can be found at

    ftp://ftp.dcs.gla.ac.uk/pub/haskell/glasgow/working/ghc-pre-4.00.tar.gz

Have Fun!

and here are the release notes:

Language matters
~~~~~~~~~~~~~~~~
* Universal and existential quantification

  - Data constructors can have universally quantified fields
  - Rank-2 type signatures
  - Data constructors can have existentially quantified fields

  The first two features were in GHC 2.10 and later, but the syntax
  has changed: it's now "forall a. ..." instead of "All a => ...".
  Full details at
        http://www.dcs.gla.ac.uk/~simonpj/quantification.html


* Multi-paramter type classes.  We have relaxed some of the rules
  since GHC 3.00.  In particular

  -fallow-overlapping-instances allows overlapping instances
  -fallow-undecidable-instances allows you to write instance
        contexts that constrain non-type-variables

  Full details at
        http://www.dcs.gla.ac.uk/~simonpj/mult-param.html       


New Libraries
~~~~~~~~~~~~~
* Dynamic

Dynamic types.  Documentation in ghc/docs/libraries.

* Exceptions

The libraries Exception and NDSet in '-syslib exts' provide an
interface for exception handling.  Calls to 'error', pattern matching
failures and a bunch of other exception can be caught.  No docs yet.

Compiler internals
~~~~~~~~~~~~~~~~~~
The intermediate language used by GHC has had a radical overhaul.
The new Core language (coreSyn/CoreSyn.lhs) is much smaller and
more uniform.  The main transformation engine (the "simplifier")
has been totally rewritten.  The compiler is several thousand lines
shorter as a result.  It's also very much easier to understand 
and modify.  (It's true.  Honest!)


Run time system
~~~~~~~~~~~~~~~~

There is a completely new runtime system, aimed at integration with
Hugs.  Tons of cruft removed.  Some changes to code generation; things
typically run a bit faster as a result.

An overview of the new RTS can be found at

        http://www.dcs.gla.ac.uk/~simonm/rts.ps


Things to bear in mind
~~~~~~~~~~~~~~~~~~~~~~

- Concurrent Haskell is now the default.  No need to compile/download
  special libraries.

- Supported architectures: all the development has been done on x86
  (mainly FreeBSD/Linux) so this is the most stable environment.
  Sparc (Solaris) has also been mildly tested, and an Alpha port is in
  the works.  Everything else will need a little porting effort; we don't 
  have machines here, so any help would be greatly appreciated.

- Profiling doesn't work yet (don't try to build way 'p').  The same goes
  for ticky-ticky and parallel builds.

- Code is faster and smaller, but the current two-space garbage
  collector is slower than 3.02's generational collector.

- The -H rts option is now ignored.  Instead there are two options for
  controlling the heap size:
        
        -m<size>        The minimum allocation area size (default: 256k)
        -M<size>        The maximum heap size (default: 64M)

  the heap will grow and shrink using these two parameters.  Use +RTS -Sstderr
  to watch the action.

- CAFs are now garbage collected.

- The -K stack size option is still in use, but stacks now start off
  small and grow as needed.  The default -K value is 1M.

- We now use GMP 2.02, and attempt to use an already-installed copy if
  available.  If you have GMP on your system but the configure script doesn't
  detect it, we'd like to know.

- There might be some small build problems.  One known problem is that
  the build can stop in the gmp directory: just cd into ghc/rts/gmp and
  type 'make' to carry on.

- The documentation still hasn't been updated!

- The compiler is slightly faster, but sometimes needs more heap.  If
  you have an example where this is the case, please let us know.

- Otherwise most things work as before.

Reply via email to