44 lines
1.7 KiB
Diff
44 lines
1.7 KiB
Diff
From c10ab80793a21dce0c7516725e1ca3b36a87aa25 Mon Sep 17 00:00:00 2001
|
|
From: Joey Hess <joey@kitenet.net>
|
|
Date: Thu, 28 Feb 2013 23:35:08 -0400
|
|
Subject: [PATCH] hack to build with hacked up lifted-base, which is currently
|
|
lacking a mask
|
|
|
|
---
|
|
Control/Monad/Trans/Resource.hs | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/Control/Monad/Trans/Resource.hs b/Control/Monad/Trans/Resource.hs
|
|
index d209dd8..61ab349 100644
|
|
--- a/Control/Monad/Trans/Resource.hs
|
|
+++ b/Control/Monad/Trans/Resource.hs
|
|
@@ -5,7 +5,7 @@
|
|
{-# LANGUAGE TypeFamilies #-}
|
|
{-# LANGUAGE RankNTypes #-}
|
|
{-# LANGUAGE CPP #-}
|
|
-{-# LANGUAGE DeriveDataTypeable #-}
|
|
+{-# LANGUAGE DeriveDataTypeable, ImpredicativeTypes #-}
|
|
#if __GLASGOW_HASKELL__ >= 704
|
|
{-# LANGUAGE ConstraintKinds #-}
|
|
#endif
|
|
@@ -554,7 +554,7 @@ GOX(Monoid w, Strict.WriterT w)
|
|
--
|
|
-- Since 0.3.0
|
|
resourceForkIO :: MonadBaseControl IO m => ResourceT m () -> ResourceT m ThreadId
|
|
-resourceForkIO (ResourceT f) = ResourceT $ \r -> L.mask $ \restore ->
|
|
+resourceForkIO (ResourceT f) = ResourceT $ \r ->
|
|
-- We need to make sure the counter is incremented before this call
|
|
-- returns. Otherwise, the parent thread may call runResourceT before
|
|
-- the child thread increments, and all resources will be freed
|
|
@@ -565,7 +565,7 @@ resourceForkIO (ResourceT f) = ResourceT $ \r -> L.mask $ \restore ->
|
|
(liftBaseDiscard forkIO $ bracket_
|
|
(return ())
|
|
(stateCleanup r)
|
|
- (restore $ f r))
|
|
+ (return ()))
|
|
|
|
-- | A @Monad@ based on some monad which allows running of some 'IO' actions,
|
|
-- via unsafe calls. This applies to 'IO' and 'ST', for instance.
|
|
--
|
|
1.7.10.4
|
|
|