Changelog for base-compat-0.14.1
Changes in 0.14.1 [2024.12.06]
- Sync with
base-4.21/GHC 9.12 - Backport
compareLengthtoData.List.CompatandData.List.NonEmpty.Compat - Backport
inits1andtails1toData.List.Compat - Backport
firstAandsecondAtoData.Bitraversable.Compat - Drop support for pre-8.0 versions of GHC.
Changes in 0.14.0 [2024.04.30]
- Sync with
base-4.20/GHC 9.10 - Backport
foldl'toPrelude.Compat - Backport
ListtoData.List.Compat(when building with GHC 9.6 or later) - Backport
append,appendList,prependList,permutations,permutations1, andsortOntoData.List.NonEmpty.Compat(when building with GHC 8.0 or later)
Changes in 0.13.1 [2023.10.11]
- Sync with
base-4.19/GHC 9.8 - Backport
unziptoData.Functor.Compat - Backport
(!?)andunsnoctoData.List.Compat - Backport
getSolotoData.Tuple.Compatwhen building againstghc-prim-0.8.0(GHC 9.2) or later. To backportgetSoloto older versions of GHC, importData.Tuple.Compatfrombase-compat-batteriesinstead. - Backport
decTandhdecTtoData.Typeable.Compat - Backport
decTypeReptoType.Reflection.Compat
Changes in 0.13.0 [2023.03.10]
- Sync with
base-4.18/GHC 9.6 - Backport
liftA2being re-exported fromPrelude.Compat. Data.Tuple.Compat'sSoloAPI now matches what is present inData.Tupleinbase-4.18. In particular, we now re-export both theMkSoloandSolodata constructors when building withghc-prim-0.10.0or later, withMkSolobeing preferred overSolo. If you want to backportMkSoloto earlier versions of GHC, importData.Tuple.Compatfrombase-compat-batteriesinstead.- Backport
traceWith,traceShowWith, andtraceEventWithtoDebug.Trace. Note thattraceEventWithis only provided when building withbase-4.5or later, as that is the first version ofbaseto provide thetraceEventprimitive on whichtraceEventWithis defined. - Backport
inits1andtails1toData.List.NonEmpty.Compat. - Backport
minusNaturalMaybetoNumeric.Natural.Compat. - Backport
applyWhentoData.Function.Compat. - Backport
mapAccumMandforAccumMtoData.Traversable.Compat. - Backport
heqTtoData.Typeable.Compat. Note thatheqTis only defined when building withbase-4.10or later, as that is the first version ofbaseto provide the primitives needed to defineheqT. - Introduce
Data.Foldable1.CompatandData.Bifoldable1.Compatmodules, which correspond to changes made inbase-4.18.0.0. You may consider usingbase-compat-batteriesinstead if you want increase the range ofbaseversions that are supported.
Changes in 0.12.3 [2023.07.12]
- This coincides with the
base-compat-batteries-0.12.3release. Refer to thebase-compat-batterieschangelog for more details.
Changes in 0.12.2 [2022.08.11]
- Sync with
base-4.17/GHC 9.4 - Backport
(.^.),(.>>.),(.<<.),(!>>.),(!<<.),oneBitstoData.Bits.Compat - Backport
pattern TypeReptoType.Reflection.Compat
Changes in 0.12.1 [2021.10.30]
- Backport
SolotoData.Tuple.Compatwhen building withghc-prim-0.7.0or 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 theOptiondata type or theoptionfunction, as both have been removed inbase-4.16.- Backport
readBinandshowBintoNumeric.Compat - Backport
readBinPtoText.Read.Lex.Compat
Changes in 0.11.2 [2020.09.30]
- Sync with
base-4.15/GHC 9.0 - Backport
singletontoData.List.CompatandData.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, andisResourceVanishedErrorTypetoSystem.IO.Error.Compat.
Changes in 0.11.0 [2019.09.06]
-
Sync with
base-4.13/GHC 8.8 -
Backport
MonadFail(fail)toPrelude.CompatandControl.Monad.Compat.Because
Prelude.Compat.failnow corresponds to thefailfromMonadFailinstead ofMonad, some care is required to implementMonad.failon 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
MonadFailclass has only been inbasesincebase-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.Compatthat backportsMonadFailto older GHCs (by conditionally depending on thefaillibrary), use thePrelude.Compat/Control.Monad.Compatmodules from thebase-compat-batteriespackage. -
Introduce the
Data.Type.Equality.Compatmodule, which re-exportsData.Type.Equalityif 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.Compatwith older GHCs (by conditionally depending on thetype-equalitylibrary), use theData.Type.Equality.Compatmodule from thebase-compat-batteriespackage.
Changes in 0.10.5 [2018.10.18]
- Enable
BangPatternsinPrelude.Compat.
Changes in 0.10.4 [2018.07.03]
- Make more modules
Trustworthy. In particular, fix a regression in whichPrelude.Compatwas inferred asUnsafeby 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($!)andthrowtoPrelude.CompatandControl.Exception.Compat, respectively (if usingbase-4.10/GHC 8.2 or later). -
Introduce the
Data.Functor.Contravariant.Compatmodule, which reexportsData.Functor.Contravariantif usingbase-4.12/GHC 8.6 or later.See
Data.Functor.Contravariant.Compatin the correspondingbase-compat-batteriesrelease 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.Compatback 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
Semigroupclass has only been inbasesincebase-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.Compatthat backportsSemigroupto older GHCs (by conditionally depending on thesemigroupslibrary), use thePrelude.Compatmodule from thebase-compat-batteriespackage. -
Backport
(<&>)toData.Functor.Compat -
Backport
iterate'toData.List.Compat -
Backport
showHFloattoNumeric.Compat -
Backport a
RuntimeRep-polymorphicwithTypeablefunction toType.Reflection.Compat. (This is only exported onbase-4.10/GHC 8.2.) -
Introduce the following modules, back until the oldest version of
basethat can support backporting them. If you wish to use them in conjunction with older versions ofbase, use thebase-compat-batteriespackage.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.BifoldableandData.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.Replsuffix to provide a globally unique namespace to import from in the event one wants to importbase-compatmodules 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/fromRighttoData.Either.Compat - Backport implementations of
maximumBy/minimumBywhich use constant stack space toData.Foldable.Compat - Backport
asProxyTypeOfwith a generalized type signature toData.Proxy.Compat - Backport
gcoerceWithtoData.Type.Coercion.Compat - Backport
plusForeignPtrtoForeign.ForeignPtr.Compat
Changes in 0.9.2
- Allow building on the HaLVM
Changes in 0.9.1
- Use the more efficient version of
replicateMandreplicateM_introduced inbase-4.9
Changes in 0.9.0
- Sync with
base-4.9/GHC 8.0 - Weakened
RealFloatconstraints onrealPart,imagPart,conjugate,mkPolar, andcisinData.Complex.Compat - Backport
Foreign.ForeignPtr.SafeandForeign.Marshal.Safe - Generalize
filterM,forever,mapAndUnzipM,zipWithM,zipWithM_,replicateM, andreplicateM_inControl.MonadfromMonadtoApplicative - Backport
.Unsafe.Compatmodules (forControl.Monad.ST,Control.Monad.ST.Lazy,Foreign.ForeignPtr, andForeign.Marshal) - Backport
forkFinallyandforkOSWithUnmasktoControl.Concurrent.Compat - Backport
Data.Functor.Const - Backport
modifyIORef',atomicModifyIORef'andatomicWriteIOReftoData.IORef.Compat Data.Ratio.{denominator,numerator}have noIntegralconstraint anymore- Backport
modifySTRef'toData.STRef.Compat - Export
String,lines,words,unlines, andunwordstoData.String.Compat - Generalize
Debug.Trace.{traceM, traceShowM}fromMonadtoApplicative - Backport
errorWithoutStackTracetoPrelude.Compat - Backport
unsafeFixIOandunsafeDupablePerformIOtoSystem.IO.Unsafe.Compat
Changes in 0.8.2
- Backport
bitDefault,testBitDefault, andpopCountDefaultinData.Bits.Compatto all versions ofbase- Backport
toIntegralSizedtobase-4.7
- Backport
- Backport
nubandnubBy(as well asunionandunionBy, which are implemented in terms of them) to fix logic error inData.List.Compat - Backport
byteSwap16,byteSwap32, andbyteSwap64toData.Word.Compat - Backport
fillBytesinForeign.Marshal.Utils.Compat - Backport
showFFloatAltandshowGFloatAlttoNumeric.Compat
Changes in 0.8.1.1
- Fixed Windows build
Changes in 0.8.1
- Implement
setEnvandunsetEnvinSystem.Environment.Compat(which were ported from thesetenvpackage). As a result,base-compatnow depends onunixon 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-compatno longer redefines the data typesDownandAlt. See here for the discussion that led to this change.- Update
Control.Monad.Compatforbase-4.8.0.0 - Update
Data.List.Compatforbase-4.8.0.0 - Update
Data.Foldable.Compatforbase-4.8.0.0
Changes in 0.7.1
- Backported
AlttoData.Monoid.Compat - Backported
DowntoData.Ord.Compat
Changes in 0.7.0
- Add functions and orphan instances introduced by changes to
base-4.7.0.0andbase-4.8.0.0
Changes in 0.6.0
- Update
Prelude.Compatforbase-4.8.0.0and 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
setEnvandunsetEnvtoSystem.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_baseandMIN_VERSION_baseCPP macros (with#include "base-compat.h") - Do not re-export
System.IO.Error.catchfromPreludeforbase< 4.6.0 - Add
Eq/Ordinstance 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
<>