diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst deleted file mode 100644 index d46f08dd94656449d0b7caf29839e884ec7f9acd..0000000000000000000000000000000000000000 --- a/docs/users_guide/8.2.1-notes.rst +++ /dev/null @@ -1,527 +0,0 @@ -.. _release-8-2-1: - -Release notes for version 8.2.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 8.0 branch. - -Highlights ----------- - -The highlights since the 8.0 release include: - -- A new, more expressive ``Typeable`` mechanism, ``Type.Reflection`` - -- Colorful error messages with caret diagnostics - -- 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 ------------- - -Package system -~~~~~~~~~~~~~~ - -- The long awaited Backpack module system is now fully usable. See - :ghc-wiki:`the GHC Wiki <Backpack>` for details. - -Language -~~~~~~~~ - -- 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`) - -- GHC now recognizes the ``COMPLETE`` language pragma, allowing the user to - specify sets of patterns (including pattern synonyms) which constitute a - complete pattern match. See :ref:`complete-pragma` for details. - -Compiler -~~~~~~~~ - -- 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`` - syntax can be used, in addition to a new form for specifying the cost centre - name. See :ref:`scc-pragma` for examples. - -- GHC is now much more particular about :ghc-flag:`-XDefaultSignatures`. The - type signature for a default method of a type class must now be the same as - the corresponding main method's type signature modulo differences in the - signatures' contexts. Otherwise, the typechecker will reject that class's - definition. See :ref:`class-default-signatures` for further details. - -- :ghc-flag:`-XDeriveAnyClass` is no longer limited to type classes whose - argument is of kind ``*`` or ``* -> *``. - -- The means by which :ghc-flag:`-XDeriveAnyClass` infers instance contexts has - 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 - 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. - -- GHC now allows standalone deriving using :ghc-flag:`-XDeriveAnyClass` on - any data type, even if its data constructors are not in scope. This is - consistent with the fact that this code (in the presence of - :ghc-flag:`-XDeriveAnyClass`): :: - - deriving instance C T - - is exactly equivalent to: :: - - instance C T - - and the latter code has no restrictions about whether the data constructors - of ``T`` are in scope. - -- :ghc-flag:`-XGeneralizedNewtypeDeriving` now supports deriving type classes - with associated type families. See the section on - :ref:`GeneralizedNewtypeDeriving and associated type families - <gnd-and-associated-types>`. - -- :ghc-flag:`-XGeneralizedNewtypeDeriving` will no longer infer constraints - when deriving a class with no methods. That is, this code: :: - - class Throws e - newtype Id a = MkId a - deriving Throws - - will now generate this instance: :: - - instance Throws (Id a) - - instead of this instance: :: - - instance Throws a => Throws (Id a) - - This change was motivated by the fact that the latter code has a strictly - redundant ``Throws a`` constraint, so it would emit a warning when compiled - with :ghc-flag:`-Wredundant-constraints`. The latter instance could still - be derived if so desired using :ghc-flag:`-XStandaloneDeriving`: :: - - deriving instance Throws a => Throws (Id a) - -- Add warning flag :ghc-flag:`-Wcpp-undef` which passes ``-Wundef`` to the C - pre-processor causing the pre-processor to warn on uses of the ``#if`` - 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. - For example, given:: - - data T :: (forall k. k -> Type) -> Type - - to define a synonym of ``T``, you must write:: - - type TSyn = (T :: (forall k. k -> Type) -> Type) - -- The Mingw-w64 toolchain for the Windows version of GHC has been updated. GHC now uses - `GCC 6.2.0` and `binutils 2.27`. - -- Previously, :ghc-flag:`-Wmissing-methods` would not warn whenever a type - class method beginning with an underscore was not implemented in an instance. - For instance, this code would compile without any warnings: :: - - class Foo a where - _Bar :: a -> Int - - instance Foo Int - - :ghc-flag:`-Wmissing-methods` will now warn that ``_Bar`` is not implemented - in the ``Foo Int`` instance. - -- A new flag :ghc-flag:`-ddump-json` has been added. This flag dumps compiler - output as JSON documents. It is experimental and will be refined depending - 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: :: - - -- uses of `Monad IO` or `Applicative IO` here are improved - foo :: MonadBaseControl IO m => ... - - -- uses of `Monoid MyMonoid` here are improved - bar :: MonadWriter MyMonoid m => ... - -- GHC now derives the definition of ``<$`` when using :ghc-flag:`-XDeriveFunctor` - rather than using the default definition. This prevents unnecessary - allocation and a potential space leak when deriving ``Functor`` for - a recursive type. - -- The :ghc-flag:`-XExtendedDefaultRules` extension now defaults multi-parameter - typeclasses. See :ghc-ticket:`12923`. - -- GHC now ignores ``RULES`` for data constructors (:ghc-ticket:`13290`). - Previously, it accepted:: - - {-# 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:: - - {-# 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: :: - - type ReadShow a = (Read a, Show a) - instance Read Foo - instance Show Foo - instance ReadShow Foo -- illegal - - See :ghc-ticket:`13267`. - -- Validity checking for associated type family instances has tightened - somewhat. Before, this would be accepted: :: - - class Foo a where - type Bar a - - instance Foo (Either a b) where - type Bar (Either c d) = d -> c - - This is now disallowed, as the type variables used in the `Bar` instance do - not match those in the instance head. This instance can be fixed by changing - it to: :: - - instance Foo (Either a b) where - type Bar (Either a b) = b -> a - - See the section on :ref:`associated type family instances <assoc-data-inst>` - for more information. - -- A bug involving the interaction between :ghc-flag:`-XMonoLocalBinds` and - :ghc-flag:`-XPolyKinds` has been fixed. This can cause some programs to fail - to typecheck in case explicit kind signatures are not provided. See - :ref:`kind-generalisation` for an example. - -GHCi -~~~~ - -- Added :ghc-flag:`-flocal-ghci-history` which uses current directory for `.ghci-history`. - -- Added support for :ghc-flag:`-XStaticPointers` in interpreted modules. Note, however, - that ``static`` expressions are still not allowed in expressions evaluated in the REPL. - -- Added support for :ghci-cmd:`:type +d` and :ghci-cmd:`:type +v`. (:ghc-ticket:`11975`) - -Template Haskell -~~~~~~~~~~~~~~~~ - -- Reifying types that contain unboxed tuples now works correctly. (Previously, - Template Haskell reified unboxed tuples as boxed tuples with twice their - appropriate arity.) - -- Splicing singleton unboxed tuple types (e.g., ``(# Int #)``) now works - correctly. Previously, Template Haskell would implicitly remove the - parentheses when splicing, which would turn ``(# Int #)`` into ``Int``. - -- Add support for type signatures in patterns. (:ghc-ticket:`12164`) - -- Make quoting and reification return the same types. (:ghc-ticket:`11629`) - -- More kind annotations appear in the left-hand sides of reified closed - type family equations, in order to disambiguate types that would otherwise - be ambiguous in the presence of :ghc-flag:`-XPolyKinds`. - (:ghc-ticket:`12646`) - -- Quoted type signatures are more accurate with respect to implicitly - quantified type variables. Before, if you quoted this: :: - - [d| id :: a -> a - id x = x - |] - - then the code that Template Haskell would give back to you would actually be - this instead: :: - - id :: forall a. a -> a - id x = x - - That is, quoting would explicitly quantify all type variables, even ones - that were implicitly quantified in the source. This could be especially - harmful if a kind variable was implicitly quantified. For example, if - you took this quoted declaration: :: - - [d| idProxy :: forall proxy (b :: k). proxy b -> proxy b - idProxy x = x - |] - - and tried to splice it back in, you'd get this instead: :: - - idProxy :: forall k proxy (b :: k). proxy b -> proxy b - idProxy x = x - - Now ``k`` is explicitly quantified, and that requires turning on - :ghc-flag:`-XTypeInType`, whereas the original declaration did not! - - Template Haskell quoting now respects implicit quantification in type - signatures, so the quoted declarations above now correctly leave the - type variables ``a`` and ``k`` as implicitly quantified. - (:ghc-ticket:`13018` and :ghc-ticket:`13123`) - -- Looking up type constructors with symbol names (e.g., ``+``) now works - as expected (:ghc-ticket:`11046`) - - -Runtime system -~~~~~~~~~~~~~~ - -- 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 ⟨size⟩`), 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 :ghc-compact-ref:`GHC.Compact.` 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 ⟨x⟩`. 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 ⟨x⟩`, 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 - event log, allowing heap profiles to be correlated with other tracing events - (see :ghc-ticket:`11094`). - -- Some bugs have been fixed in the stack-trace implementation in the - profiler that sometimes resulted in incorrect stack traces and - costs attributed to the wrong cost centre stack (see :ghc-ticket:`5654`). - -- Added processor group support for Windows. This allows the runtime to allocate - threads to all cores in systems which have multiple processor groups. - (e.g. > 64 cores, see :ghc-ticket:`11054`) - -- Output of :ref:`Event log <rts-eventlog>` data can now be configured, - enabling external tools to collect and analyze the event log data while the - application is still running. - -- ``advapi32``, ``shell32`` and ``user32`` are now automatically loaded in GHCi. - ``libGCC`` is also loaded when a dependency requires it. See - :ghc-ticket:`13189`. - -hsc2hs -~~~~~~ - -- Version number 0.68.2 - -Libraries ---------- - -array -~~~~~ - -- Version number 0.5.2.0 (was 0.5.0.0) - -.. _lib-base: - -base -~~~~ - -See ``changelog.md`` in the ``base`` package for full release notes. - -- Version number 4.10.0.0 (was 4.9.0.0) - -- ``Data.Either`` now provides ``fromLeft`` and ``fromRight`` - -- ``Data.Type.Coercion`` now provides ``gcoerceWith``, which is analogous to - ``gcastWith`` from ``Data.Type.Equality``. - -- The ``Read1`` and ``Read2`` classes in ``Data.Functor.Classes`` have new - methods, ``liftReadList(2)`` and ``liftReadListPrec(2)``, that are defined in - terms of ``ReadPrec`` instead of ``ReadS``. This matches the interface - provided in GHC's version of the ``Read`` class, and allows users to write - more efficient ``Read1`` and ``Read2`` instances. - -- Add ``type family AppendSymbol (m :: Symbol) (n :: Symbol) :: Symbol`` to - ``GHC.TypeLits`` - -- Add ``GHC.TypeNats`` module with ``Natural``-based ``KnownNat``. The ``Nat`` - operations in ``GHC.TypeLits`` are a thin compatibility layer on top. - Note: the ``KnownNat`` evidence is changed from an ``Integer`` to a ``Natural``. - -- ``liftA2`` is now a method of the ``Applicative`` class. ``Traversable`` - deriving has been modified to use ``liftA2`` for the first two elements - traversed in each constructor. ``liftA2`` is not yet in the ``Prelude``, - and must currently be imported from ``Control.Applicative``. It is likely - to be added to the ``Prelude`` in the future. - -binary -~~~~~~ - -- Version number 0.8.5.1 (was 0.7.1.0) - -bytestring -~~~~~~~~~~ - -- Version number 0.10.8.2 (was 0.10.4.0) - -Cabal -~~~~~ - -- Version number 2.0.0.0 (was 1.24.2.0) - -containers -~~~~~~~~~~ - -- Version number 0.5.10.2 (was 0.5.4.0) - -deepseq -~~~~~~~ - -- Version number 1.4.3.0 (was 1.3.0.2) - -directory -~~~~~~~~~ - -- Version number 1.3.0.2 (was 1.2.0.2) - -filepath -~~~~~~~~ - -- Version number 1.4.1.2 (was 1.3.0.2) - -ghc -~~~ - -- Version number 8.2.1 - -ghc-boot -~~~~~~~~ - -- This is an internal package. Use with caution. - -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 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. - -hoopl -~~~~~ - -- Version number 3.10.2.2 (was 3.10.2.1) - -hpc -~~~ - -- Version number 0.6.0.3 (was 0.6.0.2) - -integer-gmp -~~~~~~~~~~~ - -- Version number 1.0.0.1 (was 1.0.0.1) - -process -~~~~~~~ - -- Version number 1.6.1.0 (was 1.4.3.0) - -template-haskell -~~~~~~~~~~~~~~~~ - -- Version 2.12.0.0 (was 2.11.1.0) - -- Added support for unboxed sums :ghc-ticket:`12478`. - -- Added support for visible type applications :ghc-ticket:`12530`. - -time -~~~~ - -- Version number 1.8.0.1 (was 1.6.0.1) - -unix -~~~~ - -- Version number 2.7.2.2 (was 2.7.2.1) - -Win32 -~~~~~ - -- Version number 2.5.4.1 (was 2.3.1.1) - -Known bugs ----------- - -- 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`. diff --git a/docs/users_guide/8.4.1-notes.rst b/docs/users_guide/8.4.1-notes.rst deleted file mode 100644 index 305f9629c0d5d1970b817bd156b59fa65ca8ef67..0000000000000000000000000000000000000000 --- a/docs/users_guide/8.4.1-notes.rst +++ /dev/null @@ -1,441 +0,0 @@ -.. _release-8-4-1: - -Release notes for version 8.4.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 8.2.1 release. - - -Highlights ----------- - -The highlights, since the 8.2.1 release, are: - -- GHC is now capable of deriving more instances - -- More refinement of the :ghc-flag:`-XTypeInType` story and improvements in type - error messages. - -- Further improvements in code generation - -- Many, many bug fixes. - - -Full details ------------- - -Language -~~~~~~~~ - -- Data families have been generalised a bit: a data family declaration can now - end with a kind variable ``k`` instead of ``Type``. Additionally, data/newtype - instance no longer need to list all the patterns of the family if they don't - wish to; this is quite like how regular datatypes with a kind signature can omit - some type variables. - -- There are now fewer restrictions regarding whether kind variables can appear - on the right-hand sides of type and data family instances. Before, there was - a strict requirements that all kind variables on the RHS had to be explicitly - bound by type patterns on the LHS. Now, kind variables can be *implicitly* - bound, which allows constructions like these: :: - - data family Nat :: k -> k -> * - -- k is implicitly bound by an invisible kind pattern - newtype instance Nat :: (k -> *) -> (k -> *) -> * where - Nat :: (forall xx. f xx -> g xx) -> Nat f g - - class Funct f where - type Codomain f :: * - instance Funct ('KProxy :: KProxy o) where - -- o is implicitly bound by the kind signature - -- of the LHS type pattern ('KProxy) - type Codomain 'KProxy = NatTr (Proxy :: o -> *) - -- Implicitly bidirectional pattern synonyms no longer allow bang patterns - (``!``) or irrefutable patterns (``~``) on the right-hand side. Previously, - this was allowed, although the bang patterns and irrefutable patterns would - be silently ignored when used in an expression context. This is now a proper - error, and explicitly bidirectional pattern synonyms should be used in their - stead. That is, instead of using this (which is an error): :: - - pattern StrictJust a = Just !a - - Use this: :: - - pattern StrictJust a <- Just !a where - StrictJust !a = Just a - -- GADTs with kind-polymorphic type arguments now require :ghc-flag:`-XTypeInType`. - For instance, consider the following, :: - - data G :: k -> * where - GInt :: G Int - GMaybe :: G Maybe - - In previous releases this would compile with :ghc-flag:`-XPolyKinds` alone due - to bug :ghc-ticket:`13391`. As of GHC 8.4, however, this requires - :ghc-flag:`-XTypeInType`. Note that since GADT kind signatures aren't generalized, - this will also require that you provide a :ref:`CUSK - <complete-kind-signatures>` by explicitly quantifying over the kind argument, - ``k``, :: - - data G :: forall k. k -> * where - GInt :: G Int - GMaybe :: G Maybe - -- The order in which type variables are quantified in GADT constructor type - signatures has changed. Before, if you had ``MkT`` as below: :: - - data T a where - MkT :: forall b a. b -> T a - - Then the type of ``MkT`` would (counterintuitively) be - ``forall a b. b -> T a``! Now, GHC quantifies the type variables in the - order that the users writes them, so the type of ``MkT`` is now - ``forall b a. b -> T a`` (this matters for :ghc-flag:`-XTypeApplications`). - -- The new :ghc-flag:`-XEmptyDataDeriving` extension allows deriving ``Eq``, - ``Ord``, ``Read``, and ``Show`` instances directly for empty data types, as - in ``data Empty deriving Eq``. (Previously, this would require the use of - :ghc-flag:`-XStandaloneDeriving` to accomplish.) - - One can also now derive ``Data`` instances directly for empty data types (as - in ``data Empty deriving Data``) without needing to use - :ghc-flag:`-XStandaloneDeriving`. However, since already requires a GHC - extension (:ghc-flag:`-XDeriveDataTypeable`), one does not need to enable - :ghc-flag:`-XEmptyDataDeriving` to do so. This also goes for other classes - which require extensions to derive, such as :ghc-flag:`-XDeriveFunctor`. - -- Hexadecimal floating point literals (e.g. ``0x0.1p4``), enabled with - :ghc-flag:`-XHexFloatLiterals`. See - :ref:`Hexadecimal floating point literals <hex-float-literals>` - for the full details. - -Compiler -~~~~~~~~ - -- LLVM code generator (e.g. :ghc-flag:`-fllvm`) compatible with LLVM releases in - the |llvm-version| series. - -- Add warning flag :ghc-flag:`-Wmissing-export-lists` which causes the type - checker to warn when a module does not include an explicit export list. - -- The ``configure`` script now no longer accepts ``--with-TOOL`` flags (e.g. - ``--with-nm``, ``--with-ld``, etc.). Instead, these are taken from environment - variables, as is typical in ``autoconf`` scripts. For instance, - ``./configure --with-nm=/usr/local/bin/nm`` turns into - ``./configure NM=/usr/local/bin/nm``. - -- Derived ``Functor``, ``Foldable``, and ``Traversable`` instances are now - optimized when their last type parameters have phantom roles. - Specifically, :: - - fmap _ = coerce - traverse _ x = pure (coerce x) - foldMap _ _ = mempty - - These definitions of ``foldMap`` and ``traverse`` are lazier than the ones we - would otherwise derive, as they may produce results without inspecting their - arguments at all. - - See also :ref:`deriving-functor`, :ref:`deriving-foldable`, and - :ref:`deriving-traversable`. - -- Derived instances for empty data types are now substantially different - than before. Here is an overview of what has changed. These examples will - use a running example of ``data Empty a`` to describe what happens when an - instance is derived for ``Empty``: - - - Derived ``Eq`` and ``Ord`` instances would previously emit code that used - ``error``: :: - - instance Eq (Empty a) where - (==) = error "Void ==" - - instance Ord (Empty a) where - compare = error "Void compare" - - Now, they emit code that uses maximally defined, lazier semantics: :: - - instance Eq (Empty a) where - _ == _ = True - - instance Ord (Empty a) where - compare _ _ = EQ - - - Derived ``Read`` instances would previous emit code that used - ``parens``: :: - - instance Read (Empty a) where - readPrec = parens pfail - - But ``parens`` forces parts of the parsed string that it doesn't need to. - Now, the derived instance will not use ``parens`` (that it, parsing - ``Empty`` will always fail, without reading *any* input): :: - - instance Read (Empty a) where - readPrec = pfail - - - Derived ``Show`` instances would previously emit code that used - ``error``: :: - - instance Show (Empty a) where - showsPrec = error "Void showsPrec" - - Now, they emit code that inspects the argument. That is, if the argument - diverges, then showing it will also diverge: :: - - instance Show (Empty a) where - showsPrec _ x = case x of {} - - - Derived ``Functor``, ``Foldable``, ``Traversable``, ``Generic``, - ``Generic1``, ``Lift``, and ``Data`` instances previously emitted code that - used ``error``: :: - - instance Functor Empty where - fmap = error "Void fmap" - - instance Foldable Empty where - foldMap = error "Void foldMap" - - instance Traversable Empty where - traverse = error "Void traverse" - - instance Generic (Empty a) where - from = M1 (error "No generic representation for empty datatype Empty") - to (M1 _) = error "No values for empty datatype Empty" - -- Similarly for Generic1 - - instance Lift (Empty a) where - lift _ = error "Can't lift value of empty datatype Empty" - - instance Data a => Data (Empty a) where - gfoldl _ _ _ = error "Void gfoldl" - toConstr _ = error "Void toConstr" - ... - - Now, derived ``Functor``, ``Traversable, ``Generic``, ``Generic1``, - ``Lift``, and ``Data`` instances emit code which inspects their - arguments: :: - - instance Functor Empty where - fmap _ x = case x of {} - - instance Traversable Empty where - traverse _ x = pure (case x of {}) - - instance Generic (Empty a) where - from x = M1 (case x of {}) - to (M1 x) = case x of {} - - -- Similarly for Generic1 - - instance Lift (Empty a) where - lift x = pure (case x of {}) - - instance Data a => Data (Empty a) where - gfoldl _ x = case x of {} - toConstr x = case x of {} - ... - - Derived ``Foldable`` instances now are maximally lazy: :: - - instance Foldable Empty where - foldMap _ _ = mempty - -- Derived ``Foldable`` instances now derive custom definitions for ``null`` - instead of using the default one. This leads to asymptotically better - performance for recursive types not shaped like cons-lists, and allows ``null`` - to terminate for more (but not all) infinitely large structures. - -- :ghc-flag:`-fsplit-sections` is now supported on x86_64 Windows and is on by default. - See :ghc-ticket:`12913`. - -- Configure on Windows now supports the ``--enable-distro-toolchain`` - ``configure`` flag, which can be used to build a GHC using compilers on your - ``PATH`` instead of using the bundled bindist. See :ghc-ticket:`13792` - -- GHC now enables :ghc-flag:`-fllvm-pass-vectors-in-regs` by default. This means - that GHC will now use native vector registers to pass vector arguments across - function calls. - -- The optional ``instance`` keyword is now usable in type family instance - declarations. See :ghc-ticket:`13747` - -- Lots of other bugs. See `Trac <https://ghc.haskell.org/trac/ghc/query?status=closed&milestone=8.4.1&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority>`_ - for a complete list. - -- New flags :ghc-flag:`-fignore-optim-changes` and - :ghc-flag:`-fignore-hpc-changes` allow GHC to reuse previously compiled - modules even if they were compiled with different optimisation or HPC - flags. These options are enabled by default by :ghc-flag:`--interactive`. - See :ghc-ticket:`13604` - -Runtime system -~~~~~~~~~~~~~~ - -- Function ``hs_add_root()`` was removed. It was a no-op since GHC-7.2.1 - where module initialisation stopped requiring a call to ``hs_add_root()``. - -- Proper import library support added to GHC which can handle all of the libraries produced - by ``dlltool``. The limitation of them needing to be named with the suffix - ``.dll.a`` is also removed. See :ghc-ticket:`13606`, :ghc-ticket:`12499`, - :ghc-ticket:`12498` - -- The GHCi runtime linker on Windows now supports the ``big-obj`` file format. - -- The runtime system's :ref:`native stack backtrace <backtrace-signal>` support - on POSIX platforms is now triggered by ``SIGQUIT`` instead of ``SIGUSR2`` as - it was in previous releases. This change is to bring GHC's behavior into - compliance with the model set by the most Java virtual machine - implementations. - -- The GHC runtime on Windows now uses Continue handlers instead of Vectorized - handlers to trap exceptions. This change gives other exception handlers a chance - to handle the exception before the runtime does. Furthermore The RTS flag - :rts-flag:`--install-seh-handlers=<yes|no>` Can be used on Wndows to - completely disable the runtime's handling of exceptions. See - :ghc-ticket:`13911`, :ghc-ticket:`12110`. - -- The GHC runtime on Windows can now generate crash dumps on unhandled exceptions - using the RTS flag :rts-flag:`--generate-crash-dumps`. - -- The GHCi runtime linker now avoid calling GCC to find libraries as much as possible by caching - the list of search directories of GCC and querying the file system directly. This results in - much better performance, especially on Windows. - -- The GHC runtime on Windows can now generate stack traces on unhandled exceptions. - When running in GHCi more information is displayed about the symbols if available. - This behavior can be controlled with the RTS flag `--generate-stack-traces=<yes|no>`. - -Template Haskell -~~~~~~~~~~~~~~~~ - -- Template Haskell now reifies data types with GADT syntax accurately. - Previously, TH used heuristics to determine whether a data type - should be reified using GADT syntax, which could lead to incorrect results, - such as ``data T1 a = (a ~ Int) => MkT1`` being reified as a GADT and - ``data T2 a where MkT2 :: Show a => T2 a`` *not* being reified as a GADT. - - In addition, reified GADT constructors now more accurately track the order in - which users write type variables. Before, if you reified ``MkT`` as below: :: - - data T a where - MkT :: forall b a. b -> T a - - Then the reified type signature of ``MkT`` would have been headed by - ``ForallC [PlainTV a, PlainTV b]``. Now, reifying ``MkT`` will give a type - headed by ``ForallC [PlainTV b, PlainTV a]``, as one would expect. - - -- ``Language.Haskell.TH.FamFlavour``, which was deprecated in GHC 8.2, - has been removed. - -``ghc`` library -~~~~~~~~~~~~~~~ - -- hsSyn Abstract Syntax Tree (AST) is now extensible via the mechanism described in `Trees that Grow <http://www.jucs.org/jucs_23_1/trees_that_grow/jucs_23_01_0042_0062_najd.pdf>`_ - - The main change for users of the GHC API is that the AST is no longer indexed - by the type used as the identifier, but by a specific index type, :: - - type GhcPs = GhcPass 'Parsed -- Old 'RdrName' type param - type GhcRn = GhcPass 'Renamed -- Old 'Name' type param - type GhcTc = GhcPass 'Typechecked -- Old 'Id' type para, - type GhcTcId = GhcTc -- Old 'TcId' type param - - The simplest way to support the current GHC as well as earlier ones is to define :: - - #if MIN_VERSION_ghc(8,3,0) - type ParseI = GhcPs - type RenameI = GhcRn - type TypecheckI = GhcTc - #else - type ParseI = RdrName - type RenameI = Name - type TypecheckI = Var - #endif - - and then replace all hardcoded index types accordingly. For polymorphic types, - the constraint :: - - #if MIN_VERSION_ghc(8,3,0) - -- |bundle up the constraints required for a trees that grow pass - type IsPass pass = (DataId pass, OutputableBndrId pass, SourceTextX pass) - else - type IsPass pass = (DataId pass, OutputableBndrId pass) - #endif - - can be used. - -``base`` library -~~~~~~~~~~~~~~~~ - -- Blank strings can now be used as values for environment variables using the - ``System.Environment.Blank`` module. See :ghc-ticket:`12494` - -- ``Data.Type.Equality.==`` is now a closed type family. It works for all kinds - out of the box. Any modules that previously declared instances of this family - will need to remove them. Whereas the previous definition was somewhat ad - hoc, the behavior is now completely uniform. As a result, some applications - that used to reduce no longer do, and conversely. Most notably, ``(==)`` no - longer treats the ``*``, ``j -> k``, or ``()`` kinds specially; equality is - tested structurally in all cases. - -Build system -~~~~~~~~~~~~ - -- ``dll-split`` has been removed and replaced with an automatic partitioning utility ``gen-dll``. - This utility can transparently split and compile any DLLs that require this. Note that the ``rts`` and - ``base`` can not be split at this point because of the mutual recursion between ``base`` and ``rts``. - There is currently no explicit dependency between the two in the build system and such there is no way - to notify ``base`` that the ``rts`` has been split, or vice versa. - (see :ghc-ticket:`5987`). - - -Included libraries ------------------- - -The package database provided with this distribution also contains a number of -packages other than GHC itself. See the changelogs provided with these packages -for further change information. - -.. ghc-package-list:: - - libraries/array/array.cabal: Dependency of ``ghc`` library - libraries/base/base.cabal: Core library - libraries/binary/binary.cabal: Dependency of ``ghc`` library - libraries/bytestring/bytestring.cabal: Deppendency of ``ghc`` library - libraries/Cabal/Cabal/Cabal.cabal: Dependency of ``ghc-pkg`` utility - libraries/containers/containers.cabal: Dependency of ``ghc`` library - libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library - libraries/directory/directory.cabal: Dependency of ``ghc`` library - libraries/filepath/filepath.cabal: Dependency of ``ghc`` library - compiler/ghc.cabal: The compiler itself - libraries/ghci/ghci.cabal: The REPL interface - libraries/ghc-boot/ghc-boot.cabal: Internal compiler library - libraries/ghc-compact/ghc-compact.cabal: Core library - libraries/ghc-prim/ghc-prim.cabal: Core library - libraries/haskeline/haskeline.cabal: Dependency of ``ghci`` executable - libraries/hpc/hpc.cabal: Dependency of ``hpc`` executable - libraries/integer-gmp/integer-gmp.cabal: Core library - libraries/mtl/mtl.cabal: Dependency of ``Cabal`` library - libraries/parsec/parsec.cabal: Dependency of ``Cabal`` library - libraries/process/process.cabal: Dependency of ``ghc`` library - libraries/template-haskell/template-haskell.cabal: Core library - libraries/text/text.cabal: Dependency of ``Cabal`` library - libraries/time/time.cabal: Dependency of ``ghc`` library - libraries/transformers/transformers.cabal: Dependency of ``ghc`` library - libraries/unix/unix.cabal: Dependency of ``ghc`` library - libraries/Win32/Win32.cabal: Dependency of ``ghc`` library - libraries/xhtml/xhtml.cabal: Dependency of ``haddock`` executable - -Win32 -~~~~~ - -.. attention:: - - This release is a backwards incompatible release which corrects the type of - certain APIs. See issue `#24 <https://github.com/haskell/win32/issues/24>`_. diff --git a/docs/users_guide/8.4.2-notes.rst b/docs/users_guide/8.4.2-notes.rst deleted file mode 100644 index e579e83c7c05042f6a4b16c93de9f71f4042582f..0000000000000000000000000000000000000000 --- a/docs/users_guide/8.4.2-notes.rst +++ /dev/null @@ -1,94 +0,0 @@ -.. _release-8-4-2: - -Release notes for version 8.4.2 -=============================== - -TODO - -Highlights ----------- - -The highlights, since the 8.4.1 release, are: - -- TODO - - -Full details ------------- - - -Language -~~~~~~~~ - -- Fix a regression in which derived ``Read`` instances for record data types - with field names ending with ``#`` (by way of :ghc-flag:`-XMagicHash`) would - no longer parse valid output. - -Compiler -~~~~~~~~ - - -Runtime system -~~~~~~~~~~~~~~ - - -Template Haskell -~~~~~~~~~~~~~~~~ - - -``ghc`` library -~~~~~~~~~~~~~~~ - - -``base`` library -~~~~~~~~~~~~~~~~ - -- Add the ``readFieldHash`` function to ``GHC.Read`` which behaves like - ``readField``, but for a field that ends with a ``#`` symbol. - -``integer-gmp`` library -~~~~~~~~~~~~~~~~~~~~~~~ - -- Define ``powModSecInteger``, a "secure" version of ``powModInteger`` using - the ``mpz_powm_sec`` function. - -Build system -~~~~~~~~~~~~ - - -Included libraries ------------------- - -The package database provided with this distribution also contains a number of -packages other than GHC itself. See the changelogs provided with these packages -for further change information. - -.. ghc-package-list:: - - libraries/array/array.cabal: Dependency of ``ghc`` library - libraries/base/base.cabal: Core library - libraries/binary/binary.cabal: Dependency of ``ghc`` library - libraries/bytestring/bytestring.cabal: Deppendency of ``ghc`` library - libraries/Cabal/Cabal/Cabal.cabal: Dependency of ``ghc-pkg`` utility - libraries/containers/containers.cabal: Dependency of ``ghc`` library - libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library - libraries/directory/directory.cabal: Dependency of ``ghc`` library - libraries/filepath/filepath.cabal: Dependency of ``ghc`` library - compiler/ghc.cabal: The compiler itself - libraries/ghci/ghci.cabal: The REPL interface - libraries/ghc-boot/ghc-boot.cabal: Internal compiler library - libraries/ghc-compact/ghc-compact.cabal: Core library - libraries/ghc-prim/ghc-prim.cabal: Core library - libraries/haskeline/haskeline.cabal: Dependency of ``ghci`` executable - libraries/hpc/hpc.cabal: Dependency of ``hpc`` executable - libraries/integer-gmp/integer-gmp.cabal: Core library - libraries/mtl/mtl.cabal: Dependency of ``Cabal`` library - libraries/parsec/parsec.cabal: Dependency of ``Cabal`` library - libraries/process/process.cabal: Dependency of ``ghc`` library - libraries/template-haskell/template-haskell.cabal: Core library - libraries/text/text.cabal: Dependency of ``Cabal`` library - libraries/time/time.cabal: Dependency of ``ghc`` library - libraries/transformers/transformers.cabal: Dependency of ``ghc`` library - libraries/unix/unix.cabal: Dependency of ``ghc`` library - libraries/Win32/Win32.cabal: Dependency of ``ghc`` library - libraries/xhtml/xhtml.cabal: Dependency of ``haddock`` executable diff --git a/docs/users_guide/index.rst b/docs/users_guide/index.rst index 7f42dca802bb453875a45c319b225bfebdf9cc5f..b1b0141d25059c057439dd9e6202c76eb3b20d5b 100644 --- a/docs/users_guide/index.rst +++ b/docs/users_guide/index.rst @@ -12,7 +12,6 @@ Contents: license intro - 8.4.2-notes 8.6.1-notes ghci runghc