git.iko.soy/distributed-process
on master help sign in
Define generalizedBracket only for exceptions-0.10
commitfef7795cf5cf777a10239589ecaebcd4b67ccb87 authorAlexander Vershilov <alexander.vershilov@gmail.com> dateSun 29 Apr 2018, 18:02 (8 years ago) parent6ef0fef
2 files changed+3−1
distributed-process.cabal+1−1 src/Control/Distributed/Process/Internal/Types.hs+2
distributed-process.cabal+1−1
@@ -54,7 +54,7 @@ Library
5454 distributed-static >= 0.2 && < 0.4,
5555 rank1dynamic >= 0.1 && < 0.5,
5656 syb >= 0.3 && < 0.8,
57− exceptions >= 0.10,
57+ exceptions >= 0.5,
5858 containers >= 0.5 && < 0.6,
5959 deepseq >= 1.3.0.1 && < 1.6
6060 Exposed-modules: Control.Distributed.Process,
src/Control/Distributed/Process/Internal/Types.hs+2
@@ -366,12 +366,14 @@ instance MonadCatch Process where
366366 lproc <- ask
367367 liftIO $ catch (runLocalProcess lproc p) (runLocalProcess lproc . h)
368368instance MonadMask Process where
369+#if MIN_VERSION_exceptions(0,10,0)
369370 generalBracket acquire release inner = do
370371 lproc <- ask
371372 liftIO $
372373 generalBracket (runLocalProcess lproc acquire)
373374 (\a e -> runLocalProcess lproc $ release a e)
374375 (runLocalProcess lproc . inner)
376+#endif
375377 mask p = do
376378 lproc <- ask
377379 liftIO $ mask $ \restore ->