Skip to content
Browse files

HLint

  • Loading branch information...
1 parent 8512dc4 commit 91475b5a247e9b4b28f7823e7fb96423a14cba36 @norm2782 committed Mar 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Data/Pool.hs
View
4 Data/Pool.hs
@@ -150,7 +150,7 @@ reaper destroy idleTime pools = forever $ do
writeTVar entries fresh
modifyTVar_ inUse (subtract (length stale))
return (map entry stale)
- forM_ resources $ \resource -> do
+ forM_ resources $ \resource ->
destroy resource `catch` \(_::SomeException) -> return ()
-- | Temporarily take a resource from a 'Pool', perform an action with
@@ -177,7 +177,7 @@ withResource :: MonadCatchIO m => Pool a -> (a -> m b) -> m b
withResource pool act = block $ do
(resource, local) <- liftIO $ takeResource pool
ret <- act resource `onException`
- (liftIO $ destroyResource pool local resource)
+ liftIO (destroyResource pool local resource)
liftIO $ putResource local resource
return ret
#if __GLASGOW_HASKELL__ >= 700

0 comments on commit 91475b5

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