Changelog History
Page 1

v1.1 Changes
➕ Adds a churchencoded
State
carrier inControl.Carrier.State.Church
. (#363)➕ Adds a churchencoded
Error
carrier inControl.Carrier.Error.Church
. (#203)➕ Adds a churchencoded
Empty
carrier inControl.Carrier.Empty.Church
. (#203)➕ Adds a churchencoded
Writer
carrier inControl.Carrier.Writer.Church
. (#369)➕ Adds a churchencoded
Fresh
carrier inControl.Carrier.Fresh.Church
. (#373)Defines
Algebra
instances forControl.Monad.Trans.Maybe.MaybeT
,Control.Monad.Trans.RWS.CPS
, andControl.Monad.Trans.Writer.CPS
. (#366)➕ Adds
evalEmpty
andexecEmpty
handlers for theEmpty
carriers as conveniences for usingempty
to signal early returns. (#371)
Backwardsincompatible changes
🔄 Changes
alg
’s signature, giving it an initial state, and a distributive law which must be applied to each computation in the signature. This change allowsAlgebra
instances to be derived usingGeneralizedNewtypeDeriving
andDerivingVia
, while also obviating the need forhmap
,handleCoercible
, or thethread
method ofEffect
. This furthermore increases the expressiveness of effects, allowing effects with higherorder positions yielding concrete types, e.g.m ()
, to be run anywhere in the stack, not just above anyEffect
requiring algebras. (#359, #361)🔄 Changes the signatures of
runInterpret
andrunInterpretState
analogously; also reorders the parameters torunInterpretState
to take the signature before the state parameter. (#359)✂ Removes
Algebra
’s superclass constraint requiring aHFunctor
instance for the signature. (#359)✂ Removes
handleCoercible
. Algebras which formerly used it when handling the tail of the signature may now composecoerce
onto the homomorphism passed toalg
. (#359)✂ Removes
HFunctor
. Effects are no longer required to haveHFunctor
instances, and so the class is redundant. (#359)Removes
Effect
. The new signature foralg
(see above) obviates the need for threading handlers through effects, replacing that by threading them through algebras instead. (#361)Redefines
thread
as a wrapper aroundalg
, composing context functors and distributive laws together. (Note that its type has also changed to take the context last and to decompose the handler for the two carriers.) (#361)📇 Renames
Control.Effect.Interpret.Handler
toInterpreter
. (#361)Reorders the parameters to the higherorder function passed to
Control.Effect.Lift.liftWith
for consistency withalg
and to reflect its purpose of lifting Kleisli arrows in some underlying monad into the context modulo the context’s state. (#361)Redefines all effects as GADTs. Since we no longer require
Functor
,HFunctor
, orEffect
instances, we no longer need to use continuations to allow distinct result types per constructor.Algebra
instances for these effects can be ported forwards by removing the continuations. Userdefined effects are not impacted, but we recommend migrating to GADT definitions of them for convenience and ease of comprehension going forwards. (#365)✂ Removes
Control.Carrier.State.Lazy.runStateC
, which was supposed to have been removed in 1.0.

v1.0.2.2 Changes
June 16, 2020 ➕ Adds support for
ghc
8.10 &base
4.14. (#376)
 ➕ Adds support for

v1.0.2.1
June 16, 2020 
v1.0.2.0 Changes
March 03, 2020➕ Adds a
state
operation for theState
effect. (#353)➕ Adds a function reassociating sums leftwards to
Control.Effect.Sum
. (#354)Inlines
inj
. (#354)➕ Adds labelled effects in
Control.Effect.Labelled
. Labelled effects allow flexible disambiguation and dependency for parametric effects, enabling better type inference, restricted usage, and associated type parameters. (#354)➕ Adds labelled interface for
Reader
andState
effects inControl.Effect.Reader.Labelled
andControl.Effect.State.Labelled
. The functions in this interface are identical to their parent effect save that they accept a label parameter as an explicit type argument, suitable for use with an explicit type application; this can clean up code that would otherwise need an invocation ofrunUnderLabel
to associate a labelled operation with its label. (#354)➕ Adds a
sendIO
operation for theLift IO
effect. (#360)Inlines the
Reader
operations. (#347)

v1.0.0.1 Changes
February 04, 2020 ➕ Adds passthrough
Algebra
instances forAp
andAlt
, allowing the invocation of effects inside these structures without extraneous constructor applications.
 ➕ Adds passthrough

v1.0.0.0 Changes
November 11, 2019➕ Adds an
Empty
effect, modelling nondeterminism without choice (#196).➕ Adds an
EmptyC
carrier forEmpty
. (#196)➕ Adds a
Choose
effect, modelling nondeterminism without failure (#198).➕ Adds a
Throw
effect, modelling failure with a value. (#247)➕ Adds a
Catch
effect which can be used withThrow
(or other kinds of failure) to model recoverable failure. (#247)➕ Adds a
oneOf
function toControl.Effect.NonDet
to provide an idiom for the common case of nondeterministically selecting from a container. (#201)➕ Adds a
foldMapA
function toControl.Effect.NonDet
mapping containers into nondeterministic computations using a supplied function. (#204)Defines a new
Has
constraint synonym, conveniently combiningCarrier
andMember
constraints and used for all effect constructors. (#217)👍 Allows effects to be defined and handled as sums of other effects, while still using the constructors for the component effects. This has been used to redefine
NonDet
as a sum ofEmpty
andChoose
, andError
as a sum ofThrow
andCatch
. (#199, #219, #247)Defines
Carrier
instances for a number of types inbase
, includingEither
,Maybe
,[]
, andIO
. (#206)Defines
Carrier
instances for a number of types intransformers
. (#226)Defines an
evalFresh
handler forControl.Carrier.Strict.FreshC
, taking the initial value. (#267)
Backwardsincompatible changes
💅 Renames the
Carrier
class toAlgebra
and itseff
method toalg
, and moved the responsibilities ofControl.Carrier
toControl.Algebra
. This makes the library more consistent with the literature and encourages a style of naming that focuses on morphisms rather than objects. (#285, #294)🛠 Fixes unlawful behaviour in the
Applicative
instance forErrorC
, which had different behaviour between<*>
andap
in the presence of a divergent rhs. In order to accomplish this,ErrorC
has been defined as a wrapper aroundControl.Monad.Trans.Except.ExceptT
. (#228)👌 Improves the performance of
runInterpret
using reflection, changing its signature slightly (#193, h/t @ocharles).✂ Removes
Control.Effect.Random
(and the dependencies onrandom
&MonadRandom
) in favour of a newfusedeffectsrandom
package (#200).✂ Removes
fmap'
andhandlePure
, both deprecated in 0.5.0.0 (#205).Redefines
NonDetC
as a Churchencoded binary tree instead of a Churchencoded list (#197).✂ Removes the
OnceC
carrier forCull
effects, replacing it with the composition ofCullC
on some otherAlternative
carrier, e.g.NonDetC
(#204).🚚 Moves all the carriers into their own modules in the
Control.Carrier
namespace. Several have also been renamed, e.g. the variousTrace
carriers are all namedTraceC
within their separate modules, and should be imported qualified if disambiguation is required. This simplifies naming schemes, and ensures that the choice of e.g. strict or lazy carrier is always made consciously and expliclty, instead of defaulting to whichever is exported by the effect module (#204).✂ Removes the reexport of
Member
from all carrier modules, reexportingHas
in its place.Has
constraints should generally be used instead, and specialist cases can importControl.Effect.Sum
forMember
. (#217)Redesigns & renames the handlers for churchencoded nondeterminism carriers to standardize naming and usage patterns. (#207)
 The primary handlers (
runChoose
,runNonDet
,runCut
,runCull
) take multiple continuations.  Handlers which return an
Alternative
are suffixed withA
, e.g.runNonDetA
.  Handlers which return a
Monoid
are suffixed withM
, e.g.runNonDetM
.  Handlers which return a
Semigroup
are suffixed withS
, e.g.runChooseS
.
 The primary handlers (
✂ Removes
InterposeC
&runInterpose
due to their inefficiency. They can be replaced with use ofInterpretC
/runInterpret
for the desired effect. (#223)✂ Removes
prj
fromMember
, as it was only used inInterposeC
(see above), and was generally inadvisable due to its lack of modularity. (#223)✂ Removes the
Resource
effect and carrier. Both have been relocated tofusedeffectsexceptions
. (#268)Redefines
Fail
as a synonym forThrow String
. (#247)✂ Removes
Resumable
and its carriers. Both have been relocated tofusedeffectsresumable
; they can also be usefully and flexibly replaced by arbitrary effects,Lift
, andInterpretC
. (#269)🔄 Changes
Control.Carrier.Fresh.Strict.runFresh
to take and return the initial & final values, respectively, allowing for safer operation. (#267)Removes
resetFresh
, as it was unsafe. Greater safety and control over the generation of fresh values can be obtained by use ofrunFresh
. (#267)✂ Removes
PureC
;Data.Functor.Identity.Identity
should be used instead. Note thatrun
is still provided as a convenient synonym forrunIdentity
. (#307)✂ Removes the
Pure
effect. It’s unlikely that this will require changes, asPure
had no operations, butLift Identity
should be used instead. (#307)👻 Redefines the
Lift
effect, allowing inner contexts to run actions in outer contexts, e.g. to interoperate withControl.Exception
. (#306)✂ Removes
MonadUnliftIO
instances as they’ve been subsumed by the new definition ofLift
. Additionally, theReaderT
&IdentityT
types defined intransformers
may be useful. (#306)

v0.5.0.1 Changes
September 02, 2019 ➕ Adds support for ghc 8.8.1.

v0.5.0.0 Changes
July 15, 2019Derives
Generic1
instances for all nonexistentiallyquantified effect datatypes.Derives
Foldable
&Traversable
instances for:+:
.Defines
MonadFix
instances for all of the carriers.Reexports
run
,:+:
, andMember
fromControl.Effect.Carrier
, reducing the number of imports needed when defining new effects.Reexports
Carrier
,Member
, andrun
from the various effect modules, reducing the number of imports needed when using existing effects.
Backwardsincompatible changes
🚚 Replaces
runResource
with an equivalent function that usesMonadUnliftIO
to select the correct unlifting function (a lawithResource
, which is removed in favor ofrunResource
).🔄 Changes the signature of
eff
fromsig m (m a) > m a
tosig m a > m a
, requiring effects to holdm k
in their continuation positions instead of merelyk
. This was done in order to improve interoperability with other presentations of higherorder syntax, e.g.bound
; syntax used withbound
can now be givenHFunctor
andCarrier
instances.
To upgrade effects used with previous versions, change any continuations from
k
tom k
. If no existential type variables appear in the effect, you can deriveGeneric1
, and thenceHFunctor
&Effect
instances. Otherwise, implement the required instances by hand. Since continuation positions now occur inm
,hmap
definitions will have to apply the higherorder function to these as well.➕ Adds
Functor
constraints tohmap
andMonad
constraints tohandle
, allowing a greater variety of instances to be defined (e.g. for recursivelynested syntax).0️⃣ Replaces the default definitions of
hmap
andhandle
with derivations based onGeneric1
instead ofCoercible
. Therefore, firstorder effects wishing to derive these instances will requireGeneric1
instances, presumably derived usingXDeriveGeneric
.🚚 Moves
send
fromControl.Effect.Sum
toControl.Effect.Carrier
. Likewise removes the reexport ofsend
fromControl.Effect
.🗄 Deprecates
fmap'
in favour offmap
.🗄 Deprecates
handlePure
in favour ofhmap
.

v0.4.0.0 Changes
May 13, 2019Backwardsincompatible changes
 ✂ Removes APIs deprecated in 0.3.0.0, including
Eff
,interpret
,ret
, and thehandle*
family of helper functions.
Other changes
 ➕ Adds the ability to derive default instances of
HFunctor
andEffect
for firstorder effects, using theXDeriveAnyClass
extension.  ➕ Adds a generic
Interpose
effect that enables arbitrary "eavesdropping" on other effects.
 ✂ Removes APIs deprecated in 0.3.0.0, including

v0.3.1.0 Changes
April 24, 2019 👌 Improved speed of
Reader
,State
,Writer
, andPure
effects by defining and inlining auxiliaryApplicative
methods.  ➕ Adds
runInterpret
&runInterpretState
handlers inControl.Effect.Interpret
as a convenient way to experiment with effect handlers without defining a new carrier type andCarrier
instance. Such handlers are somewhat less efficient than customCarrier
s, but allow for a smooth upgrade path when more efficiency is required.  ➕ Added
unliftiocore
as a dependency so as to provide a blessed API for unliftstyle effects and a solution to the cubiccaller problem.
 👌 Improved speed of