2.1. Version 9.14.1¶
The significant changes to the various parts of the compiler are listed in the following sections. See the migration guide on the GHC Wiki for specific guidance on migrating programs to this release.
2.1.1. Language¶
-Wincomplete-record-selectors
is now part of -Wall, as specified by GHC Proposal 516: add warning for incomplete record selectors. Hence, if a library is compiled with-Werror
, compilation may now fail. Solution: fix the library. Workaround: add-Werror=no-incomplete-record-selectors
.Note that this warning is at least as serious as a warning about missing patterns from a function definition, perhaps even more so, since it is invisible in the source program.
The combination of
ScopedTypeVariables
andTypeApplications
no longer enables type applications in patterns, which now always requiresTypeAbstractions
. The warning flag``deprecated-type-abstractions`` has also been removed from the compiler.OverloadedRecordUpdate
now passes the arguments to asetField
function in the flipped order, as specified by GHC Proposal 583: HasField redesign.Previously GHC expected
setField
to have this type:setField :: forall (fld :: Symbol) a r. r -> a -> r
And that’s what GHC expects now:
setField :: forall (fld :: Symbol) a r. a -> r -> r
That will break the combination of
OverloadedRecordUpdate
withRebindableSyntax
.Multiline strings are now accepted in foreign imports. (#25157)
2.1.2. Compiler¶
An improved error message is introduced to refer users to the heap-controlling flags of the RTS when there is a heap overflow during compilation. (#25198)
2.1.3. GHCi¶
2.1.4. Runtime system¶
Add new runtime flag
--optimistic-linking
which instructs the runtime linker to continue in the presence of unknown symbols. By default this flag is not passed, preserving previous behavior.
2.1.5. Cmm¶
2.1.6. base
library¶
2.1.7. ghc-prim
library¶
2.1.8. ghc
library¶
The UnknownDiagnostic constructor now takes an additional type argument for the type of hints corresponding to the diagnostic, and an additional value-level argument used for existential wrapping of the hints of the inner diagnostic.
Changes to the HPT and HUG interface:
addToHpt and addListToHPT were moved from GHC.Unit.Home.ModInfo to GHC.Unit.Home.PackageTable and deprecated in favour of addHomeModInfoToHpt and addHomeModInfosToHpt.
UnitEnvGraph and operations unitEnv_lookup_maybe, unitEnv_foldWithKey, `unitEnv_singleton, unitEnv_adjust, unitEnv_insert, unitEnv_new were moved from GHC.Unit.Env to GHC.Unit.Home.Graph.
The HomePackageTable (HPT) is now exported from GHC.Unit.Home.PackageTable, and is now backed by an IORef to avoid by construction very bad memory leaks. This means the API to the HPT now is for the most part in IO. For instance, emptyHomePackageTable and addHomeModInfoToHpt are now in IO.
mkHomeUnitEnv was moved to GHC.Unit.Home.PackageTable, and now takes two extra explicit arguments. To restore previous behaviour, pass emptyUnitState and Nothing as the first two arguments additionally.
hugElts was removed. Users should prefer allUnits to get the keys of the HUG (the typical use case), or traverse or unitEnv_foldWithKey in other cases.
2.1.9. ghc-heap
library¶
The functions getClosureInfoTbl_maybe, getClosureInfoTbl, getClosurePtrArgs and getClosurePtrArgs_maybe have been added to allow reading of the relevant Closure attributes without reliance on incomplete selectors.
2.1.10. ghc-experimental
library¶
ghc-experimental
now exposesGHC.RTS.Flags
andGHC.Stats
asGHC.RTS.Flags.Experimental
andGHC.Stats.Experimental
. These are also exposed inbase
, however thebase
versions will be deprecated as part of the split base project. See CLC proposal 289. Downstream consumers of these flags are encouraged to migrate to theghc-experimental
versions.
2.1.11. template-haskell
library¶
2.1.12. 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 |
9.13 | The compiler itself |
Cabal-syntax |
3.14.1.0 | Dependency of |
Cabal |
3.14.1.0 | Dependency of |
Win32 |
2.14.1.0 | Dependency of |
array |
0.5.8.0 | Dependency of |
base |
4.21.0.0 | Core library |
binary |
0.8.9.2 | Dependency of |
bytestring |
0.12.2.0 | Dependency of |
containers |
0.7 | Dependency of |
deepseq |
1.5.1.0 | Dependency of |
directory |
1.3.9.0 | Dependency of |
exceptions |
0.10.9 | Dependency of |
file-io |
0.1.5 | Dependency of |
filepath |
1.5.4.0 | Dependency of |
ghc-boot-th |
9.13 | Internal compiler library |
ghc-boot |
9.13 | Internal compiler library |
ghc-compact |
0.1.0.0 | Core library |
ghc-heap |
9.13 | GHC heap-walking library |
ghc-prim |
0.13.0 | Core library |
ghci |
9.13 | The REPL interface |
haskeline |
0.8.2.1 | Dependency of |
hpc |
0.7.0.1 | Dependency of |
integer-gmp |
1.1 | Core library |
mtl |
2.3.1 | Dependency of |
os-string |
2.0.7 | Dependency of |
parsec |
3.1.17.0 | Dependency of |
pretty |
1.1.3.6 | Dependency of |
process |
1.6.25.0 | Dependency of |
stm |
2.5.3.1 | Dependency of |
template-haskell |
2.23.0.0 | Core library |
terminfo |
0.4.1.6 | Dependency of |
text |
2.1.2 | Dependency of |
time |
1.14 | Dependency of |
transformers |
0.6.1.2 | Dependency of |
unix |
2.8.6.0 | Dependency of |
xhtml |
3000.2.2.1 | Dependency of |
haddock-api |
2.30.0 | Dependency of |
haddock-library |
1.11.0 | Dependency of |