Not directly answering your question, but what you need is called
coroutines, and there are better monads for that purpose. This is how
the Cont monads are defined:
newtype Cont r a = Cont ((a -> r) -> r)
But what you really need here is called a Coroutine monad:
newtype Coroutine f a = Coroutine (Either (f (Coroutine f a)) a)
Don't worry about that scary type, because if you look closely you will
find that this is just Free as defined in the 'free' package:
data Free f a
= Free (f (Free f a))
| Pure a