Re: Interruptible exception wormholes kill modularity

2016-07-04 Thread Simon Marlow
On 2 July 2016 at 17:25, Edward Z. Yang wrote: > Excerpts from Simon Marlow's message of 2016-07-02 05:58:14 -0400: > > > Claim 1: Here is some code which reimplements 'unblock': > > > > > > import Control.Exception > > > import Control.Concurrent > > > import Control.Concurrent.MVar

Re: Interruptible exception wormholes kill modularity

2016-07-02 Thread Yuras Shumovich
On Sat, 2016-07-02 at 12:29 -0400, Edward Z. Yang wrote: > Excerpts from Yuras Shumovich's message of 2016-07-02 09:06:59 -0400: > > On Sat, 2016-07-02 at 00:49 -0400, Edward Z. Yang wrote: > > > > > > P.P.S. I have some speculations about using uninterruptibleMask > > > more > > > frequently: it

Re: Interruptible exception wormholes kill modularity

2016-07-02 Thread Edward Z. Yang
Excerpts from Yuras Shumovich's message of 2016-07-02 09:06:59 -0400: > On Sat, 2016-07-02 at 00:49 -0400, Edward Z. Yang wrote: > > > > P.P.S. I have some speculations about using uninterruptibleMask more > > frequently: it seems to me that there ought to be a variant of > > uninterruptibleMask t

Re: Interruptible exception wormholes kill modularity

2016-07-02 Thread Edward Z. Yang
Excerpts from Simon Marlow's message of 2016-07-02 05:58:14 -0400: > > Claim 1: Here is some code which reimplements 'unblock': > > > > import Control.Exception > > import Control.Concurrent > > import Control.Concurrent.MVar > > > > unblock :: IO a -> IO a > > unblock io = do >

Re: Interruptible exception wormholes kill modularity

2016-07-02 Thread Yuras Shumovich
On Sat, 2016-07-02 at 00:49 -0400, Edward Z. Yang wrote: > > P.P.S. I have some speculations about using uninterruptibleMask more > frequently: it seems to me that there ought to be a variant of > uninterruptibleMask that immediately raises an exception if > the "uninterruptible" action blocks.  T

Re: Interruptible exception wormholes kill modularity

2016-07-02 Thread Simon Marlow
Hi Edward, On 2 July 2016 at 05:49, Edward Z. Yang wrote: > In 2010, in the thread "Asynchronous exception wormholes kill modularity" > [1], > Bas van Dijk observed that 'unblock :: IO a -> IO a' broke modularity, > as the sequence of calls 'block . block . unblock $ io' would result in > 'io' b

Interruptible exception wormholes kill modularity

2016-07-01 Thread Edward Z. Yang
In 2010, in the thread "Asynchronous exception wormholes kill modularity" [1], Bas van Dijk observed that 'unblock :: IO a -> IO a' broke modularity, as the sequence of calls 'block . block . unblock $ io' would result in 'io' being run with asynchronous exceptions unblocked, despite the outer 'blo