5. Release notes for version 8.10.1

The significant changes to the various parts of the compiler are listed in the following sections.

5.1. Highlights

  • The UnliftedNewtypes extension.

5.2. Full details

5.2.1. Language

  • Kind variables are no longer implicitly quantified when an explicit forall is used, see GHC proposal #24. -Wimplicit-kind-vars is now obsolete.

  • Kind variables are no longer implicitly quantified in constructor declarations:

    data T a        = T1 (S (a :: k) | forall (b::k). T2 (S b)  -- no longer accepted
    data T (a :: k) = T1 (S (a :: k) | forall (b::k). T2 (S b)  -- still accepted
    
  • Implicitly quantified kind variables are no longer put in front of other variables:

    f :: Proxy (a :: k) -> Proxy (b :: j)
    
    ghci> :t +v f   -- old order:
    f :: forall k j (a :: k) (b :: j). Proxy a -> Proxy b
    
    ghci> :t +v f   -- new order:
    f :: forall k (a :: k) j (b :: j). Proxy a -> Proxy b
    

    This is a breaking change for users of TypeApplications.

  • In type synonyms and type family equations, free variables on the RHS are no longer implicitly quantified unless used in an outermost kind annotation:

    type T = Just (Nothing :: Maybe a)         -- no longer accepted
    type T = Just Nothing :: Maybe (Maybe a)   -- still accepted
    
  • GHC now parses visible, dependent quantifiers (as proposed in GHC proposal 35), such as the following:

    data Proxy :: forall k -> k -> Type
    

    See the section on explicit kind quantification for more details.

  • Type variables in associated type family default declarations can now be explicitly bound with a forall when ExplicitForAll is enabled, as in the following example:

    class C a where
      type T a b
      type forall a b. T a b = Either a b
    

    This has a couple of knock-on consequences:

    • Wildcard patterns are now permitted on the left-hand sides of default declarations, whereas they were rejected by previous versions of GHC.

    • It used to be the case that default declarations supported occurrences of left-hand side arguments with higher-rank kinds, such as in the following example:

      class C a where
        type T a (f :: forall k. k -> Type)
        type T a (f :: forall k. k -> Type) = f Int
      

      This will no longer work unless f is explicitly quantified with a forall, like so:

      class C a where
        type T a (f :: forall k. k -> Type)
        type forall a (f :: forall k. k -> Type).
             T a f = f Int
      
  • A new extension UnliftedNewtypes that relaxes restrictions around what kinds of types can appear inside of the data constructor for a newtype. This was proposed in GHC proposal #13.

5.2.2. Compiler

  • Add new flags -Wunused-record-wildcards and -Wredundant-record-wildcards which warn users when they have redundant or unused uses of a record wildcard match.

  • Calls to memset and memcpy are now unrolled more aggressively and the produced code is more efficient on x86_64 with added support for 64-bit MOV`s. In particular, `setByteArray# and copyByteArray# calls that were not optimized before, now will be. See #16052.

  • GHC’s runtime linker no longer uses global state. This allows programs that use the GHC API to safely use multiple GHC sessions in a single process, as long as there are no native dependencies that rely on global state.

  • When loading modules that use UnboxedTuples into GHCi, it will now automatically enable -fobject-code for these modules and all modules they depend on. Before this change, attempting to load these modules into the interpreter would just fail, and the only convenient workaround was to enable -fobject-code for all modules.

5.2.3. GHCi

  • Added a command :instances to show the class instances available for a type.

  • Added new debugger commands :disable and :enable to disable and re-enable breakpoints.

5.2.4. Runtime system

5.2.5. Template Haskell

  • The Lift typeclass is now levity-polymorphic and has a liftTyped method. Previously disallowed instances for unboxed tuples, unboxed sums, an primitive unboxed types have also been added. Finally, the code generated by -XDeriveLift has been simplified to take advantage of expression quotations.

5.2.6. ghc-prim library

  • Add new bitReverse# primops that, for a Word of 8, 16, 32 or 64 bits, reverse the order of its bits e.g. 0b110001 becomes 0b100011. These primitives use optimized machine instructions when available.

5.2.7. ghc library

5.2.8. base library

5.2.9. Build system

5.3. 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.

Package Version Reason for inclusion

ghc

8.9.0.20190705

The compiler itself

Cabal

3.0.0.0

Dependency of ghc-pkg utility

Win32

2.6.1.0

Dependency of ghc library

array

0.5.4.0

Dependency of ghc library

base

4.13.0.0

Core library

binary

0.8.7.0

Dependency of ghc library

bytestring

0.10.9.0

Dependency of ghc library

containers

0.6.2.1

Dependency of ghc library

deepseq

1.4.4.0

Dependency of ghc library

directory

1.3.3.2

Dependency of ghc library

filepath

1.4.2.1

Dependency of ghc library

ghc-boot-th

8.9.0.20190705

Internal compiler library

ghc-boot

8.9.0.20190705

Internal compiler library

ghc-compact

0.1.0.0

Core library

ghc-heap

8.9.0.20190705

GHC heap-walking library

ghc-prim

0.6.1

Core library

ghci

8.9.0.20190705

The REPL interface

haskeline

0.7.5.0

Dependency of ghci executable

hpc

0.6.0.3

Dependency of hpc executable

integer-gmp

1.0.2.0

Core library

libiserv

8.9.0.20190705

Internal compiler library

mtl

2.2.2

Dependency of Cabal library

parsec

3.1.14.0

Dependency of Cabal library

pretty

1.1.3.6

Dependency of ghc library

process

1.6.5.1

Dependency of ghc library

stm

2.5.0.0

Dependency of haskeline library

template-haskell

2.16.0.0

Core library

terminfo

0.4.1.4

Dependency of haskeline library

text

1.2.3.1

Dependency of Cabal library

time

1.9.3

Dependency of ghc library

transformers

0.5.6.2

Dependency of ghc library

unix

2.7.2.2

Dependency of ghc library

xhtml

3000.2.2.1

Dependency of haddock executable