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

3
## 4.8.0.0  *TBA*
4 5 6

  * Bundled with GHC 7.10.1

7 8
  * Make `Applicative` a superclass of `Monad`

9 10
  * Add reverse application operator `Data.Function.(&)`

11 12
  * Add `Data.List.sortOn` sorting function

Simon Hengel's avatar
Simon Hengel committed
13 14
  * Add `System.Exit.die`

15 16
  * Weaken RealFloat constraints on some `Data.Complex` functions

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

19 20 21 22
  * The `Data.Monoid` module now has the `PolyKinds` extension
    enabled, so that the `Monoid` instance for `Proxy` are polykinded
    like `Proxy` itself is.

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

25 26
  * Re-export `Data.Word.Word` from `Prelude`

27 28 29
  * Add `countLeadingZeros` and `countTrailingZeros` methods to
    `Data.Bits.FiniteBits` class

30 31
  * Add `Data.List.uncons` list destructor (#9550)

32 33 34 35 36 37 38
  * Export `Monoid(..)` from `Prelude`

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

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

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

42 43 44
  * Turn `toList`, `elem`, `sum`, `product`, `maximum`, and `minimum`
    into `Foldable` methods (#9621)

45 46 47
  * Replace the `Data.List`-exported functions

    ```
48 49
    all, and, any, concat, concatMap, elem, find, product, sum,
    mapAccumL, mapAccumR
50 51
    ```

52 53 54 55
    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)
56

57 58 59
  * Replace the `Control.Monad`-exported functions

    ```
60 61
    sequence_, msum, mapM_, forM_,
    forM, mapM, sequence
62 63
    ```

64 65 66 67
    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)
68

69 70 71
  * Generalise `Control.Monad.{when,unless,guard}` from `Monad` to
    `Applicative` and from `MonadPlus` to `Alternative` respectively.

72 73
  * Generalise `Control.Monad.{foldM,foldM_}` to `Foldable`

74 75 76 77
  * New module `Data.OldList` containing only list-specialised versions of
    the functions from `Data.List` (in other words, `Data.OldList` corresponds
    to `base-4.7.0.1`'s `Data.List`)

David Feuer's avatar
David Feuer committed
78 79 80 81
  * `foldr2` (together with `zip` and `zipWith`) is made a bit stricter in the
    second argument, so that the fusion RULES for it do not change the
    semantics. (#9596)

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

85 86
  * Remove deprecated `Data.OldTypeable` (#9639)

87 88 89 90 91 92 93 94 95 96 97 98 99
## 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)

100
## 4.7.0.0  *Apr 2014*
101 102 103

  * Bundled with GHC 7.8.1

104 105 106 107
  * 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)

108 109 110 111 112 113 114
  * 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`.

115
  * There is now a `Monoid`, `Generic`, and `Generic1` instance for `Const`.
116 117 118

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

119 120 121 122 123
  * 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.

124 125 126
  * `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.

127 128
  * There are now `Bits` and `FiniteBits` instances for `Bool`.

129 130
  * There are now `Eq`, `Ord`, `Show`, `Read`, `Generic`. and `Generic1`
    instances for `ZipList`.
131 132 133 134 135 136 137

  * 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`,
    `(:+:)`, `(:*:)`, `(:.:)`).

138 139 140 141 142 143
  * `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.

144 145 146
  * There are now `Functor` instances for `System.Console.GetOpt`'s
    `ArgOrder`, `OptDescr`, and `ArgDescr`.

147 148 149 150 151
  * 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.

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

154 155 156 157
  * 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.

158 159 160 161 162 163 164
  * `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.

165 166 167 168
  * New `Control.Concurrent.MVar.withMVarMasked` which executes
    `IO` action with asynchronous exceptions masked in the same style
    as the existing `modifyMVarMasked` and `modifyMVarMasked_`.

169 170 171 172 173 174 175 176 177
  * 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.
178 179 180 181

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

182 183 184 185 186 187 188
  * `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`.

189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
  * 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.
205

206 207 208
  * There is now a `Generic` and a `Generic1` instance for `WrappedMonad`
    and `WrappedArrow`.

209 210 211 212 213 214 215 216 217 218 219
  * 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`.

220
  * Declare CPP header `<Typeable.h>` officially obsolete as GHC 7.8+
221 222 223 224 225 226 227 228 229
    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`.

230 231 232 233
  * Add a new superclass `SomeAsyncException` for all asynchronous exceptions
    and makes the existing `AsyncException` and `Timeout` exception children
    of `SomeAsyncException` in the hierarchy.

234 235 236 237 238 239 240 241 242
  * 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).