Skip to content
Browse files

Fix build with monad-control-1.0 (#23)

  • Loading branch information...
1 parent 34359fa commit f4be4fbe253ac2927d62153a79df9b5957c125e2 @basvandijk basvandijk committed Dec 16, 2014
Showing with 3 additions and 3 deletions.
  1. +2 −2 Data/Pool.hs
  2. +1 −1 resource-pool.cabal
View
4 Data/Pool.hs
@@ -295,7 +295,7 @@ takeResource pool@Pool{..} = do
-- returns immediately with 'Nothing' (ie. the action function is /not/ called).
-- Conversely, if a resource can be borrowed from the pool without blocking, the
-- action is performed and it's result is returned, wrapped in a 'Just'.
-tryWithResource ::
+tryWithResource :: forall m a b.
#if MIN_VERSION_monad_control(0,3,0)
(MonadBaseControl IO m)
#else
@@ -310,7 +310,7 @@ tryWithResource pool act = control $ \runInIO -> mask $ \restore -> do
destroyResource pool local resource
putResource local resource
return ret
- Nothing -> restore . runInIO $ return Nothing
+ Nothing -> restore . runInIO $ return (Nothing :: Maybe b)
#if __GLASGOW_HASKELL__ >= 700
{-# INLINABLE tryWithResource #-}
#endif
View
2 resource-pool.cabal
@@ -1,5 +1,5 @@
name: resource-pool
-version: 0.2.3.1
+version: 0.2.3.2
synopsis: A high-performance striped resource pooling implementation
description:
A high-performance striped pooling abstraction for managing

2 comments on commit f4be4fb

@feuerbach

Just came here to submit the exact same patch. You beat me to it by 30 minutes :)

@snoyberg

Hah, I just found it too.

Please sign in to comment.
Something went wrong with that request. Please try again.