Release notes for version 7.8.1 The significant changes to the various parts of the compiler are listed in the following sections. There have also been numerous bug fixes and performance improvements over the 7.6 branch. Highlights The highlights, since the 7.6 branch, are: GHC now supports "type holes" with the TypeHoles extension. When enabled, the unbound literal _ may be used during development in place of a regular identifier, and GHC will respond with the type necessary to "fill in the hole." TODO FIXME: reference. It is now possible to declare a 'closed' type family when using the TypeFamilies extension. A closed type family cannot have any instances created other than the ones in its definition. TODO FIXME: reference. Use of the GeneralizedNewtypeDeriving extension is now subject to role checking, to ensure type safety of the derived instances. As this change increases the type safety of GHC, it is possible that some code that previously compiled will no longer work. TODO FIXME: reference. GHC now supports overloading list literals using the new OverloadedLists extension. TODO FIXME: reference. There has been significant overhaul of the type inference engine and constraint solver. TODO FIXME: reference. By default, GHC will now unbox all "small" strict fields in a data type. A "small" data type is one whose size is equivalent to or smaller than the native word size of the machine. This means you no longer have to specify UNPACK pragmas for e.g. strict Int fields. This also applies to floating-point values. GHC now has a brand-new I/O manager that scales significantly better for larger workloads compared to the previous one. It should scale linearly up to approximately 32 cores. The LLVM backend now supports 128bit SIMD operations. This is now exploited in both the vector and dph packages, exposing a high level interface. TODO FIXME: reference. This is only available with the LLVM backend. The new code generator, after significant work by many individuals over the past several years, is now enabled by default. This is a complete rewrite of the STG to Cmm transformation. In general, your programs may get slightly faster. The old code generator has been removed completely. GHC now has substantially better support for cross compilation. In particular, GHC now has all the necessary patches to support cross compilation to Apple iOS, using the LLVM backend. TODO FIXME: reference. PrimOps for comparing unboxed values now return Int# instead of Bool. New PrimOps' names end with $# for operators and I# for ordinary names, e.g. ==$# compares Int#s for equality and eqCharI# does the same for Char#s. Old PrimOps have been removed and turned into wrappers. See this GHC wiki page for instructions how to update your existing code. New PrimOps for atomic memory operations. The casMutVar# PrimOp was introduced in GHC 7.2 (debugged in 7.4). This release also includes additional PrimOps for compare-and-swap (casArray# and casIntArray#) and one for fetch-and-add (fetchAddIntArray#). TODO: mention dynamic changes TODO: mention new Typeable and AutoDeriveTypeable Full details Language There is a new extension, NullaryTypeClasses, which allows you to declare a type class without any parameters. There is a new extension, NumDecimals, which allows you to specify an integer using compact "floating literal" syntax. This lets you say things like 1.2e6 :: Integer instead of 1200000 There is a new extension, NegativeLiterals, which will cause GHC to interpret the expression -123 as fromIntegral (-123). Haskell 98 and Haskell 2010 both specify that it should instead desugar to negate (fromIntegral 123) The IncoherentInstances extension has seen a behavioral change, and is now 'liberated' and less conservative during instance resolution. This allows more programs to compile than before. Now, IncoherentInstances will always pick an arbitrary matching instance, if multiple ones exist. Compiler GHC can now build both static and dynamic object files at the same time in a single compilation pass, when given the -dynamic-too flag. This will produce both a statically-linkable .o object file, and a dynamically-linkable .dyn_o file. The output suffix of the dynamic objects can be controlled by the flag -dynosuf. Note that GHC still builds statically by default. GHC now supports a --show-options flag, which will dump all of the flags it supports to standard out. GHC now supports warning about overflow of integer literals, enabled by -fwarn-overflowed-literals. It is enabled by default It's now possible to switch the system linker on Linux (between GNU gold and GNU ld) at runtime without problem. The -fwarn-dodgy-imports flag now warns in the case an import statement hides an entity which is not exported. The LLVM backend was overhauled and rewritten, and should hopefully be easier to maintain and work on in the future. GHCi GHCi now supports a prompt2 setting, which allows you to customize the continuation prompt of multi-line input. TODO FIXME: reference. The new :shows paths command shows the current working directory and the current search path for Haskell modules. Template Haskell TODO FIXME Runtime system The RTS linker can now unload object code at runtime (when using the GHC API ObjLink module.) Previously, GHC would not unload the old object file, causing a gradual memory leak as more objects were loaded over time. Note that this change in unloading behavior only affects statically linked binaries, and not dynamic ones. By default, the maximum stack size in the runtime system is now infinite. This is controlled by the +RTS -K flag, which was previously defaulted to 8MB. In general, this will allow more programs to run as they will no longer stack overflow as quickly, although they may use much more memory. Note that you will still eventually encounter a stack overflow - when the heap is completely exhausted, as stacks are serviced from the storage manager. This will cause a runtime abort after invoking StackOverflowHook. The performance of StablePtrs and StableNames has been improved. Build system GHC >= 7.4 is now required for bootstrapping. GHC can now be built with Clang, and use Clang as the preprocessor for Haskell code. Only Clang version 3.4svn is reliably supported. Libraries There have been some changes that have effected multiple libraries: TODO FIXME The following libraries have been removed from the GHC tree: TODO FIXME The following libraries have been added to the GHC tree: TODO FIXME array Version number XXXX (was XXXX) base Version number 4.7.0.0 (was 4.6.0.1) The Control.Category module now has the PolyKinds extension enabled, meaning that instances of Category no longer need be of kind * -> * -> * There are now Foldable and Traversable instances for Either a and (,) a Control.Concurrent.MVar has a new implementation of readMVar, which fixes a long-standing bug where readMVar is only atomic if there are no other threads running putMVar. readMVar now is atomic, and is guaranteed to return the value from the first putMVar. There is also a new tryReadMVar which is a non-blocking version. There are now byte endian-swapping primitives available in Data.Word, which use optimized machine instructions when available. bin-package-db This is an internal package, and should not be used. binary Version number XXXX (was XXXX) bytestring Version number XXXX (was XXXX) Cabal Version number XXXX (was XXXX) containers Version number XXXX (was XXXX) deepseq Version number XXXX (was XXXX) directory Version number XXXX (was XXXX) filepath Version number XXXX (was XXXX) ghc-prim Version number XXXX (was XXXX) haskell98 Version number XXXX (was XXXX) haskell2010 Version number XXXX (was XXXX) hoopl Version number XXXX (was XXXX) hpc Version number XXXX (was XXXX) integer-gmp Version number XXXX (was XXXX) old-locale Version number XXXX (was XXXX) old-time Version number XXXX (was XXXX) process Version number XXXX (was XXXX) template-haskell Version number XXXX (was XXXX) time Version number XXXX (was XXXX) unix Version number 2.7.0.0 (was 2.6.0.0) A crash in getGroupEntryForID (and related functions like getUserEntryForID and getUserEntryForName) in multi-threaded applications has been fixed. The functions getGroupEntryForID and getUserEntryForID now fail with a isDoesNotExist error when the specified ID cannot be found. Win32 Version number XXXX (was XXXX)