Changelog for base-4.9.1.0
Changelog for base
package
4.9.1.0 Jan 2017
Bundled with GHC 8.0.2
Performance improvements in
Read
implementationTeach event manager to use poll instead of select (#12912)
4.9.0.0 May 2016
Bundled with GHC 8.0
error
andundefined
now print a partial stack-trace alongside the error message.New
errorWithoutStackTrace
function throws an error without printing the stack trace.The restore operation provided by
mask
anduninterruptibleMask
now restores the previous masking state whatever the current masking state is.New
GHC.Generics.packageName
operationRedesigned
GHC.Stack.CallStack
data type. As a result,CallStack
'sShow
instance produces different output, andCallStack
no longer has anEq
instance.New
GHC.Generics.packageName
operationNew
GHC.Stack.Types
module now contains the definition ofCallStack
andSrcLoc
New
GHC.Stack.Types.emptyCallStack
function builds an emptyCallStack
New
GHC.Stack.Types.freezeCallStack
function freezes aCallStack
preventing futurepushCallStack
operations from having any effectNew
GHC.Stack.Types.pushCallStack
function pushes a call-site onto aCallStack
New
GHC.Stack.Types.fromCallSiteList
function creates aCallStack
from a list of call-sites (i.e.,[(String, SrcLoc)]
)GHC.SrcLoc
has been removedGHC.Stack.showCallStack
andGHC.SrcLoc.showSrcLoc
are now calledGHC.Stack.prettyCallStack
andGHC.Stack.prettySrcLoc
respectivelyadd
Data.List.NonEmpty
andData.Semigroup
(to become super-class ofMonoid
in the future). These modules were provided by thesemigroups
package previously. (#10365)Add
selSourceUnpackedness
,selSourceStrictness
, andselDecidedStrictness
, three functions which look up strictness information of a field in a data constructor, to theSelector
type class inGHC.Generics
(#10716)Add
URec
,UAddr
,UChar
,UDouble
,UFloat
,UInt
, andUWord
toGHC.Generics
as part of making GHC generics capable of handling unlifted types (#10868)The
Eq
,Ord
,Read
, andShow
instances forU1
now use lazier pattern-matchingKeep
shift{L,R}
onInteger
with negative shift-arguments from segfaulting (#10571)Add
forkOSWithUnmask
toControl.Concurrent
, which is likeforkIOWithUnmask
, but the child is run in a bound thread.The
MINIMAL
definition ofArrow
is nowarr AND (first OR (***))
.The
MINIMAL
definition ofArrowChoice
is nowleft OR (+++)
.Exported
GiveGCStats
,DoCostCentres
,DoHeapProfile
,DoTrace
,RtsTime
, andRtsNat
fromGHC.RTS.Flags
New function
GHC.IO.interruptible
used to correctly implementControl.Exception.allowInterrupt
(#9516)Made
PatternMatchFail
,RecSelError
,RecConError
,RecUpdError
,NoMethodError
, andAssertionFailed
newtypes (#10738)New module
Control.Monad.IO.Class
(previously provided bytransformers
package). (#10773)New modules
Data.Functor.Classes
,Data.Functor.Compose
,Data.Functor.Product
, andData.Functor.Sum
(previously provided bytransformers
package). (#11135)New instances for
Proxy
:Eq1
,Ord1
,Show1
,Read1
. All of the classes are fromData.Functor.Classes
(#11756).New module
Control.Monad.Fail
providing newMonadFail(fail)
class (#10751)Add
GHC.TypeLits.TypeError
andErrorMessage
to allow users to define custom compile-time error messages.Redesign
GHC.Generics
to use type-level literals to represent the metadata of generic representation types (#9766)The
IsString
instance for[Char]
has been modified to eliminate ambiguity arising from overloaded strings and functions like(++)
.Move
Const
fromControl.Applicative
to its own module inData.Functor.Const
. (#11135)Re-export
Const
fromControl.Applicative
for backwards compatibility.Expand
Floating
class to include operations that allow for better precision:log1p
,expm1
,log1pexp
andlog1mexp
. These are not available fromPrelude
, but the full class is exported fromNumeric
.New
Control.Exception.TypeError
datatype, which is thrown when an expression fails to typecheck when run using-fdefer-type-errors
(#10284)
New instances
Alt
,Dual
,First
,Last
,Product
, andSum
now haveData
,MonadZip
, andMonadFix
instancesThe datatypes in
GHC.Generics
now haveEnum
,Bounded
,Ix
,Functor
,Applicative
,Monad
,MonadFix
,MonadPlus
,MonadZip
,Foldable
,Foldable
,Traversable
,Generic1
, andData
instances as appropriate.Maybe
now has aMonadZip
instanceAll
andAny
now haveData
instancesDual
,First
,Last
,Product
, andSum
now haveFoldable
andTraversable
instancesDual
,Product
, andSum
now haveFunctor
,Applicative
, andMonad
instances(,) a
now has aMonad
instanceZipList
now hasFoldable
andTraversable
instancesIdentity
now hasSemigroup
andMonoid
instancesIdentity
andConst
now haveBits
,Bounded
,Enum
,FiniteBits
,Floating
,Fractional
,Integral
,IsString
,Ix
,Num
,Real
,RealFloat
,RealFrac
andStorable
instances. (#11210, #11790)()
now has aStorable
instanceComplex
now hasGeneric
,Generic1
,Functor
,Foldable
,Traversable
,Applicative
, andMonad
instancesSystem.Exit.ExitCode
now has aGeneric
instanceData.Version.Version
now has aGeneric
instanceIO
now has aMonoid
instanceAdd
MonadPlus IO
andAlternative IO
instances (previously orphans intransformers
) (#10755)CallStack
now has anIsList
instance
Generalizations
Generalize
Debug.Trace.{traceM, traceShowM}
fromMonad
toApplicative
(#10023)Redundant typeclass constraints have been removed:
Data.Ratio.{denominator,numerator}
have noIntegral
constraint anymore- TODO
Generalise
forever
fromMonad
toApplicative
Generalize
filterM
,mapAndUnzipM
,zipWithM
,zipWithM_
,replicateM
,replicateM_
fromMonad
toApplicative
(#10168)The
Generic
instance forProxy
is now poly-kinded (#10775)Enable
PolyKinds
in theData.Functor.Const
module to giveConst
the kind* -> k -> *
. (#10039)
4.8.2.0 Oct 2015
Bundled with GHC 7.10.3
The restore operation provided by
mask
anduninterruptibleMask
now restores the previous masking state whatever the current masking state is.Exported
GiveGCStats
,DoCostCentres
,DoHeapProfile
,DoTrace
,RtsTime
, andRtsNat
fromGHC.RTS.Flags
4.8.1.0 Jul 2015
Bundled with GHC 7.10.2
Lifetime
is now exported fromGHC.Event
Implicit-parameter based source location support exposed in
GHC.SrcLoc
andGHC.Stack
. See GHC User's Manual for more information.
4.8.0.0 Mar 2015
Bundled with GHC 7.10.1
Make
Applicative
a superclass ofMonad
Add reverse application operator
Data.Function.(&)
Add
Data.List.sortOn
sorting functionAdd
System.Exit.die
Deprecate
versionTags
field ofData.Version.Version
. AddmakeVersion :: [Int] -> Version
constructor function to aid migration to a futureversionTags
-lessVersion
.Add
IsList Version
instanceWeaken RealFloat constraints on some
Data.Complex
functionsAdd
Control.Monad.(<$!>)
as a strict version of(<$>)
The
Data.Monoid
module now has thePolyKinds
extension enabled, so that theMonoid
instance forProxy
are polykinded likeProxy
itself is.Make
abs
andsignum
handle (-0.0) correctly per IEEE-754.Re-export
Data.Word.Word
fromPrelude
Add
countLeadingZeros
andcountTrailingZeros
methods toData.Bits.FiniteBits
classAdd
Data.List.uncons
list destructor (#9550)Export
Monoid(..)
fromPrelude
Export
Foldable(..)
fromPrelude
(hidingfold
,foldl'
,foldr'
, andtoList
)Export
Traversable(..)
fromPrelude
Set fixity for
Data.Foldable.{elem,notElem}
to match the conventional one set forData.List.{elem,notElem}
(#9610)Turn
toList
,elem
,sum
,product
,maximum
, andminimum
intoFoldable
methods (#9621)Replace the
Data.List
-exported functionsall, and, any, concat, concatMap, elem, find, product, sum, mapAccumL, mapAccumR
by re-exports of their generalised
Data.Foldable
/Data.Traversable
counterparts. In other words, unqualified imports ofData.List
andData.Foldable
/Data.Traversable
no longer lead to conflicting definitions. (#9586)New (unofficial) module
GHC.OldList
containing only list-specialised versions of the functions fromData.List
(in other words,GHC.OldList
corresponds tobase-4.7.0.2
'sData.List
)Replace the
Control.Monad
-exported functionssequence_, msum, mapM_, forM_, forM, mapM, sequence
by re-exports of their generalised
Data.Foldable
/Data.Traversable
counterparts. In other words, unqualified imports ofControl.Monad
andData.Foldable
/Data.Traversable
no longer lead to conflicting definitions. (#9586)Generalise
Control.Monad.{when,unless,guard}
fromMonad
toApplicative
and fromMonadPlus
toAlternative
respectively.Generalise
Control.Monad.{foldM,foldM_}
toFoldable
scanr
,mapAccumL
andfilterM
now take part in list fusion (#9355, #9502, #9546)Remove deprecated
Data.OldTypeable
(#9639)New module
Data.Bifunctor
providing theBifunctor(bimap,first,second)
class (previously defined inbifunctors
package) (#9682)New module
Data.Void
providing the canonical uninhabited typeVoid
(previously defined invoid
package) (#9814)Update Unicode class definitions to Unicode version 7.0
Add
Alt
, anAlternative
wrapper, toData.Monoid
. (#9759)Add
isSubsequenceOf
toData.List
(#9767)The arguments to
==
andeq
inData.List.nub
andData.List.nubBy
are swapped, such thatData.List.nubBy (<) [1,2]
now returns[1]
instead of[1,2]
(#2528, #3280, #7913)New module
Data.Functor.Identity
(previously provided bytransformers
package). (#9664)Add
scanl'
, a strictly accumulating version ofscanl
, toData.List
andData.OldList
. (#9368)Add
fillBytes
toForeign.Marshal.Utils
.Add new
displayException
method toException
typeclass. (#9822)Add
Data.Bits.toIntegralSized
, a size-checked version offromIntegral
. (#9816)New module
Numeric.Natural
providing newNatural
type representing non-negative arbitrary-precision integers. TheGHC.Natural
module exposes additional GHC-specific primitives. (#9818)Add
(Storable a, Integeral a) => Storable (Ratio a)
instance (#9826)Add
Storable a => Storable (Complex a)
instance (#9826)New module
GHC.RTS.Flags
that provides accessors to runtime flags.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
.Make
read . show = id
forData.Fixed
(#9240)Add
calloc
andcallocBytes
toForeign.Marshal.Alloc
. (#9859)Add
callocArray
andcallocArray0
toForeign.Marshal.Array
. (#9859)Restore invariant in
Data (Ratio a)
instance (#10011)Add/expose
rnfTypeRep
,rnfTyCon
,typeRepFingerprint
, andtyConFingerprint
helpers toData.Typeable
.Define proper
MINIMAL
pragma forclass Ix
. (#10142)
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)
4.7.0.1 Jul 2014
Bundled with GHC 7.8.3
Unhide
Foreign.ForeignPtr
in Haddock (#8475)Fix recomputation of
TypeRep
inTypeable
type-application instance (#9203)Fix regression in Data.Fixed Read instance (#9231)
Fix
fdReady
to honorFD_SETSIZE
(#9168)
4.7.0.0 Apr 2014
Bundled with GHC 7.8.1
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)The
Control.Category
module now has thePolyKinds
extension enabled, meaning that instances ofCategory
no longer need be of kind* -> * -> *
.There are now
Foldable
andTraversable
instances forEither a
,Const r
, and(,) a
.There are now
Show
,Read
,Eq
,Ord
,Monoid
,Generic
, andGeneric1
instances forConst
.There is now a
Data
instance forData.Version
.A new
Data.Bits.FiniteBits
class has been added to represent types with fixed bit-count. The existingBits
class is extended with abitSizeMaybe
method to replace the now obsoletebitsize
method.Data.Bits.Bits
gained a newzeroBits
method which completes theBits
API with a direct way to introduce a value with all bits cleared.There are now
Bits
andFiniteBits
instances forBool
.There are now
Eq
,Ord
,Show
,Read
,Generic
. andGeneric1
instances forZipList
.There are now
Eq
,Ord
,Show
andRead
instances forDown
.There are now
Eq
,Ord
,Show
,Read
andGeneric
instances for types in GHC.Generics (U1
,Par1
,Rec1
,K1
,M1
,(:+:)
,(:*:)
,(:.:)
).Data.Monoid
: There are nowGeneric
instances forDual
,Endo
,All
,Any
,Sum
,Product
,First
, andLast
; as well asGeneric1
instances forDual
,Sum
,Product
,First
, andLast
.The
Data.Monoid.{Product,Sum}
newtype wrappers now haveNum
instances.There are now
Functor
instances forSystem.Console.GetOpt
'sArgOrder
,OptDescr
, andArgDescr
.A zero-width unboxed poly-kinded
Proxy#
was added toGHC.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.New
Data.Proxy
module providing a concrete, poly-kinded proxy type.New
Data.Coerce
module which exports the newCoercible
class together with thecoerce
primitive which provide safe coercion (wrt role checking) between types with same representation.Control.Concurrent.MVar
has a new implementation ofreadMVar
, which fixes a long-standing bug wherereadMVar
is only atomic if there are no other threads runningputMVar
.readMVar
now is atomic, and is guaranteed to return the value from the firstputMVar
. There is also a newtryReadMVar
which is a non-blocking version.New
Control.Concurrent.MVar.withMVarMasked
which executesIO
action with asynchronous exceptions masked in the same style as the existingmodifyMVarMasked
andmodifyMVarMasked_
.New
threadWait{Read,Write}STM :: Fd -> IO (STM (), IO ())
functions added toControl.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 inData.Word
, which use optimized machine instructions when available.Data.Bool
now exportsbool :: a -> a -> Bool -> a
, analogously tomaybe
andeither
in their respective modules.Data.Either
now exportsisLeft, isRight :: Either a b -> Bool
.Debug.Trace
now exportstraceId
,traceShowId
,traceM
, andtraceShowM
.Data.Functor
now exports($>)
andvoid
.Rewrote portions of
Text.Printf
, and made changes toNumeric
(addedNumeric.showFFloatAlt
andNumeric.showGFloatAlt
) andGHC.Float
(addedformatRealFloatAlt
) to support it. The rewritten version is extensible to user types, adds a "generic" format specifier "%v
", extends theprintf
spec to support much of C'sprintf(3)
functionality, and fixes the spurious warnings about usingText.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 aMonad
to anApplicative
, has now aMonad m => Monad (WrappedMonad m)
instance.There is now a
Generic
and aGeneric1
instance forWrappedMonad
andWrappedArrow
.Handle
ExitFailure (-sig)
on Unix by killing process with signalsig
.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(->)
andRealWorld
.Declare CPP header
<Typeable.h>
officially obsolete as GHC 7.8+ does not support hand-writtenTypeable
instances anymore.Remove (unmaintained) Hugs98 and NHC98 specific code.
Optimize
System.Timeout.timeout
for the threaded RTS.Remove deprecated functions
unsafeInterleaveST
,unsafeIOToST
, andunsafeSTToIO
fromControl.Monad.ST
.Add a new superclass
SomeAsyncException
for all asynchronous exceptions and makes the existingAsyncException
andTimeout
exception children ofSomeAsyncException
in the hierarchy.Remove deprecated functions
blocked
,unblock
, andblock
fromControl.Exception
.Remove deprecated function
forkIOUnmasked
fromControl.Concurrent
.Remove deprecated function
unsafePerformIO
export fromForeign
(still available viaSystem.IO.Unsafe.unsafePerformIO
).Various fixes and other improvements (see Git history for full details).