monad-control icon indicating copy to clipboard operation
monad-control copied to clipboard

Lift control operations, like exception catching, through monad transformers

Results 14 monad-control issues
Sort by recently updated
recently updated
newest added

Hi, I have a monad that looks like ``` haskell newtype FooT s m a = FooT { unFooT :: StateT (Bar m s) m a } ``` The problem...

And idea from #39, cc @duog Unfortuntely, `forall x y. Coercible x y => Coercible (f x) (f y)` isn't a superclass of `Functor` (yet?!), so we have some explicit...

Hi, Have you considered defining StT and StM as types of kind (* -> *) and requiring a Functor constraint? i.e. ```haskell class (MonadTrans t, Functor (StT t)) => MonadTransControl...

`lifted-async`'s `Control.Concurrent.Async.Lifted.Safe` module has a [Pure](https://www.stackage.org/haddock/lts-9.2/lifted-async-0.9.3/Control-Concurrent-Async-Lifted-Safe.html#t:Pure) class that requires the monad satisfy `StM m a ~ a` i.e. there is no state to restore. It's used to ensure that monadic...

Older ghc versions are working, but with ghc 9.0.1 this fails: https://travis-ci.com/github/jumper149/blucontrol/jobs/499404592#L486 ``` src/Blucontrol/Recolor/X.hs:36:14: error: • Couldn't match type: Monad (ReaderT Display m1) with: RecolorXT m1 b Expected: (Run RecolorXT...

Adds `MonadBaseControl` and `MonadTransControl` instances for the CPS versions of `Writer` and `RWS` that were added in `transformers-0.5.6`. Relies on the corresponding instances for `MonadBase` provided [here](https://github.com/mvv/transformers-base/pull/20).

I have the feeling there are more out there. For example, I'd expect lifting `restoreM` to be a no-op: ```Haskell liftBaseWith $ \runInBase -> do ... s

I'm trying to create a lifted version of function f in base monad b (imported qualified as B): ``` f :: (Monad m, MonadBaseControl b m) => m Bool ->...

Hi, I've been struggling with this one for the better part of a day. I think this may be an issue that can be easily solved with clever type annotations...

Imagine that I have a monad-transformer transformer; that is, a datatype which is parameterized on a monad transformer, and which is itself a monad transformer. This came up for me...