External Publication
Visit Post

Applicative-wired monad pattern

Haskell Community [Unofficial] February 26, 2026
Source

You could use kan-extensions:Data.Functor.Coyoneda.Coyoneda for that if you don’t need the intermediate free Applicative, at which point you’ve hit on the same type as the one that shows up in @ocharles 's providing an API for extensible effects and monad transformers:

class Monad m => MonadListenBrainz m where
  liftListenBrainz :: Free (Coyoneda ListenBrainzAPICall) a -> m a

Discussion in the ATmosphere

Loading comments...