From 47f899ed0b3ac3613b39e866d3389b94a4c40797 Mon Sep 17 00:00:00 2001 From: Benjamin McRae Date: Thu, 22 Jan 2026 13:01:21 +0000 Subject: [PATCH 1/2] remove Monoid constraint on MonadState CPS.WriterT --- Control/Monad/State/Class.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/Monad/State/Class.hs b/Control/Monad/State/Class.hs index 73100a4..2752779 100644 --- a/Control/Monad/State/Class.hs +++ b/Control/Monad/State/Class.hs @@ -164,7 +164,7 @@ instance MonadState s m => MonadState s (ReaderT r m) where state = lift . state -- | @since 2.3 -instance (Monoid w, MonadState s m) => MonadState s (CPS.WriterT w m) where +instance (MonadState s m) => MonadState s (CPS.WriterT w m) where get = lift get put = lift . put state = lift . state From 925920864a8ef4fe6d87ed64343d82977f8584c1 Mon Sep 17 00:00:00 2001 From: Benjamin McRae Date: Thu, 22 Jan 2026 13:12:40 +0000 Subject: [PATCH 2/2] add removal of constraint to changelog --- CHANGELOG.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 14da0c2..f2864b2 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,3 +1,7 @@ +Unreleased +----- +* Remove `Monoid` constraint from `MonadState` instance of `CPS.WriterT` + 2.3.2 -- 2025-12-07 ----- * Add `Accum` monad.