changelog.md 26 KB
Newer Older
1
2
# Changelog for [`base` package](http://hackage.haskell.org/package/base)

3
## 4.12.0.0 *TBA*
4
5
  * Bundled with GHC *TBA*

6
7
8
  * Add a new module `GHC.ResponseFile` (previously defined in the `haddock`
    package). (#13896)

9
10
  * Move the module `Data.Functor.Contravariant` from the
    `contravariant` package to `base`.
11
12
13

  * `($!)` is now representation-polymorphic like `($)`.

14
15
16
  * Add `Applicative` (for `K1`), `Semigroup` and `Monoid` instances in
    `GHC.Generics`. (#14849)

David Feuer's avatar
David Feuer committed
17
18
  * `asinh` for `Float` and `Double` is now numerically stable in the face of
    non-small negative arguments and enormous arguments of either sign. (#14927)
19

20
21
22
  * `Numeric.showEFloat (Just 0)` now respects the user's requested precision.
    (#15115)

23
## 4.11.1.0 *TBA*
24
25
  * Bundled with GHC 8.4.2

26
27
28
  * Add the `readFieldHash` function to `GHC.Read` which behaves like
    `readField`, but for a field that ends with a `#` symbol (#14918).

29
## 4.11.0.0 *TBA*
30
  * Bundled with GHC 8.4.1
31

32
33
  * `System.IO.openTempFile` is now thread-safe on Windows.

34
35
  * Deprecated `GHC.Stats.GCStats` interface has been removed.

36
37
  * Add `showHFloat` to `Numeric`

38
  * Add `Div`, `Mod`, and `Log2` functions on type-level naturals
39
40
    in `GHC.TypeLits`.

41
42
  * Add `Alternative` instance for `ZipList` (#13520)

43
44
45
  * Add instances `Num`, `Functor`, `Applicative`, `Monad`, `Semigroup`
    and `Monoid` for `Data.Ord.Down` (#13097).

46
47
48
  * Add `Semigroup` instance for `EventLifetime`.

  * Make `Semigroup` a superclass of `Monoid`;
49
    export `Semigroup((<>))` from `Prelude`; remove `Monoid` reexport
50
51
    from `Data.Semigroup` (#14191).

52
53
54
  * Generalise `instance Monoid a => Monoid (Maybe a)` to
    `instance Semigroup a => Monoid (Maybe a)`.

55
  * Add `infixl 9 !!` declaration for `Data.List.NonEmpty.!!`
56

57
58
  * Add `<&>` operator to `Data.Functor` (#14029)

59
60
  * Remove the deprecated `Typeable{1..7}` type synonyms (#14047)

David Feuer's avatar
David Feuer committed
61
62
63
64
65
66
67
68
  * Make `Data.Type.Equality.==` a closed type family. It now 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.

69
70
  * Add instances `Semigroup` and `Monoid` for `Control.Monad.ST` (#14107).

71
72
73
74
75
  * The `Read` instances for `Proxy`, `Coercion`, `(:~:)`, `(:~~:)`, and `U1`
    now ignore the parsing precedence. The effect of this is that `read` will
    be able to successfully parse more strings containing `"Proxy"` _et al._
    without surrounding parentheses (e.g., `"Thing Proxy"`) (#12874).

Ben Gamari's avatar
Ben Gamari committed
76
77
78
  * Add `iterate'`, a strict version of `iterate`, to `Data.List`
    and `Data.OldList` (#3474)

79
80
  * Add `Data` instances for `IntPtr` and `WordPtr` (#13115)

81
82
  * Add missing `MonadFail` instance for `Control.Monad.Strict.ST.ST`

Tao He's avatar
Tao He committed
83
84
  * Make `zipWith` and `zipWith3` inlinable (#14224)

85
86
  * `Type.Reflection.App` now matches on function types (fixes #14236)

87
88
89
  * `Type.Reflection.withTypeable` is now polymorphic in the `RuntimeRep` of
    its result.

90
91
  * Add `installSEHHandlers` to `MiscFlags` in `GHC.RTS.Flags` to determine if
    exception handling is enabled.
92

93
94
  * The deprecated functions `isEmptyChan` and `unGetChan` in
    `Control.Concurrent.Chan` have been removed (#13561).
95

96
97
98
  * Add `generateCrashDumpFile` to `MiscFlags` in `GHC.RTS.Flags` to determine
    if a core dump will be generated on crashes.

99
100
101
  * Add `generateStackTrace` to `MiscFlags` in `GHC.RTS.Flags` to determine if
    stack traces will be generated on unhandled exceptions by the RTS.

102
103
  * `getExecutablePath` now resolves symlinks on Windows (#14483)

104
105
106
  * Deprecated STM invariant checking primitives (`checkInv`, `always`, and
    `alwaysSucceeds`) in `GHC.Conc.Sync` (#14324).

107
108
109
110
  * Add a `FixIOException` data type to `Control.Exception.Base`, and change
    `fixIO` to throw that instead of a `BlockedIndefinitelyOnMVar` exception
    (#14356).

111
112
113
114
115
116
117
118
## 4.10.1.0 *November 2017*
  * Bundled with GHC 8.2.2

  * The file locking primitives provided by `GHC.IO.Handle` now use
    Linux open file descriptor locking if available.

  * Fixed bottoming definition of `clearBit` for `Natural`

119
120
## 4.10.0.0 *July 2017*
  * Bundled with GHC 8.2.1
121

122
123
  * `Data.Type.Bool.Not` given a type family dependency (#12057).

124
125
126
  * `Foreign.Ptr` now exports the constructors for `IntPtr` and `WordPtr`
    (#11983)

Ryan Scott's avatar
Ryan Scott committed
127
128
129
  * `Generic1`, as well as the associated datatypes and typeclasses in
    `GHC.Generics`, are now poly-kinded (#10604)

130
131
132
  * `New modules `Data.Bifoldable` and `Data.Bitraversable` (previously defined
    in the `bifunctors` package) (#10448)

133
134
  * `Data.Either` now provides `fromLeft` and `fromRight` (#12402)

135
136
  * `Data.Type.Coercion` now provides `gcoerceWith` (#12493)

137
138
139
140
141
  * New methods `liftReadList(2)` and `liftReadListPrec(2)` in the
    `Read1`/`Read2` classes that are defined in terms of `ReadPrec` instead of
    `ReadS`, as well as related combinators, have been added to
    `Data.Functor.Classes` (#12358)

142
143
144
  * Add `Semigroup` instance for `IO`, as well as for `Event` and `Lifetime`
    from `GHC.Event` (#12464)

Ryan Scott's avatar
Ryan Scott committed
145
146
  * Add `Data` instance for `Const` (#12438)

147
148
  * Added `Eq1`, `Ord1`, `Read1` and `Show1` instances for `NonEmpty`.

149
  * Add wrappers for `blksize_t`, `blkcnt_t`, `clockid_t`, `fsblkcnt_t`,
150
    `fsfilcnt_t`, `id_t`, `key_t`, and `timer_t` to System.Posix.Types (#12795)
151

Ryan Scott's avatar
Ryan Scott committed
152
153
154
  * Add `CBool`, a wrapper around C's `bool` type, to `Foreign.C.Types`
    (#13136)

155
156
  * Raw buffer operations in `GHC.IO.FD` are now strict in the buffer, offset, and length operations (#9696)

157
158
  * Add `plusForeignPtr` to `Foreign.ForeignPtr`.

159
160
161
  * Add `type family AppendSymbol (m :: Symbol) (n :: Symbol) :: Symbol` to `GHC.TypeLits`
    (#12162)

162
163
164
165
  * 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`.

166
167
  * The type of `asProxyTypeOf` in `Data.Proxy` has been generalized (#12805)

David Feuer's avatar
David Feuer committed
168
169
170
171
172
173
174
  * `liftA2` is now a method of the `Applicative` class. `liftA2` and
    `<*>` each have a default implementation based on the other. Various
    library functions have been updated to use `liftA2` where it might offer
    some benefit. `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. (#13191)

175
176
  * A new module, `Type.Reflection`, exposing GHC's new type-indexed type
    representation mechanism is now provided.
Ben Gamari's avatar
Ben Gamari committed
177
178
179
180

  * `Data.Dynamic` now exports the `Dyn` data constructor, enabled by the new
    type-indexed type representation mechanism.

181
182
  * `Data.Type.Equality` now provides a kind heterogeneous type equality
    evidence type, `(:~~:)`.
Ben Gamari's avatar
Ben Gamari committed
183

Ben Gamari's avatar
Ben Gamari committed
184
185
186
187
  * The `CostCentresXML` constructor of `GHC.RTS.Flags.DoCostCentres` has been
    replaced by `CostCentresJSON` due to the new JSON export format supported by
    the cost centre profiler.

188
189
190
191
  * The `ErrorCall` pattern synonym has been given a `COMPLETE` pragma so that
    functions which solely match again `ErrorCall` do not produce
    non-exhaustive pattern-match warnings (#8779)

192
  * Change the implementations of `maximumBy` and `minimumBy` from
Gabor Greif's avatar
Gabor Greif committed
193
    `Data.Foldable` to use `foldl1` instead of `foldr1`. This makes them run
194
195
    in constant space when applied to lists. (#10830)

196
197
  * `mkFunTy`, `mkAppTy`, and `mkTyConApp` from `Data.Typeable` no longer exist.
    This functionality is superceded by the interfaces provided by
Ryan Scott's avatar
Ryan Scott committed
198
    `Type.Reflection`.
199
200
201
202

  * `mkTyCon3` is no longer exported by `Data.Typeable`. This function is
    replaced by `Type.Reflection.Unsafe.mkTyCon`.

Ben Gamari's avatar
Ben Gamari committed
203
204
205
  * `Data.List.NonEmpty.unfold` has been deprecated in favor of `unfoldr`,
    which is functionally equivalent.

206
## 4.9.0.0  *May 2016*
207
208

  * Bundled with GHC 8.0
Austin Seipp's avatar
Austin Seipp committed
209

Eric Seidel's avatar
Eric Seidel committed
210
211
212
213
  * `error` and `undefined` now print a partial stack-trace alongside the error message.

  * New `errorWithoutStackTrace` function throws an error without printing the stack trace.

214
215
216
  * The restore operation provided by `mask` and `uninterruptibleMask` now
    restores the previous masking state whatever the current masking state is.

217
218
  * New `GHC.Generics.packageName` operation

219
220
221
  * Redesigned `GHC.Stack.CallStack` data type. As a result, `CallStack`'s
    `Show` instance produces different output, and `CallStack` no longer has an
    `Eq` instance.
222

Eric Seidel's avatar
Eric Seidel committed
223
224
225
226
227
228
229
230
231
232
233
  * New `GHC.Generics.packageName` operation

  * New `GHC.Stack.Types` module now contains the definition of
    `CallStack` and `SrcLoc`

  * New `GHC.Stack.Types.emptyCallStack` function builds an empty `CallStack`

  * New `GHC.Stack.Types.freezeCallStack` function freezes a `CallStack` preventing future `pushCallStack` operations from having any effect

  * New `GHC.Stack.Types.pushCallStack` function pushes a call-site onto a `CallStack`

234
235
236
  * New `GHC.Stack.Types.fromCallSiteList` function creates a `CallStack` from
    a list of call-sites (i.e., `[(String, SrcLoc)]`)

Eric Seidel's avatar
Eric Seidel committed
237
238
239
240
241
  * `GHC.SrcLoc` has been removed

  * `GHC.Stack.showCallStack` and `GHC.SrcLoc.showSrcLoc` are now called
    `GHC.Stack.prettyCallStack` and `GHC.Stack.prettySrcLoc` respectively

Ben Gamari's avatar
Ben Gamari committed
242
243
244
  * 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. (#10365)
245

Ben Gamari's avatar
Ben Gamari committed
246
247
248
249
  * Add `selSourceUnpackedness`, `selSourceStrictness`, and
    `selDecidedStrictness`, three functions which look up strictness
    information of a field in a data constructor, to the `Selector` type class
    in `GHC.Generics` (#10716)
250

Ben Gamari's avatar
Ben Gamari committed
251
252
253
  * Add `URec`, `UAddr`, `UChar`, `UDouble`, `UFloat`, `UInt`, and `UWord` to
    `GHC.Generics` as part of making GHC generics capable of handling
    unlifted types (#10868)
254

255
256
257
  * The `Eq`, `Ord`, `Read`, and `Show` instances for `U1` now use lazier
    pattern-matching

Ben Gamari's avatar
Ben Gamari committed
258
259
  * Keep `shift{L,R}` on `Integer` with negative shift-arguments from
    segfaulting (#10571)
Gabriella439's avatar
Gabriella439 committed
260

Ben Gamari's avatar
Ben Gamari committed
261
262
  * Add `forkOSWithUnmask` to `Control.Concurrent`, which is like
    `forkIOWithUnmask`, but the child is run in a bound thread.
263

Ben Gamari's avatar
Ben Gamari committed
264
  * The `MINIMAL` definition of `Arrow` is now `arr AND (first OR (***))`.
265

Ben Gamari's avatar
Ben Gamari committed
266
  * The `MINIMAL` definition of `ArrowChoice` is now `left OR (+++)`.
267

268
269
270
  * Exported `GiveGCStats`, `DoCostCentres`, `DoHeapProfile`, `DoTrace`,
    `RtsTime`, and `RtsNat` from `GHC.RTS.Flags`

271
272
273
  * New function `GHC.IO.interruptible` used to correctly implement
    `Control.Exception.allowInterrupt` (#9516)

274
275
276
  * Made `PatternMatchFail`, `RecSelError`, `RecConError`, `RecUpdError`,
    `NoMethodError`, and `AssertionFailed` newtypes (#10738)

277
278
279
  * New module `Control.Monad.IO.Class` (previously provided by `transformers`
    package). (#10773)

280
281
282
283
  * New modules `Data.Functor.Classes`, `Data.Functor.Compose`,
    `Data.Functor.Product`, and `Data.Functor.Sum` (previously provided by
    `transformers` package). (#11135)

284
285
286
  * New instances for `Proxy`: `Eq1`, `Ord1`, `Show1`, `Read1`. All
    of the classes are from `Data.Functor.Classes` (#11756).

287
288
289
  * New module `Control.Monad.Fail` providing new `MonadFail(fail)`
    class (#10751)

Ben Gamari's avatar
Ben Gamari committed
290
291
  * Add `GHC.TypeLits.TypeError` and `ErrorMessage` to allow users
    to define custom compile-time error messages.
292

Ben Gamari's avatar
Ben Gamari committed
293
294
  * Redesign `GHC.Generics` to use type-level literals to represent the
    metadata of generic representation types (#9766)
295

Ben Gamari's avatar
Ben Gamari committed
296
297
  * The `IsString` instance for `[Char]` has been modified to eliminate
    ambiguity arising from overloaded strings and functions like `(++)`.
298

Ben Gamari's avatar
Ben Gamari committed
299
300
  * Move `Const` from `Control.Applicative` to its own module in
   `Data.Functor.Const`. (#11135)
301

Ben Gamari's avatar
Ben Gamari committed
302
  * Re-export `Const` from `Control.Applicative` for backwards compatibility.
joeyadams's avatar
joeyadams committed
303

Ben Gamari's avatar
Ben Gamari committed
304
305
306
  * 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`.
joeyadams's avatar
joeyadams committed
307

308
309
310
  * New `Control.Exception.TypeError` datatype, which is thrown when an
    expression fails to typecheck when run using `-fdefer-type-errors` (#10284)

Ben Gamari's avatar
Ben Gamari committed
311
### New instances
312

Ben Gamari's avatar
Ben Gamari committed
313
314
315
  * `Alt`, `Dual`, `First`, `Last`, `Product`, and `Sum` now have `Data`,
    `MonadZip`, and `MonadFix` instances

316
317
318
319
320
  * 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.

Ben Gamari's avatar
Ben Gamari committed
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
  * `Maybe` now has a `MonadZip` instance

  * `All` and `Any` now have `Data` instances

  * `Dual`, `First`, `Last`, `Product`, and `Sum` now have `Foldable` and
    `Traversable` instances

  * `Dual`, `Product`, and `Sum` now have `Functor`, `Applicative`, and
    `Monad` instances

  * `(,) a` now has a `Monad` instance

  * `ZipList` now has `Foldable` and `Traversable` instances

  * `Identity` now has `Semigroup` and `Monoid` instances

337
338
339
  * `Identity` and `Const` now have `Bits`, `Bounded`, `Enum`, `FiniteBits`,
    `Floating`, `Fractional`, `Integral`, `IsString`, `Ix`, `Num`, `Real`,
    `RealFloat`, `RealFrac` and `Storable` instances. (#11210, #11790)
Ben Gamari's avatar
Ben Gamari committed
340
341
342
343
344
345
346
347
348
349
350

  * `()` now has a `Storable` instance

  * `Complex` now has `Generic`, `Generic1`, `Functor`, `Foldable`, `Traversable`,
    `Applicative`, and `Monad` instances

  * `System.Exit.ExitCode` now has a `Generic` instance

  * `Data.Version.Version` now has a `Generic` instance

  * `IO` now has a `Monoid` instance
351

352
353
354
  * Add `MonadPlus IO` and `Alternative IO` instances
    (previously orphans in `transformers`) (#10755)

355
356
  * `CallStack` now has an `IsList` instance

357
358
359
  * The field `spInfoName` of `GHC.StaticPtr.StaticPtrInfo` has been removed.
    The value is no longer available when constructing the `StaticPtr`.

360
361
  * `VecElem` and `VecCount` now have `Enum` and `Bounded` instances.

Ben Gamari's avatar
Ben Gamari committed
362
### Generalizations
Ben Gamari's avatar
Ben Gamari committed
363

Ben Gamari's avatar
Ben Gamari committed
364
365
  * Generalize `Debug.Trace.{traceM, traceShowM}` from `Monad` to `Applicative`
    (#10023)
366

Eric Seidel's avatar
Eric Seidel committed
367
368
369
370
  * Redundant typeclass constraints have been removed:
     - `Data.Ratio.{denominator,numerator}` have no `Integral` constraint anymore
     - **TODO**

Ben Gamari's avatar
Ben Gamari committed
371
  * Generalise `forever` from `Monad` to `Applicative`
372

Ben Gamari's avatar
Ben Gamari committed
373
374
375
376
  * Generalize `filterM`, `mapAndUnzipM`, `zipWithM`, `zipWithM_`, `replicateM`,
    `replicateM_` from `Monad` to `Applicative` (#10168)

  * The `Generic` instance for `Proxy` is now poly-kinded (#10775)
377
378
379
380
381

  * Enable `PolyKinds` in the `Data.Functor.Const` module to give `Const`
    the kind `* -> k -> *`. (#10039)


382
383
384
385
386
387
388
389
390
391
## 4.8.2.0  *Oct 2015*

  * Bundled with GHC 7.10.3

  * The restore operation provided by `mask` and `uninterruptibleMask` now
    restores the previous masking state whatever the current masking state is.

  * Exported `GiveGCStats`, `DoCostCentres`, `DoHeapProfile`, `DoTrace`,
    `RtsTime`, and `RtsNat` from `GHC.RTS.Flags`

392
## 4.8.1.0  *Jul 2015*
393
394
395

  * Bundled with GHC 7.10.2

396
397
  * `Lifetime` is now exported from `GHC.Event`

398
  * Implicit-parameter based source location support exposed in `GHC.SrcLoc` and `GHC.Stack`.
399
400
    See GHC User's Manual for more information.

401
## 4.8.0.0  *Mar 2015*
402
403
404

  * Bundled with GHC 7.10.1

405
406
  * Make `Applicative` a superclass of `Monad`

407
408
  * Add reverse application operator `Data.Function.(&)`

409
410
  * Add `Data.List.sortOn` sorting function

Simon Hengel's avatar
Simon Hengel committed
411
412
  * Add `System.Exit.die`

413
414
415
416
417
418
  * Deprecate `versionTags` field of `Data.Version.Version`.
    Add `makeVersion :: [Int] -> Version` constructor function to aid
    migration to a future `versionTags`-less `Version`.

  * Add `IsList Version` instance

419
420
  * Weaken RealFloat constraints on some `Data.Complex` functions

421
422
  * Add `Control.Monad.(<$!>)` as a strict version of `(<$>)`

423
424
425
426
  * The `Data.Monoid` module now has the `PolyKinds` extension
    enabled, so that the `Monoid` instance for `Proxy` are polykinded
    like `Proxy` itself is.

427
  * Make `abs` and `signum` handle (-0.0) correctly per IEEE-754.
428

429
430
  * Re-export `Data.Word.Word` from `Prelude`

431
432
433
  * Add `countLeadingZeros` and `countTrailingZeros` methods to
    `Data.Bits.FiniteBits` class

434
435
  * Add `Data.List.uncons` list destructor (#9550)

436
437
438
439
440
441
442
  * Export `Monoid(..)` from `Prelude`

  * Export `Foldable(..)` from `Prelude`
    (hiding `fold`, `foldl'`, `foldr'`, and `toList`)

  * Export `Traversable(..)` from `Prelude`

443
444
445
  * Set fixity for `Data.Foldable.{elem,notElem}` to match the
    conventional one set for `Data.List.{elem,notElem}` (#9610)

446
447
448
  * Turn `toList`, `elem`, `sum`, `product`, `maximum`, and `minimum`
    into `Foldable` methods (#9621)

449
450
451
  * Replace the `Data.List`-exported functions

    ```
452
453
    all, and, any, concat, concatMap, elem, find, product, sum,
    mapAccumL, mapAccumR
454
455
    ```

456
457
458
459
    by re-exports of their generalised `Data.Foldable`/`Data.Traversable`
    counterparts.  In other words, unqualified imports of `Data.List`
    and `Data.Foldable`/`Data.Traversable` no longer lead to conflicting
    definitions. (#9586)
460

461
462
463
464
  * New (unofficial) module `GHC.OldList` containing only list-specialised
    versions of the functions from `Data.List` (in other words, `GHC.OldList`
    corresponds to `base-4.7.0.2`'s `Data.List`)

465
466
467
  * Replace the `Control.Monad`-exported functions

    ```
468
469
    sequence_, msum, mapM_, forM_,
    forM, mapM, sequence
470
471
    ```

472
473
474
475
    by re-exports of their generalised `Data.Foldable`/`Data.Traversable`
    counterparts.  In other words, unqualified imports of `Control.Monad`
    and `Data.Foldable`/`Data.Traversable` no longer lead to conflicting
    definitions. (#9586)
476

477
478
479
  * Generalise `Control.Monad.{when,unless,guard}` from `Monad` to
    `Applicative` and from `MonadPlus` to `Alternative` respectively.

480
481
  * Generalise `Control.Monad.{foldM,foldM_}` to `Foldable`

David Feuer's avatar
David Feuer committed
482
483
  * `scanr`, `mapAccumL` and `filterM` now take part in list fusion (#9355,
    #9502, #9546)
484

485
486
  * Remove deprecated `Data.OldTypeable` (#9639)

487
488
489
  * New module `Data.Bifunctor` providing the `Bifunctor(bimap,first,second)`
    class (previously defined in `bifunctors` package) (#9682)

490
491
492
  * New module `Data.Void` providing the canonical uninhabited type `Void`
    (previously defined in `void` package) (#9814)

493
494
  * Update Unicode class definitions to Unicode version 7.0

495
496
  * Add `Alt`, an `Alternative` wrapper, to `Data.Monoid`. (#9759)

497
498
  * Add `isSubsequenceOf` to `Data.List` (#9767)

499
500
501
502
  * The arguments to `==` and `eq` in `Data.List.nub` and `Data.List.nubBy`
    are swapped, such that `Data.List.nubBy (<) [1,2]` now returns `[1]`
    instead of `[1,2]` (#2528, #3280, #7913)

503
504
505
  * New module `Data.Functor.Identity` (previously provided by `transformers`
    package). (#9664)

506
507
508
  * Add `scanl'`, a strictly accumulating version of `scanl`, to `Data.List`
    and `Data.OldList`. (#9368)

509
510
  * Add `fillBytes` to `Foreign.Marshal.Utils`.

511
512
  * Add new `displayException` method to `Exception` typeclass. (#9822)

513
514
515
  * Add `Data.Bits.toIntegralSized`, a size-checked version of
    `fromIntegral`. (#9816)

516
517
518
519
  * New module `Numeric.Natural` providing new `Natural` type
    representing non-negative arbitrary-precision integers.  The `GHC.Natural`
    module exposes additional GHC-specific primitives. (#9818)

520
521
522
523
  * Add `(Storable a, Integeral a) => Storable (Ratio a)` instance (#9826)

  * Add `Storable a => Storable (Complex a)` instance (#9826)

524
525
  * New module `GHC.RTS.Flags` that provides accessors to runtime flags.

526
527
528
529
530
531
532
533
534
  * Expose functions for per-thread allocation counters and limits in `GHC.Conc`

        disableAllocationLimit :: IO ()
        enableAllocationLimit :: IO ()
        getAllocationCounter :: IO Int64
        setAllocationCounter :: Int64 -> IO ()

    together with a new exception `AllocationLimitExceeded`.

535
536
  * Make `read . show = id` for `Data.Fixed` (#9240)

537
  * Add `calloc` and `callocBytes` to `Foreign.Marshal.Alloc`. (#9859)
538

539
  * Add `callocArray` and `callocArray0` to `Foreign.Marshal.Array`. (#9859)
540

541
542
  * Restore invariant in `Data (Ratio a)` instance (#10011)

543
544
  * Add/expose `rnfTypeRep`, `rnfTyCon`, `typeRepFingerprint`, and
    `tyConFingerprint` helpers to `Data.Typeable`.
545

546
547
  * Define proper `MINIMAL` pragma for `class Ix`. (#10142)

548
549
550
551
552
553
554
555
## 4.7.0.2  *Dec 2014*

  * Bundled with GHC 7.8.4

  * Fix performance bug in `Data.List.inits` (#9345)

  * Fix handling of null bytes in `Debug.Trace.trace` (#9395)

556
557
558
559
560
561
562
563
564
565
566
567
568
## 4.7.0.1  *Jul 2014*

  * Bundled with GHC 7.8.3

  * Unhide `Foreign.ForeignPtr` in Haddock (#8475)

  * Fix recomputation of `TypeRep` in `Typeable` type-application instance
    (#9203)

  * Fix regression in Data.Fixed Read instance (#9231)

  * Fix `fdReady` to honor `FD_SETSIZE` (#9168)

569
## 4.7.0.0  *Apr 2014*
570
571
572

  * Bundled with GHC 7.8.1

573
574
575
576
  * Add `/Since: 4.[4567].0.0/` Haddock annotations to entities
    denoting the package version, when the given entity was introduced
    (or its type signature changed in a non-compatible way)

577
578
579
580
581
582
583
  * The `Control.Category` module now has the `PolyKinds` extension
    enabled, meaning that instances of `Category` no longer need be of
    kind `* -> * -> *`.

  * There are now `Foldable` and `Traversable` instances for `Either a`,
   `Const r`, and `(,) a`.

584
585
  * There are now `Show`, `Read`, `Eq`, `Ord`, `Monoid`, `Generic`, and
    `Generic1` instances for `Const`.
586
587
588

  * There is now a `Data` instance for `Data.Version`.

589
590
591
592
593
  * A new `Data.Bits.FiniteBits` class has been added to represent
    types with fixed bit-count. The existing `Bits` class is extended
    with a `bitSizeMaybe` method to replace the now obsolete
    `bitsize` method.

594
595
596
  * `Data.Bits.Bits` gained a new `zeroBits` method which completes the
    `Bits` API with a direct way to introduce a value with all bits cleared.

597
598
  * There are now `Bits` and `FiniteBits` instances for `Bool`.

599
600
  * There are now `Eq`, `Ord`, `Show`, `Read`, `Generic`. and `Generic1`
    instances for `ZipList`.
601
602
603
604
605
606
607

  * There are now `Eq`, `Ord`, `Show` and `Read` instances for `Down`.

  * There are now `Eq`, `Ord`, `Show`, `Read` and `Generic` instances
    for types in GHC.Generics (`U1`, `Par1`, `Rec1`, `K1`, `M1`,
    `(:+:)`, `(:*:)`, `(:.:)`).

608
609
610
611
612
613
  * `Data.Monoid`: There are now `Generic` instances for `Dual`, `Endo`,
    `All`, `Any`, `Sum`, `Product`, `First`, and `Last`; as well as
    `Generic1` instances for `Dual`, `Sum`, `Product`, `First`, and `Last`.

  * The `Data.Monoid.{Product,Sum}` newtype wrappers now have `Num` instances.

614
615
616
  * There are now `Functor` instances for `System.Console.GetOpt`'s
    `ArgOrder`, `OptDescr`, and `ArgDescr`.

617
618
619
620
621
  * A zero-width unboxed poly-kinded `Proxy#` was added to
    `GHC.Prim`. It can be used to make it so that there is no the
    operational overhead for passing around proxy arguments to model
    type application.

622
623
  * New `Data.Proxy` module providing a concrete, poly-kinded proxy type.

624
625
626
627
  * New `Data.Coerce` module which exports the new `Coercible` class
    together with the `coerce` primitive which provide safe coercion
    (wrt role checking) between types with same representation.

628
629
630
631
632
633
634
  * `Control.Concurrent.MVar` has a new implementation of `readMVar`,
    which fixes a long-standing bug where `readMVar` is only atomic if
    there are no other threads running `putMVar`.  `readMVar` now is
    atomic, and is guaranteed to return the value from the first
    `putMVar`.  There is also a new `tryReadMVar` which is a
    non-blocking version.

635
636
637
638
  * New `Control.Concurrent.MVar.withMVarMasked` which executes
    `IO` action with asynchronous exceptions masked in the same style
    as the existing `modifyMVarMasked` and `modifyMVarMasked_`.

639
640
641
642
643
644
645
646
647
  * New `threadWait{Read,Write}STM :: Fd -> IO (STM (), IO ())`
    functions added to `Control.Concurrent` for waiting on FD
    readiness with STM actions.

  * Expose `Data.Fixed.Fixed`'s constructor.

  * There are now byte endian-swapping primitives
    `byteSwap{16,32,64}` available in `Data.Word`, which use
    optimized machine instructions when available.
648
649
650
651

  * `Data.Bool` now exports `bool :: a -> a -> Bool -> a`, analogously
    to `maybe` and `either` in their respective modules.

652
653
654
655
656
657
658
  * `Data.Either` now exports `isLeft, isRight :: Either a b -> Bool`.

  * `Debug.Trace` now exports `traceId`, `traceShowId`, `traceM`,
    and `traceShowM`.

  * `Data.Functor` now exports `($>)` and `void`.

659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
  * Rewrote portions of `Text.Printf`, and made changes to `Numeric`
    (added `Numeric.showFFloatAlt` and `Numeric.showGFloatAlt`) and
    `GHC.Float` (added `formatRealFloatAlt`) to support it.  The
    rewritten version is extensible to user types, adds a "generic"
    format specifier "`%v`", extends the `printf` spec to support much
    of C's `printf(3)` functionality, and fixes the spurious warnings
    about using `Text.Printf.printf` at `(IO a)` while ignoring the
    return value.  These changes were contributed by Bart Massey.

  * The minimal complete definitions for all type-classes with cyclic
    default implementations have been explicitly annotated with the
    new `{-# MINIMAL #-}` pragma.

  * `Control.Applicative.WrappedMonad`, which can be used to convert a
    `Monad` to an `Applicative`, has now a
    `Monad m => Monad (WrappedMonad m)` instance.
675

676
677
678
  * There is now a `Generic` and a `Generic1` instance for `WrappedMonad`
    and `WrappedArrow`.

679
680
681
682
683
684
685
686
687
688
689
  * Handle `ExitFailure (-sig)` on Unix by killing process with signal `sig`.

  * New module `Data.Type.Bool` providing operations on type-level booleans.

  * Expose `System.Mem.performMinorGC` for triggering minor GCs.

  * New `System.Environment.{set,unset}Env` for manipulating
    environment variables.

  * Add `Typeable` instance for `(->)` and `RealWorld`.

690
  * Declare CPP header `<Typeable.h>` officially obsolete as GHC 7.8+
691
692
693
694
695
696
697
698
699
    does not support hand-written `Typeable` instances anymore.

  * Remove (unmaintained) Hugs98 and NHC98 specific code.

  * Optimize `System.Timeout.timeout` for the threaded RTS.

  * Remove deprecated functions `unsafeInterleaveST`, `unsafeIOToST`,
    and `unsafeSTToIO` from `Control.Monad.ST`.

700
701
702
703
  * Add a new superclass `SomeAsyncException` for all asynchronous exceptions
    and makes the existing `AsyncException` and `Timeout` exception children
    of `SomeAsyncException` in the hierarchy.

704
705
706
707
708
709
710
711
712
  * Remove deprecated functions `blocked`, `unblock`, and `block` from
    `Control.Exception`.

  * Remove deprecated function `forkIOUnmasked` from `Control.Concurrent`.

  * Remove deprecated function `unsafePerformIO` export from `Foreign`
    (still available via `System.IO.Unsafe.unsafePerformIO`).

  * Various fixes and other improvements (see Git history for full details).