Skip to content

Commit

Permalink
Fix build with monad-control-1.0 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
basvandijk committed Dec 16, 2014
1 parent 34359fa commit f4be4fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Data/Pool.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion resource-pool.cabal
Original file line number Diff line number Diff line change
@@ -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
Expand Down

2 comments on commit f4be4fb

@UnkindPartition
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@snoyberg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, I just found it too.

Please sign in to comment.