transformers-compat
A small compatibility shim for the transformers library
http://github.com/ekmett/transformers-compat/
LTS Haskell 22.39: | 0.7.2 |
Stackage Nightly 2024-10-31: | 0.7.2 |
Latest on Hackage: | 0.7.2 |
transformers-compat-0.7.2@sha256:044fb9955f63ee138fcebedfdcbe54afe741f2d5892a2d0bdf3a8052bd342643,5601
Module documentation for 0.7.2
- Control
- Control.Monad
- Control.Monad.Trans
- Control.Monad
transformers-compat
This provides a thin compatibility shim on top of transformers-0.2 to add the types that were added in transformers-0.3.
This enables users to maintain haskell-platform compatibility, while still gaining access ot the new functionality.
Related packages
The writer-cps-transformers
package backports the
Control.Monad.Trans.{RWS,Writer}.CPS
modules that were introduced in
transformers-0.5.6.0
. There are also a variety of companion packages which
backport orphan instances for these types. One example is writer-cps-mtl
,
which backports instances of type classes from the mtl
library.
Contact Information
Contributions and bug reports are welcome!
Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.
-Edward Kmett
Changes
0.7.2 [2022.06.26]
- Add
Eq
,Ord
,Read
, andShow
instances forFunctorClassesDefault
inData.Functor.Classes.Generic
.
0.7.1 [2021.10.30]
- Backport new instances from GHC 9.2/
base-4.16
Eq1
,Read1
, andShow1
instances forComplex
Eq{1,2}
,Ord{1,2}
,Show{1,2}
, andRead{1,2}
instances for(,,)
and(,,,)
0.7 [2021.07.25]
- Backport changes from
transformers-0.6.*
:- Remove the long-deprecated
selectToCont
function fromControl.Monad.Trans.Select
. - Backport various
Generic
,Generic1
, andData
instances. - Backport
handleE
,tryE
, andfinallyE
toControl.Monad.Trans.Except
. - Backport explicit implementations of
(<$)
,liftA2
,(*>)
, and(<*)
forControl.Applicative.Backwards
. - Backport a lazier implementation of
(<*>)
forControl.Applicative.Lift
.
- Remove the long-deprecated
0.6.6 [2020.09.30]
- Add
FunctorClassesDefault
, an adapter newtype suitable forDerivingVia
, toData.Functor.Classes.Generic
. - Fix a bug in which
readsPrec1Default
/liftReadsPrecDefault
would parse empty data types too strictly.
0.6.5 [2019.05.11]
- Ensure that the backported
MonadFail
instance forExceptT
is available when built againsttransformers-0.4.*
.
0.6.4 [2019.04.01]
- Use more conservative CPP to guard the backported
MonadFix
instance forListT
.
0.6.3 [2019.04.01]
- Backport changes from
transformers-0.5.6.*
:- Backport the
MonadFix
instance forListT
inControl.Monad.Trans.Instances
. - Generalize the type of
except
inControl.Monad.Trans.Except
.
- Backport the
- Backport
MonadFail
instances forAccumT
,Reverse
, andSelectT
on pre-8.0 versions of GHC by depending on thefail
package if necessary. - Backport
MonadFail
instances for monad transformer types inControl.Monad.Trans.Instances
.
0.6.2
-
transformers-compat
now uses automatic flags instead of manual ones. This has a number of benefits:- There is no need for making several simultaneous releases to support each flag combination.
- As a result, the
cabal-install
constraint solver should have a much easier time figuring out install-plans involvingtransformers-compat
.
Due to old
cabal-install
bugs,cabal-install-1.16
and older may have a harder time installing this package, so it is recommended that you usecabal-install-1.18
or later. (Or, if you must usecabal-install-1.16
or older, installingtransformers-compat
with the appropriate flags should help.)
0.6.1.6
- Each of versions 0.6.1.2–0.6.1.6 is a 0.6.1 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6.1 release notes describe the changes in this version. This release is configured with none of-ftwo
,-fthree
,-ffour
, or-ffive
(which works withtransformers-0.5.3
and above).
0.6.1.5
- Each of versions 0.6.1.2–0.6.1.6 is a 0.6.1 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6.1 release notes describe the changes in this version. This release is configured with-ffive
(which works withtransformers-0.5
up until, but not including,transformers-0.5.3
).
0.6.1.4
- Each of versions 0.6.1.2–0.6.1.6 is a 0.6.1 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6.1 release notes describe the changes in this version. This release is configured with-ffour
(which works with thetransformers-0.4
series).
0.6.1.3
- Each of versions 0.6.1.2–0.6.1.6 is a 0.6.1 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6.1 release notes describe the changes in this version. This release is configured with-fthree
(which works with thetransformers-0.3
series).
0.6.1.2
- Each of versions 0.6.1.2–0.6.1.6 is a 0.6.1 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6.1 release notes describe the changes in this version. This release is configured with-ftwo
(which works with thetransformers-0.2
series).
0.6.1
- Fix an oversight in which the
Control.Monad.Trans.Accum
andControl.Monad.Trans.Select
modules were not backported when built with the-ffour
flag.
0.6.0.6
- Each of versions 0.6.0.2–0.6.0.6 is a 0.6 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6 release notes describe the changes in this version. This release is configured with none of-ftwo
,-fthree
,-ffour
, or-ffive
(which works withtransformers-0.5.3
and above).
0.6.0.5
- Each of versions 0.6.0.2–0.6.0.6 is a 0.6 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6 release notes describe the changes in this version. This release is configured with-ffive
(which works withtransformers-0.5
up until, but not including,transformers-0.5.3
).
0.6.0.4
- Each of versions 0.6.0.2–0.6.0.6 is a 0.6 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6 release notes describe the changes in this version. This release is configured with-ffour
(which works with thetransformers-0.4
series).
0.6.0.3
- Each of versions 0.6.0.2–0.6.0.6 is a 0.6 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6 release notes describe the changes in this version. This release is configured with-fthree
(which works with thetransformers-0.3
series).
0.6.0.2
- Each of versions 0.6.0.2–0.6.0.6 is a 0.6 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.6 release notes describe the changes in this version. This release is configured with-ftwo
(which works with thetransformers-0.2
series).
0.6
- Introduce the
Data.Functor.Classes.Generic
module, which provides functions that can generically implement methods in theEq1
,Ord1
,Read1
, andShow1
classes (without the usual boilerplate involved). - Introduce the
generic-deriving
flag. When enabled,transformers-compat
will depend on thegeneric-deriving
library on older versions of GHC to backportGHC.Generics
support forGeneric
instances and the machinery inData.Functor.Classes.Generic
. - Some instances were present in
Data.Functor.Sum
but not inControl.Monad.Trans.Instances
(e.g., theGeneric
,Typeable
, andData
instances forSum
). This has been fixed. - Backport changes from
transformers-0.5.5
:- Backport the
Semigroup
instance forConstant
- Add
mapSelect
andmapSelectT
- Define
selectToContT
(and deprecateselectToCont
in favor of that) - Define some explicit
(*>)
definitions to avoid space leaks
- Backport the
- Backport changes from
transformers-0.5.4
(i.e., addBifoldable
andBitraversable
instances forData.Functor.Constant
) - Backport changes from
transformers-0.5.3
:- Backport the
Control.Monad.Trans.Accum
andControl.Monad.Trans.Select
modules - Backport the
eitherToErrors
andelimLift
functions toControl.Applicative.Lift
- Backport
Bits
,FiniteBits
,IsString
,Num
,Real
,Integral
,Fractional
,Floating
,RealFrac
, andRealFloat
instances forData.Functor.Identity
- Backport
Monad
,MonadFail
, andMonadPlus
instances forData.Functor.Reverse
- Backport
Eq1
,Ord1
,Read1
, andShow1
instances forData.Proxy
- Backport the
- Backport changes from
transformers-0.5.2
(i.e., add moreINLINE
annotations) - Backport changes from
transformers-0.5.1
(i.e., addBounded
,Enum
,Ix
, andStorable
instances forIdentity
)
0.5.1.4
- Each of versions 0.5.1.2–0.5.1.4 is a 0.5.1 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.5.1 release notes describe the changes in this version. This release is configured with neither-ftwo
nor-fthree
(which works withtransformers-0.4
and above).
0.5.1.3
- Each of versions 0.5.1.2–0.5.1.4 is a 0.5.1 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.5.1 release notes describe the changes in this version. This release is configured with-fthree
(which works with thetransformers-0.3
series).
0.5.1.2
- Each of versions 0.5.1.2–0.5.1.4 is a 0.5.1 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.5.1 release notes describe the changes in this version. This release is configured with-ftwo
(which works with thetransformers-0.2
series).
0.5.1
- Fix a bug in which
PolyKinds
was enabled on GHC 7.4, resulting in interface file bugs on that version of GHC.
0.5.0.4
- Each of versions 0.5.0.2–0.5.0.4 is a 0.5 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.5 release notes describe the changes in this version. This release is configured with neither-ftwo
nor-fthree
(which works withtransformers-0.4
and above).
0.5.0.3
- Each of versions 0.5.0.2–0.5.0.4 is a 0.5 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.5 release notes describe the changes in this version. This release is configured with-fthree
(which works with thetransformers-0.3
series).
0.5.0.2
- Each of versions 0.5.0.2–0.5.0.4 is a 0.5 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.5 release notes describe the changes in this version. This release is configured with-ftwo
(which works with thetransformers-0.2
series).
0.5
- Update
transformers-compat
to incorporate changes from thetransformers-0.5
series. These changes include:- The
Data.Functor.Classes
module was completely redesigned. - Modules now have
Safe
orTrustworthy
annotations. - Data types and type synonyms are poly-kinded when possible.
- The
- Add
Control.Monad.Trans.Instances
, a module of orphan instances that mimic instances available in later versions oftransformers
.
0.4.0.4
- Each of versions 0.4.0.2–0.4.0.4 is a 0.4 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.4 release notes describe the changes in this version. This release is configured with neither-ftwo
nor-fthree
(which works withtransformers-0.4
and above).
0.4.0.3
- Each of versions 0.4.0.2–0.4.0.4 is a 0.4 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.4 release notes describe the changes in this version. This release is configured with-fthree
(which works with thetransformers-0.3
series).
0.4.0.2
- Each of versions 0.4.0.2–0.4.0.4 is a 0.4 build with a different set of flags configured. Building this way allows us to work around bugs in
cabal
’s backtracker. The 0.4 release notes describe the changes in this version. This release is configured with-ftwo
(which works with thetransformers-0.2
series).
0.4
-
Added support for the missing
ExceptT
instances frommtl
.This was not done lightly. While this means that by default incurring a dependency on
transformers-compat
drags inmtl
when you are using an oldtransformers
, it means that users do not have to orphan these instances and permits wider adoption ofExceptT
.If you absolutely can’t stand
mtl
and really want this package to build as validHaskell98
, then you can usecabal install transformers-compat -f-mtl
to avoid incurring the dependency to get these instances. However, that is effectively an unsupported configuration.
0.3.3.4
- Versions 0.3.3.2–0.3.3.4 were a successful attempt to fix build problems caused by the cabal backtracker.
- Each of these is a build with a different set of flags configured.
This release is configured with neither
-ftwo
nor-fthree
(which works withtransformers-0.4
and above).
0.3.3.3
- Versions 0.3.3.2–0.3.3.4 were a successful attempt to fix build problems caused by the cabal backtracker.
- Each of these is a build with a different set of flags configured.
This release is configured with
-fthree
(which works with thetransformers-0.3
series).
0.3.3.2
- Versions 0.3.3.2–0.3.3.4 were a successful attempt to fix build problems caused by the cabal backtracker.
- Each of these is a build with a different set of flags configured.
This release is configured with
-ftwo
(which works with thetransformers-0.2
series).
0.3.2
- This release was a failed (or at least, only partially successful) attempt to fix build problems caused by the cabal backtracker.
0.3.1
transformers 0.4.1
compatibility
0.3
- Added the instances for
Data.Functor.Classes
fromtransformers 0.4
- Switched
Control.Applicative.Backwards
andData.Functor.Reverse
to the split constructor/accessor style fromtransformers 0.4
.
0.2
- Added the new types and classes from
transformers 0.4
0.1.1.1
- Wrote a better synopsis
0.1.1
- Updated to trick
cabal
into building an emptylibHStransformers-compat-0.1.a
on GHC 7.6.
0.1
- Repository initialized by pulling the
transformers-0.2
compatibility layer out oflens
.