diff options
Diffstat (limited to 'docs/users_guide')
| -rw-r--r-- | docs/users_guide/8.2.1-notes.rst | 203 |
1 files changed, 105 insertions, 98 deletions
diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst index 9dccc335d7..e2231ba83f 100644 --- a/docs/users_guide/8.2.1-notes.rst +++ b/docs/users_guide/8.2.1-notes.rst @@ -10,44 +10,80 @@ performance improvements over the 8.0 branch. Highlights ---------- -The highlights since the 8.0 branch are: +The highlights since the 8.0 release include: + +- A new, more expressive ``Typeable`` mechanism, ``Type.Reflection`` + +- Colorful error messages with caret diagnostics -- TODO FIXME - SCC annotations can now be used for declarations. + - Heap overflow throws an exception in certain circumstances. +- Improved code generation of join points + +- Deriving strategies + +- Compact regions support, allowing efficient garbage collection of large heaps + +- More reliable DWARF debug information + Full details ------------ -- Heap overflow throws a catchable exception, provided that it was detected - by the RTS during a GC cycle due to the program exceeding a limit set by - ``+RTS -M``, and not due to an allocation being refused by the operating - system. This exception is thrown to the same thread that receives - ``UserInterrupt`` exceptions, and may be caught by user programs. +Package system +~~~~~~~~~~~~~~ + +- The long awaited Backpack module system is now fully usable. See + :ghc-wiki:`the GHC Wiki <Backpack>` for details. Language ~~~~~~~~ -- TODO FIXME. - - Pattern synonym signatures can now be applied to multiple patterns, just like value-level binding signatures. See :ref:`patsyn-typing` for details. +- It is now possible to explicitly pick a strategy to use when deriving a + class instance using the :ghc-flag:`-XDerivingStrategies` language extension + (see :ref:`deriving-strategies`). + +- The new :ghc-flag:`-XUnboxedSums` extension allows more efficient representation + of sum data. Some future GHC release will have support for worker/wrapper + transformation of sum arguments and constructor unpacking. + +- Support for overloaded record fields via a new ``HasField`` class and + associated compiler logic (see :ref:`record-field-selector-polymorphism`) + Compiler ~~~~~~~~ -- TODO FIXME. - -- A bug in the :ghc-flag:`-XApplicativeDo` extension resulting in strict pattern - matches to be performed lazily (:ghc-ticket:`13875`) has been fixed. Note that - this means some programs which previously typechecked under ``ApplicativeDo`` - will no longer as it is not possible to implement strict pattern matching - using only ``Applicative``. +- GHC will now use ``ld.gold`` or ``ld.lld`` instead of the system's default + ``ld``, if available. Linker availability will be evaluated at ``configure`` + time. The user can manually override which linker to use by passing the ``LD`` + variable to ``configure``. You can revert to the old behavior of using the + system's default ``ld`` by passing the ``--disable-ld-override`` flag to + ``configure``. + +- GHC now uses section splitting (i.e. :ghc-flag:`-split-sections`) instead of + object splitting (i.e. :ghc-flag:`-split-objs`) as the default mechanism for + linker-based dead code removal. While the effect is the same, split sections + tends to produce significantly smaller objects than split objects and more + closely mirrors the approach used by other compilers. Split objects will + be deprecated and eventually removed in a future GHC release. + + Note that some versions of the ubiquitous BFD linker exhibit performance + trouble with large libraries with section splitting enabled (see + :ghc-ticket:`13739`). It is recommended that you use either the ``gold`` or + ``lld`` linker if you observe this. This will require that you install one of + these compilers, rerun ``configure``, and reinstall GHC. + + Split sections is enabled by default in the official binary distributions for + platforms that support it. - Old profiling flags ``-auto-all``, ``-auto``, and ``-caf-all`` are deprecated and their usage provokes a compile-time warning. -- Support for adding cost centres to declarations is added. The same `SCC` +- Support for adding cost centres to declarations is added. The same ``SCC`` syntax can be used, in addition to a new form for specifying the cost centre name. See :ref:`scc-pragma` for examples. @@ -57,10 +93,6 @@ Compiler signatures' contexts. Otherwise, the typechecker will reject that class's definition. See :ref:`class-default-signatures` for further details. -- It is now possible to explicitly pick a strategy to use when deriving a - class instance using the :ghc-flag:`-XDerivingStrategies` language extension - (see :ref:`deriving-strategies`). - - :ghc-flag:`-XDeriveAnyClass` is no longer limited to type classes whose argument is of kind ``*`` or ``* -> *``. @@ -68,7 +100,7 @@ Compiler been completely overhauled. The instance context is now inferred using the type signatures (and default type signatures) of the derived class's methods instead of using the datatype's definition, which often led to - overconstrained instances or instances that didn't typecheck (or worse, + over-constrained instances or instances that didn't typecheck (or worse, triggered GHC panics). See the section on :ref:`DeriveAnyClass <derive-any-class>` for more details. @@ -118,7 +150,7 @@ Compiler directive on undefined identifiers. - GHC will no longer automatically infer the kind of higher-rank type synonyms; - you must explicitly annotate the synonym with a kind signature. + you must explicitly explicitly annotate the synonym with a kind signature. For example, given:: data T :: (forall k. k -> Type) -> Type @@ -147,7 +179,7 @@ Compiler on feedback from tooling authors for the next release. - GHC is now able to better optimize polymorphic expressions by using known - superclass dictionaries where possible. Some examples: + superclass dictionaries where possible. Some examples: :: -- uses of `Monad IO` or `Applicative IO` here are improved foo :: MonadBaseControl IO m => ... @@ -155,7 +187,7 @@ Compiler -- uses of `Monoid MyMonoid` here are improved bar :: MonadWriter MyMonoid m => ... -- GHC now derives the definition of ``<$`` when using ``DeriveFunctor`` +- GHC now derives the definition of ``<$`` when using :ghc-flag:`DeriveFunctor` rather than using the default definition. This prevents unnecessary allocation and a potential space leak when deriving ``Functor`` for a recursive type. @@ -166,12 +198,12 @@ Compiler - GHC now ignores ``RULES`` for data constructors (:ghc-ticket:`13290`). Previously, it accepted:: - "NotAllowed" forall x. Just x = e + {-# RULES "NotAllowed" forall x. Just x = e #-} That rule will no longer take effect, and a warning will be issued. ``RULES`` may still mention data constructors, but not in the outermost position:: - "StillWorks" forall x. f (Just x) = e + {-# RULES "StillWorks" forall x. f (Just x) = e #-} - Type synonyms can no longer appear in the class position of an instance. This means something like this is no longer allowed: :: @@ -210,8 +242,6 @@ Compiler GHCi ~~~~ -- TODO FIXME. - - Added :ghc-flag:`-flocal-ghci-history` which uses current directory for `.ghci-history`. - Added support for :ghc-flag:`-XStaticPointers` in interpreted modules. Note, however, @@ -220,8 +250,6 @@ GHCi Template Haskell ~~~~~~~~~~~~~~~~ -- TODO FIXME. - - Reifying types that contain unboxed tuples now works correctly. (Previously, Template Haskell reified unboxed tuples as boxed tuples with twice their appropriate arity.) @@ -281,23 +309,29 @@ Template Haskell Runtime system ~~~~~~~~~~~~~~ -- TODO FIXME. +- Heap overflow throws a catchable exception, provided that it was detected + by the RTS during a GC cycle due to the program exceeding a limit set by + ``+RTS -M`` (see :rts-flag:`-M`), and not due to an allocation being refused + by the operating system. This exception is thrown to the same thread that + receives ``UserInterrupt`` exceptions, and may be caught by user programs. - Added support for *Compact Regions*, which offer a way to manually move long-lived data outside of the heap so that the garbage collector does not have to trace it repeatedly. Compacted data can also be serialized, stored, and deserialized again later by the same - program. For more details see the :compact-ref:`GHC.Compact - <GHC-Compact.html>` module. + program. For more details see the :ghc-compact-ref:`GHC.Compact + <GHC-Compact.html>` module. Moreover, see the ``compact`` library on `Hackage + <https://hackage.haskell.org/package/compact>`_ for a high-level interface. - There is new support for improving performance on machines with a Non-Uniform Memory Architecture (NUMA). See :rts-flag:`--numa`. This is supported on Linux and Windows systems. - The garbage collector can be told to use fewer threads than the - global number of capabilities set by :rts-flag:`-N`. See - :rts-flag:`-qn`, and a `blog post - <http://simonmar.github.io/posts/2016-12-08-Haskell-in-the-datacentre.html>`_ + global number of capabilities set by :rts-flag:`-N`. By default, the garbage + collector will use a number of threads equal to the lesser of the global number + of capabilities or the number of physical cores. See :rts-flag:`-qn`, and a + `blog post <http://simonmar.github.io/posts/2016-12-08-Haskell-in-the-datacentre.html>`_ that describes this. - The :ref:`heap profiler <prof-heap>` can now emit heap census data to the GHC @@ -319,20 +353,10 @@ Runtime system - advapi32, shell32 and user32 are now automatically loaded in GHCi. libGCC is also loaded when a depencency requires it. See :ghc-ticket:`13189`. -Build system -~~~~~~~~~~~~ - -- TODO FIXME. - -Package system -~~~~~~~~~~~~~~ - -- TODO FIXME. - hsc2hs ~~~~~~ -- TODO FIXME. +- Version number 0.68.2 Libraries --------- @@ -340,8 +364,7 @@ Libraries array ~~~~~ -- Version number XXXXX (was 0.5.0.0) - +- Version number 0.5.2.0 (was 0.5.0.0) .. _lib-base: @@ -379,47 +402,37 @@ See ``changelog.md`` in the ``base`` package for full release notes. binary ~~~~~~ -- Version number XXXXX (was 0.7.1.0) +- Version number 0.8.5.1 (was 0.7.1.0) bytestring ~~~~~~~~~~ -- Version number XXXXX (was 0.10.4.0) +- Version number 0.10.8.2 (was 0.10.4.0) Cabal ~~~~~ -- Version number XXXXX (was 1.18.1.3) +- Version number 2.0.0.0 (was 1.24.2.0) containers ~~~~~~~~~~ -- Version number XXXXX (was 0.5.4.0) - -compact -~~~~~~~ - -The ``compact`` library provides an experimental API for placing immutable -data structures into a contiguous memory region. Data in these regions -is not traced during garbage collection and can be serialized to disk or -over the network. - -- Version number 1.0.0.0 (newly added) +- Version number 0.5.10.2 (was 0.5.4.0) deepseq ~~~~~~~ -- Version number XXXXX (was 1.3.0.2) +- Version number 1.4.3.0 (was 1.3.0.2) directory ~~~~~~~~~ -- Version number XXXXX (was 1.2.0.2) +- Version number 1.3.0.2 (was 1.2.0.2) filepath ~~~~~~~~ -- Version number XXXXX (was 1.3.0.2) +- Version number 1.4.1.2 (was 1.3.0.2) ghc ~~~ @@ -431,62 +444,50 @@ ghc-boot - This is an internal package. Use with caution. -- TODO FIXME. +ghc-compact +~~~~~~~~~~~ + +The ``ghc-compact`` library provides an experimental API for placing immutable +data structures into a contiguous memory region. Data in these regions is not +traced during garbage collection and can be serialized to disk or over the +network. + +- Version number 0.1.0.0 (newly added) ghc-prim ~~~~~~~~ -- Version number XXXXX (was 0.3.1.0) +- Version number 0.5.1.0 (was 0.3.1.0) - Added new ``isByteArrayPinned#`` and ``isMutableByteArrayPinned#`` operation. - New function ``noinline`` in ``GHC.Magic`` lets you mark that a function should not be inlined. It is optimized away after the simplifier runs. -haskell98 -~~~~~~~~~ - -- Version number XXXXX (was 2.0.0.3) - -haskell2010 -~~~~~~~~~~~ - -- Version number XXXXX (was 1.1.1.1) - hoopl ~~~~~ -- Version number XXXXX (was 3.10.0.0) +- Version number 3.10.2.2 (was 3.10.2.1) hpc ~~~ -- Version number XXXXX (was 0.6.0.1) +- Version number 0.6.0.3 (was 0.6.0.2) integer-gmp ~~~~~~~~~~~ -- Version number XXXXX (was 0.5.1.0) - -old-locale -~~~~~~~~~~ - -- Version number XXXXX (was 1.0.0.6) - -old-time -~~~~~~~~ - -- Version number XXXXX (was 1.1.0.2) +- Version number 1.0.0.1 (was 1.0.0.1) process ~~~~~~~ -- Version number XXXXX (was 1.2.0.0) +- Version number 1.6.1.0 (was 1.4.3.0) template-haskell ~~~~~~~~~~~~~~~~ -- Version number XXXXX (was 2.9.0.0) +- Version 2.12.0.0 (was 2.11.1.0) - Added support for unboxed sums :ghc-ticket:`12478`. @@ -495,19 +496,25 @@ template-haskell time ~~~~ -- Version number XXXXX (was 1.4.1) +- Version number 1.8.0.1 (was 1.6.0.1) unix ~~~~ -- Version number XXXXX (was 2.7.0.0) +- Version number 2.7.2.2 (was 2.7.2.1) Win32 ~~~~~ -- Version number XXXXX (was 2.3.0.1) +- Version number 2.5.4.1 (was 2.3.1.1) Known bugs ---------- -- TODO FIXME +- At least one known program regresses in compile time significantly over 8.0. + See :ghc-ticket:`13535`. + +- Some uses of type applications may cause GHC to panic. See :ghc-ticket:`13819`. + +- The compiler may loop during typechecking on some modules using + :ghc-flag:`-XUndecidableInstances`. See :ghc-ticket:`13943`. |
