<div dir="ltr">Hi Stanislav,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 28, 2017 at 7:00 AM, Станислав Черничкин <span dir="ltr"><<a href="mailto:schernichkin@gmail.com" target="_blank">schernichkin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>This lead to conflicting requirements: </div><div>- One should not care about asynchronous exceptions inside ST (it is not possible to catch exception in ST, hence not possible to use something in invalid state). More over, it is not even possible to do write “exception-safe” code, because masking functions not available.</div></div></blockquote><div><br></div><div>You can't fork in ST :). So there's no need to mask there - values created during the execution will be discarded and cannot be reused unless you use unsafe*</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>2. Documentation. Should library authors explicitly mention async exceptions safety? For example <a href="https://hackage.haskell.org/package/hashtables" target="_blank">https://hackage.haskell.org/<wbr>package/hashtables</a> – is it async exceptions safe when used in IO? </div></div></blockquote><div> </div><div>The hashtables library is not safe for concurrent modification, you need locking for that. No masking is done right now either, which is probably a mistake. We should mask when we stToIO.</div><div><br></div></div>
</div></div>