1.4. Release notes for version 6.0

1.4.1. User-visible compiler changes

1.4.2. User-visible interpreter (GHCi) changes

  • Loading a Main module that does not define main is no longer an error, although GHCi will still emit a warning in this case.

1.4.3. User-visible library changes

  • Hierarchical libraries are now available without needing to specify an explicit -package flag. There are some exceptions to this rule (see Section 4.8.1, “Using Packages ”), but if you stick to GHCi and --make mode then there will normally be no need to specify -package options at all.

    Non-hierarchical libraries (i.e. hslibs libraries) still need to be explicitly requested with -package options.

  • The Posix library has been rewritten. It is now a hierarchical library rooted at System.Posix, and has some additions aimed at supporting the latest revision of the POSIX standard (IEEE Std 1003.1-2001). See the unix package for details.

    The old posix package is still available for backwards compatibility, but is deprecated and will be removed in a future release.

  • Data.IORef: Added atomicModifyIORef.

  • System.Cmd: Added rawSystem.

  • System.Environment: Added withArgs and withProgName.

  • Network.Socket: Added sendFd and recvFd.

  • The Readline library has moved to System.Console.Readline, and is in a package of its own (readline).

  • The non-hierarchical versions of the FFI libraries are now all available without needing to specify -package lang (they are actually now in the haskell98 package, which is available by default).

  • Network.BSD: symlink and readline are now deprecated; use System.Posix.createSymbolicLink and System.Posix.readSymbolicLink respectively.

  • Control.Exception: Added mapException.

  • Data.Dynamic: various changes to make the implementation of Typeable more efficient. This entails some changes to the interface, and affects how instances of Typeable are defined.

  • Data.Tree is a new library for trees.

  • Data.Graph is a new library for graphs.

  • System.IO: Removed bracket and bracket_ (use the versions from Control.Exception instead).

  • System.IO: The IOError type is now a synonym for IOException, whereas previously it was a synonym for Exception. This has various consequences, one of which is that the types of System.IO.catch and Control.Exception.catch are now different (useful, because they do different things).

  • System.IO.Error: added annotateIOError, modifyIOError, and ioeSet{ErrorType,ErrorString,Handle,FileName}.

  • Text.ParserCombinators.ReadP: lots of updates.

  • Control.Monad.Monoid is now Data.Monoid.

  • Data.PackedString: added joinPS, unwordsPS and unlinesPS.

  • Data.HashTable is a new dynamic hash-table implementation.

  • Added System.Sendfile.

  • Added Foreign.Marshal.Pool.

  • Data.Bits: shiftL, shiftR, rotateL, and rotateR are now methods of the Bite class.

  • The FFI libraries now conform to the latest version of the FFI spec:

1.4.4. Experimental features

  • The Data class provides for generic data traversals and folds; see Data.Generics. Data can be derived for arbitrary datatypes. The Data class is still experimental, so its contents may change in the future.

  • Several bugs have been fixed in the threaded RTS, and it should now be rather more robust (it should still be considered experimental, however).

1.4.5. Internal changes

  • Sweeping changes to the compiler and runtime system to change the evaluation model from “push/enter” to “eval/apply”. The bottom line is that the compiler is now more portable and some of the complexity is now more centralised, while performance and binary sizes remain about the same.

    A paper describing these changes can be found here.

  • The test suite is now driven by a Python script and is rather more flexible and robust. It now supports building tests several different "ways", and as a result we now run each test with optimisation, profiling, native code generation, and GHCi in addition to the vanilla way.

  • The build system now supports bootstrapping the compiler in a single build tree. By default, typing make at the top level will bootstrap the compiler once to create a stage-2 compiler. See the Building Guide for more details.

  • The RTS debugging flags are no longer represented by a bitfield and now have single-character names. For example, to turn on scheduler debugging output, use -Ds rather than -D1.

  • The compiler no longer requires any packages from hslibs to bootstrap. It is enough to compile fptools/libraries before building the stage 2 compiler.