<div dir="ltr">Hello,<div><br></div><div>I am using <a href="https://hackage.haskell.org/package/monad-coroutine">monad-coroutine</a> package and have something like <font color="#222426" face="Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif"><span style="background-color:rgb(238,238,238)">Coroutine (Await Int) (State MyState) Int</span></font> (simplified version, for example purpose).</div><div><br></div><div><font color="#222426" face="Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif"><span style="background-color:rgb(238,238,238)">MyState</span></font> is deeply nested and I do a lot of modifications in it. Previously (with different data types) I was able to use <font color="#222426" face="Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif"><span style="background-color:rgb(238,238,238)">zoom</span></font> from <a href="https://hackage.haskell.org/package/lens">lens </a>in order to simplify the typing/view of code which operates on some subtree of the state, e.g.:</div><div><br></div><div><pre class="" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="color:black;margin:0px;padding:0px;border:0px">zoom (company.assets) $ do</span><span class="" style="color:black;margin:0px;padding:0px;border:0px">
something.a = someComputation
</span><span class="" style="color:black;margin:0px;padding:0px;border:0px"> anotherthing.b = False
this.that = "someString"<br></span></code></pre></div><div>The problem I am having is that I cannot come up with <font color="#222426" face="Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif"><span style="background-color:rgb(238,238,238)">instance Zoom</span></font> for the <font color="#222426" face="Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif"><span style="background-color:rgb(238,238,238)">Coroutine</span></font> and was wondering if anyone is able to help me with that?<br></div><div><br></div><div>Best regards,</div><div>Konstantin</div></div>