[Haskell-cafe] Zoom instance for Coroutine
konstantin.saveljev at gmail.com
Fri Mar 11 07:35:34 UTC 2016
I am using monad-coroutine
<https://hackage.haskell.org/package/monad-coroutine> package and have
something like Coroutine (Await Int) (State MyState) Int (simplified
version, for example purpose).
MyState is deeply nested and I do a lot of modifications in it. Previously
(with different data types) I was able to use zoom from lens
<https://hackage.haskell.org/package/lens>in order to simplify the
typing/view of code which operates on some subtree of the state, e.g.:
zoom (company.assets) $ do
something.a = someComputation anotherthing.b = False
this.that = "someString"
The problem I am having is that I cannot come up with instance Zoom for the
Coroutine and was wondering if anyone is able to help me with that?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe