1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
|
.. _release-8-0-1:
Release notes for version 8.0.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 7.10 branch.
.. warning::
Only Cabal versions 1.24 and newer will function properly with this release.
(see :ghc-ticket:`11558`). Consequently it will likely be necessary to
recompile ``cabal-install`` before installing new packages.
The reason for this is a change in how packages are identified in GHC
8.0. While previous versions of Cabal identified packages to GHC with a
package key (with GHC's :ghc-flag:`-this-package-key` argument), GHC 8.0 and
later uses installed package IDs in place of package keys.
Highlights
----------
The highlights, since the 7.10 branch, are:
- TODO FIXME
- The new :ghc-flag:`-XTypeInType` allows promotion of all types into
kinds, allowing kind synonyms, kind families, promoted GADTs, and other
goodies.
- Support for :ref:`record pattern synonyms <record-patsyn>`
- The :ghc-flag:`-XDeriveAnyClass` extension learned to derive instances for
classes with associated types (see :ref:`derive-any-class`)
- More reliable DWARF debugging information
- Support for :ref:`injective type families <injective-ty-fams>`
- Applicative ``do`` notation (see :ref:`applicative-do`)
- Support for wildcards in data and type family instances
- :ghc-flag:`-XStrict` and :ghc-flag:`-XStrictData` extensions, allowing modules
to be compiled with strict-by-default bindings (see :ref:`strict-haskell`)
- :ghc-flag:`-XDuplicateRecordFields`, allowing multiple datatypes to declare the same
record field names provided they are used unambiguously (see :ref:`duplicate-record-fields`)
- Support for lightweight
:ref:`callstacks and source locations <hascallstack>`
- User-defined error messages for type errors
- A rewritten (and greatly improved) pattern exhaustiveness checker
- More flexible rebindable syntax
- GHC can run the interpreter in a separate process (see
:ref:`external-interpreter`), and the interpreter can now run profiled
code.
- GHCi now provides access to stack traces when used with
:ghc-flag:`-fexternal-interpreter` and :ghc-flag:`-prof` (see
:ref:`ghci-stack-traces`).
- A native code generator for powerpc64 and powerpc64le architectures
- The reworked users guide you are now reading
- Support for Windows XP and earlier has been dropped.
Full details
------------
Language
~~~~~~~~
- TODO FIXME.
- :ghc-flag:`-XTypeInType` supports universal type promotion and merges
the type and kind language. This allows, for example, higher-rank
kinds, along with kind families and type-level GADTs. Support is still
experimental, and it is expected to improve over the next several
releases. See :ref:`type-in-type` for the details.
- The parser now supports Haddock comments on GADT data constructors.
For example ::
data Expr a where
-- | Just a normal sum
Sum :: Int -> Int -> Expr Int
- The new ``base`` constraint :base-ref:`GHC.Stack.HasCallStack <GHC-Stack.html>`
can be used by functions to request a partial call-stack. For example ::
errorWithCallStack :: HasCallStack => String -> a
errorWithCallStack msg = error (msg ++ "\n" ++ prettyCallStack callStack)
ghci> errorWithCallStack "die"
*** Exception: die
CallStack (from HasCallStack):
errorWithCallStack, called at <interactive>:2:1 in interactive:Ghci1
prints the call-site of ``errorWithCallStack``.
See :ref:`hascallstack` for a description of ``HasCallStack``.
- GHC now supports visible type application, allowing
programmers to easily specify how type parameters should be
instantiated when calling a function. See
:ref:`visible-type-application` for the details.
- To conform to the common case, the default role assigned to
parameters of datatypes declared in ``hs-boot`` files is
``representational``. However, if the constructor(s) for the datatype
are given, it makes sense to do normal role inference. This is now
implemented, effectively making the default role for non-abstract
datatypes in ``hs-boot`` files to be ``phantom``, like it is in
regular Haskell code.
- Wildcards can be used in the type arguments of type/data family
instance declarations to indicate that the name of a type variable
doesn't matter. They will be replaced with new unique type variables.
See :ref:`data-instance-declarations` for more details.
- GHC now allows to declare type families as injective. Injectivity
information can then be used by the typechecker. See
:ref:`injective-ty-fams` for details.
- Due to a :ghc-ticket:`security issue <10826>`, Safe Haskell now forbids
annotations in programs marked as :ghc-flag:`-XSafe`.
- Generic instances can be derived for data types whose constructors have
arguments with certain unlifted types. See :ref:`generic-programming` for
more details.
- GHC generics can now provide strictness information for fields in a data
constructor via the ``Selector`` type class.
- The :ghc-flag:`-XDeriveAnyClass` extension now fills in associated type family
default instances when deriving a class that contains them.
- The :ghc-flag:`-XRebindableSyntax` feature is now much more flexible, imposing
fewer restrictions on the types of the rebindable syntax elements. For example,
your ``negate`` function may now return a different type than it accepts.
Rebindable syntax also supports higher-rank types fully, allowing types
like ``(>>=) :: m a -> (forall x. a x -> m b) -> m b``.
- Users can now define record pattern synonyms. This allows pattern synonyms
to behave more like normal data constructors. For example, ::
pattern P :: a -> b -> (a, b)
pattern P{x,y} = (x,y)
will allow ``P`` to be used like a record data constructor and also defines
selector functions ``x :: (a, b) -> a`` and ``y :: (a, b) -> b``.
- Pattern synonyms can now be bundled with type constructors. For a pattern
synonym ``P`` and a type constructor ``T``, ``P`` can be bundled with ``T``
so that when ``T`` is imported ``P`` is also imported. With this change
a library author can provide either real data constructors or pattern
synonyms in an opaque manner. See :ref:`pattern-synonyms` for details. ::
-- Foo.hs
module Foo ( T(P) ) where
data T = T
pattern P = T
-- Baz.hs
module Baz where
-- P is imported
import Foo (T(..))
- Whenever a data instance is exported, the corresponding data family
is exported, too. This allows one to write ::
-- Foo.hs
module Foo where
data family T a
-- Bar.hs
module Bar where
import Foo
data instance T Int = MkT
-- Baz.hs
module Baz where
import Bar (T(MkT))
In previous versions of GHC, this required a workaround via an
explicit export list in ``Bar``.
- :ghc-flag:`-XDeriveFoldable` and :ghc-flag:`-XDeriveTraversable` now
generate code without superfluous ``mempty`` or ``pure`` expressions. As a
result, :ghc-flag:`-XDeriveTraversable` now works on datatypes that contain
arguments which have unlifted types.
- Note that the :ghc-flag:`-XImpredicativeTypes` extension, which has been
:ghc-wiki:`known <ImpredicativePolymorphism>` to be broken for many years, is even more
broken than usual in this release (see :ghc-ticket:`11319`,
:ghc-ticket:`11675`, and others). During pre-release testing we encountered
a number of projects that broke with confusing type errors due to (often
unnecessary) use of :ghc-flag:`-XImpredicativeTypes`. Users of
:ghc-flag:`-XImpredicativeTypes` do so at their own risk!
Compiler
~~~~~~~~
- Warnings can now be controlled with ``-W(no-)...`` flags in addition to
the old ``-f(no-)warn...`` ones. This was done as the first part of a
rewrite of the warning system to provide better control over warnings,
better warning messages, and more common syntax compared to other
compilers. The old ``-f``-based warning flags will remain functional for
the forseeable future.
- Added the option :ghc-flag:`-dth-dec-file`. This dumps out a ``.th.hs`` file of
all Template Haskell declarations in a corresponding .hs file. The
idea is that application developers can check this into their
repository so that they can grep for identifiers used elsewhere that
were defined in Template Haskell. This is similar to using
:ghc-flag:`-ddump-to-file` with :ghc-flag:`-ddump-splices` but it always generates a
file instead of being coupled to :ghc-flag:`-ddump-to-file` and only outputs
code that does not exist in the .hs file and a comment for the splice
location in the original file.
- After a long hiatus (see :ghc-ticket:`10935`) the
:ghc-flag:`-Wmonomorphism-restriction` (formerly
:ghc-flag:`-fwarn-monomorphism-restriction`) flag has returned.
The functionality of this flag was inadvertently removed by a commit in 2010;
this has been fixed and the flag should now issue warnings as it
previously did.
- Added the option :ghc-flag:`-fprint-expanded-types`. When enabled, GHC also
prints type-synonym-expanded types in type errors.
- Added the option :ghc-flag:`-fcpr-anal`. When enabled, the demand analyser
performs CPR analysis. It is implied by :ghc-flag:`-O`. Consequently,
:ghc-flag:`-fcpr-off` is now removed, run with :ghc-flag:`-fno-cpr-anal` to get the
old :ghc-flag:`-fcpr-off` behaviour.
- Added the option :ghc-flag:`-fworker-wrapper`. When enabled, the worker-wrapper
transformation is performed after a strictness analysis pass. It is implied
by :ghc-flag:`-O` and by :ghc-flag:`-fstrictness`. It is disabled by :ghc-flag:`-fno-strictness`.
Enabling :ghc-flag:`-fworker-wrapper` while strictness analysis is disabled (by
:ghc-flag:`-fno-strictness`) has no effect.
- Added the options :ghc-flag:`-Wmissed-specialisations` and
:ghc-flag:`-Wall-missed-specialisations`. When enabled, the simplifier will
produce a warning when a overloaded imported function cannot be
specialised (typically due to a missing ``INLINEABLE`` pragma). This
is intended to alert users to cases where they apply ``INLINEABLE`` but
may not get the speed-up they expect.
- Added the option :ghc-flag:`-Wnoncanonical-monad-instances` and
:ghc-flag:`-Wnoncanonical-monadfail-instances` which help detect noncanonical
``Applicative``/``Monad``/``MonadFail`` instance definitions.
See flag description in :ref:`options-sanity` for more details.
- When printing an out-of-scope error message, GHC will give helpful advice if
the error might be caused by too restrictive imports.
- Added the :ghc-flag:`-Wcompat` warning group, along with its opposite
:ghc-flag:`-Wno-compat`. Turns on warnings that will be enabled by default in the
future, but remain off in normal compilations for the time being. This
allows library authors eager to make their code future compatible to adapt
to new features before they even generate warnings.
- Added the :ghc-flag:`-Wmissing-monadfail-instances` flag. When enabled, this
will issue a warning if a failable pattern is used in a context that does
not have a ``MonadFail`` constraint. This flag represents phase 1 of the
`MonadFail Proposal (MFP)
<https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail>`__.
- Added the :ghc-flag:`-Wsemigroup` flag. When enabled, this
will issue a warning if a type is an instance of ``Monoid`` but not
``Semigroup``, and when a custom definition ``(<>)`` is made. Fixing these
warnings makes sure the definition of ``Semigroup`` as a superclass of
``Monoid`` does not break any code.
- Added the :ghc-flag:`-Wmissing-pattern-synonym-signatures`
flag. When enabled, this will issue a warning when a pattern
synonym definition doesn't have a type signature. It is turned off
by default but enabled by :ghc-flag:`-Wall`.
- Added the :ghc-flag:`-Wunused-type-patterns` flag to report unused
type variables in data and type family instances. This flag is not implied
by :ghc-flag:`-Wall`, since :ghc-flag:`-Wunused-type-patterns` will
warn about unused type variables even if the types themselves are intended
to be used as documentation. If :ghc-flag:`-Wunused-type-patterns` is
enabled, one can prefix or replace unused type variables with underscores to
avoid warnings.
- Split off the new flag :ghc-flag:`-Wunused-foralls` from the previously
existing flag :ghc-flag:`-Wunused-matches`. :ghc-flag:`-Wunused-foralls`
emits a warning in the specific case that a user writes explicit ``forall``
syntax with unused type variables, while :ghc-flag:`-Wunused-matches` only
warns in the case of unused term-level patterns. Both flags are implied by
:ghc-flag:`-W`.
- Added the :ghc-flag:`-fmax-pmcheck-iterations` to control how many times
the pattern match checker iterates. Since coverage checking is exponential
in the general case, setting a default number of iterations prevents memory
and performance blowups. By default, the number of iterations is set to
10000000 but it can be set to ``n`` with: ``-fmax-pmcheck-iterations=n``.
If the set number of iterations is exceeded, an informative warning is
issued.
- :ghc-flag:`-this-package-key` has been renamed again (hopefully for the last time!)
to :ghc-flag:`-this-unit-id`. The renaming was motivated by the fact that
the identifier you pass to GHC here doesn't have much to do with packages:
you may provide different unit IDs for libraries which are in the same
package. :ghc-flag:`-this-package-key` is deprecated; you should use
:ghc-flag:`-this-unit-id` or, if you need compatibility over multiple
versions of GHC, :ghc-flag:`-package-name`.
- When :ghc-flag:`-fdefer-type-errors` is enabled and an expression fails to
typecheck, ``Control.Exception.TypeError`` will now be thrown instead of
``Control.Exception.ErrorCall``.
- :ghc-flag:`-Wmissing-local-sigs` is now deprecated in favor of
:ghc-flag:`-Wmissing-local-signatures`.
- :ghc-flag:`-Wmissing-exported-sigs` is now deprecated in favor of
:ghc-flag:`-Wmissing-exported-signatures`.
- :ghc-flag:`-ddump-strsigs` has been renamed to
:ghc-flag:`-ddump-str-signatures`.
- :ghc-flag:`-XDeriveGeneric` is now less picky about instantiating type
arguments when deriving (:ghc-ticket:`11732`). As a consequence, the
following code is now legal (whereas before it would have been rejected). ::
data T a b = T a b
deriving instance Generic (T Int b)
GHCi
~~~~
- ``Main`` with an explicit module header but without ``main`` is now
an error (:ghc-ticket:`7765`).
- The :ghci-cmd:`:back` and :ghci-cmd:`:forward` commands now take an optional count
allowing the user to move forward or backward in history several
steps at a time.
- Added commands :ghci-cmd:`:load! <:load>` and :ghci-cmd:`:reload! <:reload>`,
effectively setting :ghc-flag:`-fdefer-type-errors` before loading a module and
unsetting it after loading if it has not been set before (:ghc-ticket:`8353`).
- ``ghci -e`` now behaves like :ghc-flag:`ghc -e <-e>` (:ghc-ticket:`9360`).
- Added support for top-level function declarations (:ghc-ticket:`7253`).
- The new commands :ghci-cmd:`:all-types`, :ghci-cmd:`:loc-at`, :ghci-cmd:`:type-at`, and
:ghci-cmd:`:uses` designed for editor-integration
(such as Emacs' ``haskell-mode``) originally premiered by ``ghci-ng``
have been integrated into GHCi (:ghc-ticket:`10874`).
- GHCi now supports decoupled operation between the interpreter and the
shell. While this is largely an implementation detail, it opens up a few
interesting possibilities in the future. See :ghc-wiki:`RemoteGHCi` for
details.
Template Haskell
~~~~~~~~~~~~~~~~
- The new :ghc-flag:`-XTemplateHaskellQuotes` flag allows to use the
quotes (not quasi-quotes) subset of ``TemplateHaskell``. This is
particularly useful for use with a stage 1 compiler (i.e. GHC
without interpreter support). Also, :ghc-flag:`-XTemplateHaskellQuotes` is
considered safe under Safe Haskell.
- The ``__GLASGOW_HASKELL_TH__`` CPP constant denoting support for
:ghc-flag:`-XTemplateHaskell` introduced in GHC 7.10.1 has been changed to
use the values ``1``/``0`` instead of the previous ``YES``/``NO``
values.
- Partial type signatures can now be used in splices, see
:ref:`pts-where`.
- Template Haskell now fully supports typed holes and quoting unbound
variables. This means it is now possible to use pattern splices nested
inside quotation brackets.
- Template Haskell now supports the use of ``UInfixT`` in types to
resolve infix operator fixities, in the same vein as ``UInfixP`` and
``UInfixE`` in patterns and expressions. ``ParensT`` and ``InfixT``
have also been introduced, serving the same functions as their
pattern and expression counterparts.
- Template Haskell has now explicit support for representing GADTs. Until
now GADTs were encoded using ``NormalC``, ``RecC`` (record syntax) and
``ForallC`` constructors. Two new constructors - ``GadtC`` and ``RecGadtC`` -
are now supported during quoting, splicing and reification.
- Primitive chars (e.g., ``[| 'a'# |]``) and primitive strings (e.g.,
``[| "abc"# |]``) can now be quoted with Template Haskell. The
``Lit`` data type also has a new constructor, ``CharPrimL``, for
primitive char literals.
- ``addTopDecls`` now accepts annotation pragmas.
- Internally, the implementation of quasi-quotes has been unified with
that of normal Template Haskell splices. Under the previous
implementation, top-level declaration quasi-quotes did not cause a
break in the declaration groups, unlike splices of the form
``$(...)``. This behavior has been preserved under the new
implementation, and is now recognized and documented in
:ref:`th-syntax`.
- The ``Lift`` class is now derivable via the :ghc-flag:`-XDeriveLift` extension. See
:ref:`deriving-lift` for more information.
- The ``FamilyD`` data constructor and ``FamFlavour`` data type have
been removed. Data families are now represented by ``DataFamilyD`` and
open type families are now represented by ``OpenTypeFamilyD`` instead
of ``FamilyD``. Common elements of ``OpenTypeFamilyD`` and
``ClosedTypeFamilyD`` have been moved to ``TypeFamilyHead``.
- The representation of ``data``, ``newtype``, ``data instance``, and
``newtype instance`` declarations has been changed to allow for
multi-parameter type classes in the ``deriving`` clause. In particular,
``dataD`` and ``newtypeD`` now take a ``CxtQ`` instead of a ``[Name]``
for the list of derived classes.
- ``isExtEnabled`` can now be used to determine whether a language extension
is enabled in the ``Q`` monad. Similarly, ``extsEnabled`` can be used to list
all enabled language extensions.
- One can now reify the strictness information of a constructors' fields using
Template Haskell's ``reifyConStrictness`` function, which takes into account
whether flags such as :ghc-flag:`-XStrictData` or
:ghc-flag:`-funbox-strict-fields` are enabled.
Runtime system
~~~~~~~~~~~~~~
- We have a shiny new two-step memory allocator for 64-bit platforms (see
:ghc-ticket:`9706`). In addition to simplifying the runtime system's
implementation this may significantly improve garbage collector performance.
Note, however, that Haskell processes will have an apparent virtual memory
footprint of a terabyte or so. Don't worry though, most of this amount is merely
mapped but uncommitted address space which is not backed by physical memory.
- Support for performance monitoring with PAPI has been dropped.
- :rts-flag:`-maxN⟨x⟩ <-maxN>` flag added to complement :rts-flag:`-N`. It will
choose to use at most ⟨x⟩ capabilities, limited by the number of processors
as :rts-flag:`-N` is.
Build system
~~~~~~~~~~~~
- TODO FIXME.
Package system
~~~~~~~~~~~~~~
- TODO FIXME.
hsc2hs
~~~~~~
- :command:`hsc2hs` now supports the ``#alignment`` macro, which can be used to
calculate the alignment of a struct in bytes. Previously, ``#alignment``
had to be implemented manually via a ``#let`` directive, e.g., ::
#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
As a result, if you have the above directive in your code, it will now emit
a warning when compiled with GHC 8.0.
.. code-block:: none
Module.hsc:24:0: warning: "hsc_alignment" redefined [enabled by default]
In file included from dist/build/Module_hsc_make.c:1:0:
/path/to/ghc/lib/template-hsc.h:88:0: note: this is the location of the previous definition
#define hsc_alignment(t...) \
^
To make your code free of warnings on GHC 8.0 and still support earlier
versions, surround the directive with a pragma checking for the right GHC
version. ::
#if __GLASGOW_HASKELL__ < 800
#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
#endif
Libraries
---------
array
~~~~~
- Version number XXXXX (was 0.5.0.0)
.. _lib-base:
base
~~~~
See ``changelog.md`` in the ``base`` package for full release notes.
- Version number 4.9.0.0 (was 4.7.0.0)
- :base-ref:`GHC.Stack <GHC-Stack.html>` exports two new types ``SrcLoc`` and ``CallStack``. A
``SrcLoc`` contains package, module, and file names, as well as start
and end positions. A ``CallStack`` is essentially a ``[(String, SrcLoc)]``,
sorted by most-recent call.
- ``error`` and ``undefined`` will now report a partial stack-trace
using the new ``CallStack`` feature (and the :ghc-flag:`-prof` stack if
available).
- A new function, ``interruptible``, was added to ``GHC.IO`` allowing
an ``IO`` action to be run such that it can be interrupted by an
asynchronous exception, even if exceptions are masked (except if
masked with ``interruptibleMask``).
This was introduced to fix the behavior of ``allowInterrupt``, which
would previously incorrectly allow exceptions in uninterruptible
regions (see :ghc-ticket:`9516`).
- Per-thread allocation counters (``setAllocationCounter`` and
``getAllocationCounter``) and limits (``enableAllocationLimit``,
``disableAllocationLimit`` are now available from ``System.Mem``. Previously
this functionality was only available from :base-ref:`GHC.Conc <GHC-Stack.html>`.
- ``forever``, ``filterM``, ``mapAndUnzipM``, ``zipWithM``, ``zipWithM_``,
``replicateM``, and ``replicateM`` were generalized from ``Monad`` to
``Applicative``. If this causes performance regressions, try to make the
implementation of ``(*>)`` match that of ``(>>)``.
- Add ``URec``, ``UAddr``, ``UChar``, ``UDouble``, ``UFloat``, ``UInt``, and ``UWord`` to
:base-ref:`GHC.Generics <GHC-Generics.html>` as part of making GHC generics
capable of handling unlifted types (:ghc-ticket:`10868`)
- Expand ``Floating`` class to include operations that allow for better
precision: ``log1p``, ``expm1``, ``log1pexp`` and ``log1mexp``. These are not
available from ``Prelude``, but the full class is exported from ``Numeric``.
- Add ``Data.List.NonEmpty`` and ``Data.Semigroup`` (to become
super-class of ``Monoid`` in the future). These modules were
provided by the ``semigroups`` package previously. (:ghc-ticket:`10365`)
- The constraints of various functions in ``Control.Monad`` have been
generalized from ``Monad`` to ``Applicative`` including ``filterM``,
``zipWithM`` and ``replicateM_`` (see :ghc-ticket:`10168`).
- Add ``GHC.TypeLits.TypeError`` and ``ErrorMessage`` to allow users
to define custom compile-time error messages. (see :ref:`custom-errors` and
the original :ghc-wiki:`proposal <Proposal/CustomTypeErrors>`).
- The datatypes in ``GHC.Generics`` now have ``Enum``, ``Bounded``, ``Ix``,
``Functor``, ``Applicative``, ``Monad``, ``MonadFix``, ``MonadPlus``, ``MonadZip``,
``Foldable``, ``Foldable``, ``Traversable``, ``Generic1``, and ``Data`` instances
as appropriate. (:ghc-ticket:`9043`)
- The ``Generic`` instance for ``Proxy`` is now poly-kinded (see :ghc-ticket:`10775`)
- The ``IsString`` instance for ``[Char]`` has been modified to eliminate
ambiguity arising from overloaded strings and functions like ``(++)``.
- Move ``Const`` from ``Control.Applicative`` to its own module in
``Data.Functor.Const``. (see :ghc-ticket:`11135`)
- Enable ``PolyKinds`` in the ``Data.Functor.Const`` module to give ``Const``
the kind ``* -> k -> *`` (see :ghc-ticket:`10039`).
- Add the ``TypeError`` datatype to ``Control.Exception``, which represents the
error that is thrown when an expression fails to typecheck when run using
:ghc-flag:`-fdefer-type-errors`. (see :ghc-ticket:`10284`)
binary
~~~~~~
- Version number XXXXX (was 0.7.1.0)
bytestring
~~~~~~~~~~
- Version number XXXXX (was 0.10.4.0)
Cabal
~~~~~
- Version number XXXXX (was 1.18.1.3)
containers
~~~~~~~~~~
- Version number XXXXX (was 0.5.4.0)
deepseq
~~~~~~~
- Version number XXXXX (was 1.3.0.2)
directory
~~~~~~~~~
- Version number XXXXX (was 1.2.0.2)
filepath
~~~~~~~~
- Version number XXXXX (was 1.3.0.2)
ghc
~~~
- TODO FIXME.
- The ``HsBang`` type has been removed in favour of ``HsSrcBang`` and
``HsImplBang``. Data constructors now always carry around their
strictness annotations as the user wrote them, whether from an
imported module or not.
- Moved ``startsVarSym``, ``startsVarId``, ``startsConSym``, ``startsConId``,
``startsVarSymASCII``, and ``isVarSymChar`` from ``Lexeme`` to the
``GHC.Lemexe`` module of the ``ghc-boot`` library.
- Add ``isImport``, ``isDecl``, and ``isStmt`` functions.
- The `mi_fix_fn` field of `ModIface` had its type changed from
``OccName -> Fixity`` to ``OccName -> Maybe Fixity``, where a returned value
of ``Nothing`` indicates a cache miss. As a result, the types of
``mkIfaceFixCache`` and ``emptyIfaceFixCache`` were also changed to have a
return type of ``Maybe Fixity``, and a new ``mi_fix :: OccName -> Fixity``
function was introduced which invokes ``mi_fix_fn`` but returns
``defaultFixity`` upon a cache miss.
ghc-boot
~~~~~~~~
- This is an internal package. Use with caution.
- This package was renamed from ``bin-package-db`` to reflect its new purpose
of containing intra-GHC functionality that needs to be shared across
multiple GHC boot libraries.
- Added ``GHC.Lexeme``, which contains functions for determining if a
character can be the first letter of a variable or data constructor in
Haskell, as defined by GHC. (These functions were moved from ``Lexeme``
in ``ghc``.)
- Added ``GHC.LanguageExtensions`` which contains a type listing all
supported language extensions.
ghc-prim
~~~~~~~~
- Version number XXXXX (was 0.3.1.0)
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)
hpc
~~~
- Version number XXXXX (was 0.6.0.1)
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)
process
~~~~~~~
- Version number XXXXX (was 1.2.0.0)
template-haskell
~~~~~~~~~~~~~~~~
- Version number XXXXX (was 2.9.0.0)
- The ``Lift`` type class for lifting values into Template Haskell
splices now has a default signature ``lift :: Data a => a -> Q Exp``,
which means that you do not have to provide an explicit
implementation of ``lift`` for types which have a ``Data`` instance.
To manually use this default implementation, you can use the
``liftData`` function which is now exported from
``Language.Haskell.TH.Syntax``.
- ``Info``'s constructors no longer have ``Fixity`` fields. A
``qReifyFixity`` function was added to the ``Quasi`` type class (as
well as the ``reifyFixity`` function, specialized for ``Q``) to allow
lookup of fixity information for any given ``Name``.
time
~~~~
- Version number XXXXX (was 1.4.1)
unix
~~~~
- Version number XXXXX (was 2.7.0.0)
Win32
~~~~~
- Version number XXXXX (was 2.3.0.1)
Known bugs
----------
- TODO FIXME
|