File tree Expand file tree Collapse file tree 4 files changed +13
-12
lines changed
src/Control/Distributed/Process
Management/Internal/Trace Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change
1
+ [Unreliazed]
2
+
3
+ # Added
4
+ * Added support for exceptions >= 0.10
5
+
1
6
2017-08-31 Facundo Domínguez <facundo.dominguez@tweag.io> 0.7.3
2
7
3
8
* Drop support for ghc-7.8.* and earlier.
Original file line number Diff line number Diff line change @@ -366,6 +366,14 @@ instance MonadCatch Process where
366
366
lproc <- ask
367
367
liftIO $ catch (runLocalProcess lproc p) (runLocalProcess lproc . h)
368
368
instance MonadMask Process where
369
+ #if MIN_VERSION_exceptions(0,10,0)
370
+ generalBracket acquire release inner = do
371
+ lproc <- ask
372
+ liftIO $
373
+ generalBracket (runLocalProcess lproc acquire)
374
+ (\ a e -> runLocalProcess lproc $ release a e)
375
+ (runLocalProcess lproc . inner)
376
+ #endif
369
377
mask p = do
370
378
lproc <- ask
371
379
liftIO $ mask $ \ restore ->
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ import Control.Distributed.Process.Serializable
43
43
import Data.Binary
44
44
import Data.List (intersperse )
45
45
import Data.Set (Set )
46
- import qualified Data.Set as Set (fromList )
47
46
import Data.Typeable
48
47
import GHC.Generics
49
48
@@ -158,12 +157,3 @@ getTraceFlags t s = publishEvent t (unsafeCreateUnencodedMessage s)
158
157
159
158
getCurrentTraceClient :: MxEventBus -> SendPort (Maybe ProcessId ) -> IO ()
160
159
getCurrentTraceClient t s = publishEvent t (unsafeCreateUnencodedMessage s)
161
-
162
- class Traceable a where
163
- uod :: [a ] -> TraceSubject
164
-
165
- instance Traceable ProcessId where
166
- uod = TraceProcs . Set. fromList
167
-
168
- instance Traceable String where
169
- uod = TraceNames . Set. fromList
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ import qualified Data.Map as Map
37
37
, filterWithKey
38
38
, foldlWithKey
39
39
)
40
- import qualified Data.Set as Set
41
40
import Data.Time.Format (formatTime )
42
41
#if MIN_VERSION_time(1,5,0)
43
42
import Data.Time.Format (defaultTimeLocale )
@@ -55,7 +54,6 @@ import qualified Data.Set as Set
55
54
, union
56
55
)
57
56
import Data.Foldable (forM_ )
58
- import Data.List (foldl' )
59
57
import Data.Maybe (isJust , fromJust , isNothing , catMaybes )
60
58
import Data.Typeable (Typeable )
61
59
import Control.Category ((>>>) )
You can’t perform that action at this time.
0 commit comments