Changelog for base-compat-0.13.1
Changes in 0.13.1 [2023.10.11]
- Sync with
base-4.19
/GHC 9.8 - Backport
unzip
toData.Functor.Compat
- Backport
(!?)
andunsnoc
toData.List.Compat
- Backport
getSolo
toData.Tuple.Compat
when building againstghc-prim-0.8.0
(GHC 9.2) or later. To backportgetSolo
to older versions of GHC, importData.Tuple.Compat
frombase-compat-batteries
instead. - Backport
decT
andhdecT
toData.Typeable.Compat
- Backport
decTypeRep
toType.Reflection.Compat
Changes in 0.13.0 [2023.03.10]
- Sync with
base-4.18
/GHC 9.6 - Backport
liftA2
being re-exported fromPrelude.Compat
. Data.Tuple.Compat
'sSolo
API now matches what is present inData.Tuple
inbase-4.18
. In particular, we now re-export both theMkSolo
andSolo
data constructors when building withghc-prim-0.10.0
or later, withMkSolo
being preferred overSolo
. If you want to backportMkSolo
to earlier versions of GHC, importData.Tuple.Compat
frombase-compat-batteries
instead.- Backport
traceWith
,traceShowWith
, andtraceEventWith
toDebug.Trace
. Note thattraceEventWith
is only provided when building withbase-4.5
or later, as that is the first version ofbase
to provide thetraceEvent
primitive on whichtraceEventWith
is defined. - Backport
inits1
andtails1
toData.List.NonEmpty.Compat
. - Backport
minusNaturalMaybe
toNumeric.Natural.Compat
. - Backport
applyWhen
toData.Function.Compat
. - Backport
mapAccumM
andforAccumM
toData.Traversable.Compat
. - Backport
heqT
toData.Typeable.Compat
. Note thatheqT
is only defined when building withbase-4.10
or later, as that is the first version ofbase
to provide the primitives needed to defineheqT
. - Introduce
Data.Foldable1.Compat
andData.Bifoldable1.Compat
modules, which correspond to changes made inbase-4.18.0.0
. You may consider usingbase-compat-batteries
instead if you want increase the range ofbase
versions that are supported.
Changes in 0.12.3 [2023.07.12]
- This coincides with the
base-compat-batteries-0.12.3
release. Refer to thebase-compat-batteries
changelog for more details.
Changes in 0.12.2 [2022.08.11]
- Sync with
base-4.17
/GHC 9.4 - Backport
(.^.)
,(.>>.)
,(.<<.)
,(!>>.)
,(!<<.)
,oneBits
toData.Bits.Compat
- Backport
pattern TypeRep
toType.Reflection.Compat
Changes in 0.12.1 [2021.10.30]
- Backport
Solo
toData.Tuple.Compat
when building withghc-prim-0.7.0
or later
Changes in 0.12.0 [2021.08.29]
- Sync with
base-4.16
/GHC 9.2 Data.Semigroup.Compat{.Repl}
no longer re-exports theOption
data type or theoption
function, as both have been removed inbase-4.16
.- Backport
readBin
andshowBin
toNumeric.Compat
- Backport
readBinP
toText.Read.Lex.Compat
Changes in 0.11.2 [2020.09.30]
- Sync with
base-4.15
/GHC 9.0 - Backport
singleton
toData.List.Compat
andData.List.NonEmpty.Compat
- Backport
hGetContents'
,getContents'
, andreadFile'
added toSystem.IO.Compat
Changes in 0.11.1 [2020.01.27]
- Sync with
base-4.14
/GHC 8.10 - Backport
isResourceVanishedError
,resourceVanishedErrorType
, andisResourceVanishedErrorType
toSystem.IO.Error.Compat
.
Changes in 0.11.0 [2019.09.06]
-
Sync with
base-4.13
/GHC 8.8 -
Backport
MonadFail(fail)
toPrelude.Compat
andControl.Monad.Compat
.Because
Prelude.Compat.fail
now corresponds to thefail
fromMonadFail
instead ofMonad
, some care is required to implementMonad.fail
on pre-8.8 versions of GHC. The following template is recommended:import Prelude.Compat import qualified Control.Monad as Monad import qualified Control.Monad.Fail as Fail data Blah a = ... instance Functor Blah where ... instance Applicative Blah where ... instance Monad.Monad Blah where (>>=) = ... #if !(MIN_VERSION_base(4,13,0)) fail = Fail.fail #endif instance Fail.MonadFail Blah where fail = ...
This approach is also backwards-compatible with previous releases of
base-compat
.Note that the
MonadFail
class has only been inbase
sincebase-4.9
/GHC 8.0, so accordingly, this can only be backported back to GHC 8.0. If you wish to have a version ofPrelude.Compat
/Control.Monad.Compat
that backportsMonadFail
to older GHCs (by conditionally depending on thefail
library), use thePrelude.Compat
/Control.Monad.Compat
modules from thebase-compat-batteries
package. -
Introduce the
Data.Type.Equality.Compat
module, which re-exportsData.Type.Equality
if usingbase-4.7
/GHC-7.8 or later. If using an older version ofbase
, this module is empty.If you wish to have a version of
Data.Type.Equality.Compat
with older GHCs (by conditionally depending on thetype-equality
library), use theData.Type.Equality.Compat
module from thebase-compat-batteries
package.
Changes in 0.10.5 [2018.10.18]
- Enable
BangPatterns
inPrelude.Compat
.
Changes in 0.10.4 [2018.07.03]
- Make more modules
Trustworthy
. In particular, fix a regression in whichPrelude.Compat
was inferred asUnsafe
by explicitly marking it asTrustwothy
.
Changes in 0.10.3 [2018.07.02]
- Backport the proper fixity for
($!)
, which was accidentally omitted inbase-compat-0.10.2
.
Changes in 0.10.2 [2018.07.02]
-
Sync with
base-4.12
/GHC 8.6 -
Backport
RuntimeRep
-polymorphic versions of($!)
andthrow
toPrelude.Compat
andControl.Exception.Compat
, respectively (if usingbase-4.10
/GHC 8.2 or later). -
Introduce the
Data.Functor.Contravariant.Compat
module, which reexportsData.Functor.Contravariant
if usingbase-4.12
/GHC 8.6 or later.See
Data.Functor.Contravariant.Compat
in the correspondingbase-compat-batteries
release for a version with a wider support window.
Changes in 0.10.1 [2018.04.10]
- Add
Data.List.NonEmpty.Compat
. - Reexport
(Data.Semigroup.<>)
fromData.Monoid.Compat
back tobase-4.9
.
Changes in 0.10.0 [2018.04.05]
-
Sync with
base-4.11
/GHC 8.4 -
Backport
Semigroup((<>))
toPrelude.Compat
.Note that the
Semigroup
class has only been inbase
sincebase-4.9
/GHC 8.0, so accordingly, this can only be backported back to GHC 8.0. If you wish to have a version ofPrelude.Compat
that backportsSemigroup
to older GHCs (by conditionally depending on thesemigroups
library), use thePrelude.Compat
module from thebase-compat-batteries
package. -
Backport
(<&>)
toData.Functor.Compat
-
Backport
iterate'
toData.List.Compat
-
Backport
showHFloat
toNumeric.Compat
-
Backport a
RuntimeRep
-polymorphicwithTypeable
function toType.Reflection.Compat
. (This is only exported onbase-4.10
/GHC 8.2.) -
Introduce the following modules, back until the oldest version of
base
that can support backporting them. If you wish to use them in conjunction with older versions ofbase
, use thebase-compat-batteries
package.Control.Monad.Fail.Compat
(back untilbase-4.9
/GHC 8.0)Control.Monad.IO.Class.Compat
(back untilbase-4.9
/GHC 8.0)Data.Bifunctor
(back untilbase-4.8
/GHC 7.10)Data.Bifoldable
andData.Bitraversable
(back untilbase-4.10
/GHC 8.2)Data.Functor.Compose.Compat
,Data.Functor.Product.Compat
, andData.Functor.Sum.Compat
(back untilbase-4.9
/GHC 8.0)Data.Functor.Identity.Compat
(back untilbase-4.8
/GHC 7.10)Data.Semigroup.Compat
(back untilbase-4.9
/GHC 8.0)Data.Void.Compat
(back untilbase-4.8
/GHC 7.10)Numeric.Natural.Compat
(back untilbase-4.8
/GHC 7.10)
-
Introduce versions of modules with the suffix
.Repl
. These simply reexport the contents of their counterparts without the.Repl
suffix to provide a globally unique namespace to import from in the event one wants to importbase-compat
modules into GHCi. (Inbase-compat-batteries
, the corresponding suffix is.Repl.Batteries
.)
Changes in 0.9.3 [2017.04.10]
- Sync with
base-4.10
/GHC 8.2 - Backport
fromLeft
/fromRight
toData.Either.Compat
- Backport implementations of
maximumBy
/minimumBy
which use constant stack space toData.Foldable.Compat
- Backport
asProxyTypeOf
with a generalized type signature toData.Proxy.Compat
- Backport
gcoerceWith
toData.Type.Coercion.Compat
- Backport
plusForeignPtr
toForeign.ForeignPtr.Compat
Changes in 0.9.2
- Allow building on the HaLVM
Changes in 0.9.1
- Use the more efficient version of
replicateM
andreplicateM_
introduced inbase-4.9
Changes in 0.9.0
- Sync with
base-4.9
/GHC 8.0 - Weakened
RealFloat
constraints onrealPart
,imagPart
,conjugate
,mkPolar
, andcis
inData.Complex.Compat
- Backport
Foreign.ForeignPtr.Safe
andForeign.Marshal.Safe
- Generalize
filterM
,forever
,mapAndUnzipM
,zipWithM
,zipWithM_
,replicateM
, andreplicateM_
inControl.Monad
fromMonad
toApplicative
- Backport
.Unsafe.Compat
modules (forControl.Monad.ST
,Control.Monad.ST.Lazy
,Foreign.ForeignPtr
, andForeign.Marshal
) - Backport
forkFinally
andforkOSWithUnmask
toControl.Concurrent.Compat
- Backport
Data.Functor.Const
- Backport
modifyIORef'
,atomicModifyIORef'
andatomicWriteIORef
toData.IORef.Compat
Data.Ratio.{denominator,numerator}
have noIntegral
constraint anymore- Backport
modifySTRef'
toData.STRef.Compat
- Export
String
,lines
,words
,unlines
, andunwords
toData.String.Compat
- Generalize
Debug.Trace.{traceM, traceShowM}
fromMonad
toApplicative
- Backport
errorWithoutStackTrace
toPrelude.Compat
- Backport
unsafeFixIO
andunsafeDupablePerformIO
toSystem.IO.Unsafe.Compat
Changes in 0.8.2
- Backport
bitDefault
,testBitDefault
, andpopCountDefault
inData.Bits.Compat
to all versions ofbase
- Backport
toIntegralSized
tobase-4.7
- Backport
- Backport
nub
andnubBy
(as well asunion
andunionBy
, which are implemented in terms of them) to fix logic error inData.List.Compat
- Backport
byteSwap16
,byteSwap32
, andbyteSwap64
toData.Word.Compat
- Backport
fillBytes
inForeign.Marshal.Utils.Compat
- Backport
showFFloatAlt
andshowGFloatAlt
toNumeric.Compat
Changes in 0.8.1.1
- Fixed Windows build
Changes in 0.8.1
- Implement
setEnv
andunsetEnv
inSystem.Environment.Compat
(which were ported from thesetenv
package). As a result,base-compat
now depends onunix
on POSIX-like operating systems. - Drop GHC 6.12 (and
base-4.2.0.0
) compatibility
Changes in 0.8.0.1
- Retrospective version bump updating the changelog to reflect the changes made in 0.8.0
Changes 0.8.0
- All orphan instances were split off into a separate package,
base-orphans
base-compat
no longer redefines the data typesDown
andAlt
. See here for the discussion that led to this change.- Update
Control.Monad.Compat
forbase-4.8.0.0
- Update
Data.List.Compat
forbase-4.8.0.0
- Update
Data.Foldable.Compat
forbase-4.8.0.0
Changes in 0.7.1
- Backported
Alt
toData.Monoid.Compat
- Backported
Down
toData.Ord.Compat
Changes in 0.7.0
- Add functions and orphan instances introduced by changes to
base-4.7.0.0
andbase-4.8.0.0
Changes in 0.6.0
- Update
Prelude.Compat
forbase-4.8.0.0
and AMP
Changes in 0.5.0
- Remove Control.Exception.Base.Compat and GHC.Exception.Compat
- Add System.Exit.Compat.die
- Compatibility with base-4.7.1
Changes in 0.4.1
- Add
setEnv
andunsetEnv
toSystem.Environment.Compat
Changes in 0.4.0
- Major refactoring: base-compat no longer aims to replace all base, only new code is included in module .Compat
- Removed stubbed modules
- Removed generation scripts
Changes in 0.3
- Added functions from Base 4.7 (bool, isLeft, isRight)
- Added instances from Base 4.7 (Either Foldable, Traversable,...)
Changes in 0.2.1
- Fix build on windows
Changes in 0.2.0
- Re-export everything from base
- provides access to
VERSION_base
andMIN_VERSION_base
CPP macros (with#include "base-compat.h"
) - Do not re-export
System.IO.Error.catch
fromPrelude
forbase
< 4.6.0 - Add
Eq
/Ord
instance forErrorCall
- Remove
GHC.IOBase
,GHC.Handle
,Control.Concurrent.QSem
,Control.Concurrent.QSemN
,Control.Concurrent.SampleVar
,Data.HashTable
Changes in 0.1.0
- Remove getExecutablePath, it did not work with GHC < 7.2 (patches welcome!)
- Add
<>