ekmett/lens

Add `Zoom` for `Control.Monad.Trans.WriterT.CPS`

Opened this issue · 1 comments

Add `Zoom` for `Control.Monad.Trans.WriterT.CPS`

I think it's:

type instance Zoomed (WriterT w m) = FocusingPlus w (Zoomed m)


instance (Monoid w, Zoom m n s t) => Zoom (WriterT w m) (WriterT w n) s t where
  zoom l = writerT . zoom (\afb -> unfocusingPlus . l (FocusingPlus . afb)) . runWriterT