packages feed

monads-tf 0.3.0.0 → 0.3.0.1

raw patch · 4 files changed

+32/−11 lines, 4 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

Control/Monad/Except.hs view
@@ -36,7 +36,7 @@     MonadError(..),     tryError,     withError,-    -- * The ErrorT monad transformer+    -- * The ExceptT monad transformer     ExceptT(..),     runExceptT,     mapExceptT,
Control/Monad/Writer/Class.hs view
@@ -42,27 +42,38 @@  -- --------------------------------------------------------------------------- -- MonadWriter class------ tell is like tell on the MUD's it shouts to monad--- what you want to be heard. The monad carries this 'packet'--- upwards, merging it if needed (hence the Monoid requirement).------ listen listens to a monad acting, and returns what the monad "said".------ pass lets you provide a writer transformer which changes internals of--- the written object.  class (Monoid (WriterType m), Monad m) => MonadWriter m where     type WriterType m++    -- | Shout to the monad what you want to be heard. The monad carries+    -- this packet upwards, merging it if needed (hence the 'Monoid'+    -- requirement).     tell   :: WriterType m -> m ()++    -- | Listen to a monad acting, and return what the monad "said".     listen :: m a -> m (a, WriterType m)++    -- | Provide a writer transformer which changes internals of the+    -- written object.     pass   :: m (a, WriterType m -> WriterType m) -> m a +-- | @'listens' f m@ is an action that executes the action @m@ and adds+-- the result of applying @f@ to the output to the value of the computation.+--+-- * @'listens' f m = 'liftM' (id *** f) ('listen' m)@+-- listens :: (MonadWriter m) => (WriterType m -> b) -> m a -> m (a, b) listens f m = do     ~(a, w) <- listen m     return (a, f w) +-- | @'censor' f m@ is an action that executes the action @m@ and+-- applies the function @f@ to its output, leaving the return value+-- unchanged.+--+-- * @'censor' f m = 'pass' ('liftM' (\\ x -> (x,f)) m)@+-- censor :: (MonadWriter m) => (WriterType m -> WriterType m) -> m a -> m a censor f m = pass $ do     a <- m
changelog.md view
@@ -1,3 +1,13 @@+## 0.3.0.1++Documentation improvements++Author: Ross Paterson++Published by: Chris Martin++Date: 2023-07-10+ ## 0.3.0.0  Remove deprecated modules:
monads-tf.cabal view
@@ -1,7 +1,7 @@ cabal-version: 3.0  name:         monads-tf-version:      0.3.0.0+version:      0.3.0.1 license:      BSD-3-Clause license-file: LICENSE author:       Andy Gill