GHC plans for 8.2.1

This page is our road-map for what will be in 8.2.

We expect GHC 8.2 to be principally a consolidation release, in which we settle down and flesh out existing features, rather than introduce major new features. In particular, we would like to work on performance, especially of the compiler itself.

  • We hope to incorporate all the "Landed" and "In-flight" stuff under "Release highlights" below.
  • We'll include (or at least review) all patches in tickets in "Status: patch" below.
  • We will address all the tickets under "Status: new" below with "highest" or "high" priority. We love help to do more, but there are far too many "normal" tickets to make any promises.

If you believe your favourite thing belongs in this list, but isn't there, please yell. If it's not in the road map, it probably won't get done. Without a lot of support, many things in the road map won't get done either, so we need your help!

Current status

As of March 27 all of the major changes have landed in the tree. However, there are a variety of smaller tasks, including some late-breaking regression fixes, which need to be resolved.


Very tentative: Release candidate by late March 2017. Release in July 2017.

Libraries Status

See Libraries

Release highlights

Below are the major highlights of 8.2.

Compile time improvements

  • A variety of compile-time improvements.

Front-end changes

  • Indexed Typeable representations Typeable/BenGamari (Ben Gamari, Simon Peyton Jones, et al). While GHC has long supported runtime type reflection through the Typeable typeclass, its current incarnation requires care to use, providing little in the way of type-safety. For this reason the implementation of types like Data.Dynamic must be implemented in terms of unsafeCoerce with no compiler verification.

GHC 8.2 will address this by introducing indexed type representations, leveraging the type-checker to verify programs using type reflection. This allows facilities like Data.Dynamic to be implemented in a fully type-safe manner. See the paper for an description of the proposal and the Wiki for the current status of the implementation.

  • Deriving:
    • Deriving strategies (Ryan Scott): grant users the ability to choose explicitly how a class should be derived (using a built-in algorithm, GeneralizedNewtypeDeriving, DeriveAnyClass, or otherwise), addressing #10598.
  • Levity polymorphism. Richard E is actively involved in consolidating the implementation of levity polymorphism; see LevityPolymorphism. This will not include resolving the Constraint vs * debate #11715.
  • Backpack (Edward Z Yang) has been merged into GHC 8.2. However, at this point, it has only really been seriously used by Edward, and so it really needs testing! For up-to-date links to documentation and reference material, see Backpack
  • Exhaustiveness checking
    • Exhaustiveness checking for EmptyCases (Phab:D2105), addressing #10746.
    • Exhaustiveness checking for pattern synonyms, including the ability to define sets of synonyms that constitute a complete match, addressing #8779 (Matthew Pickering),
  • Overloaded record fields (Adam Gundry, Phab:D2708, Phab:D3144): Changes to IsLabel class used by OverloadedLabels extension, plus the addition of a HasField class supporting polymorphism over record field selectors, but no OverloadedRecordFields extension or IsLabel x (r -> a) instance. See the proposal and discussion for more details.
  • Unpacked sum types (Ömer Sinan Ağacan, wiki): Allowing for efficient, unpacked representation of sum data types.

Back-end and runtime system

  • Compact regions (Giovanni Campagna, Edward Yang, Phab:D1264, paper). This runtime system feature allows a referentially "closed" set of heap objects to be collected into a "compact region", allowing cheaper garbage collection, heap-object sharing between processes, and the possibility of inexpensive serialization. Use the compact library to get access to this feature!
  • Refactoring and improvements to the cost-center profiler (Ben Gamari, Phab:D1722): Allow heap profiler samples to be directed to the GHC eventlog, allowing correlation with other program events, enabling easier analysis by tooling and eventual removal of the old, rather crufty .hp profile format.
  • Support for NUMA systems (Simon Marlow, in-progress). The aim is to reduce the number of remote memory accesses for multi-socket systems that have a mixture of local and remote memory.
  • Experimental changes to the scheduler (Simon Marlow, in progress) that enable the number of threads used for GC to be lower than the -N setting.
  • Improved idle CPU usage: A long-standing regression (#11965) resulting in unnecessary wake-ups in an otherwise idle program was fixed. This should lower CPU utilization and improve power consumption for some programs.
  • Further improvements to debugging information (Ben Gamari): There are still a number of outstanding issues with GHC's DWARF implementation, some of which even carry the potential to crash the runtime system during stacktrace collection. GHC 8.2 will hopefully have these issues resolved, allowing debugging - TODO information to be used by end-user code in production.

With stable stack unwinding support comes a number of opportunities for new serial and parallel performance analysis tools (e.g. statistical profiling) and debugging. As GHC's debugging information improves, we expect to see tooling developed to support these applications. See the DWARF status page for further information.

Optimiser and intermediate language

  • Implement join points (Luke Maurer). This makes the compiler's join points optimization more robust, resulting in significantly better code generation in some cases.

Library changes

  • Merge Bifoldable and Bitraversable into base, addressing #10448 (Edward Kmett, Ryan Scott)

Build system and miscellaneous changes

  • Deterministic builds DeterministicBuilds. Given the same environment, file and flags produce ABI compatible binaries. (Bartosz Nitka, in-progress)

Tickets marked merge with no milestone

Tickets slated for 8.2.1




Last modified 4 weeks ago Last modified on Jul 21, 2017 9:48:14 PM