Skip to content

Commit

Permalink
HLint
Browse files Browse the repository at this point in the history
  • Loading branch information
norm2782 committed Mar 8, 2012
1 parent 8512dc4 commit 91475b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Data/Pool.hs
Expand Up @@ -150,7 +150,7 @@ reaper destroy idleTime pools = forever $ do
writeTVar entries fresh writeTVar entries fresh
modifyTVar_ inUse (subtract (length stale)) modifyTVar_ inUse (subtract (length stale))
return (map entry stale) return (map entry stale)
forM_ resources $ \resource -> do forM_ resources $ \resource ->
destroy resource `catch` \(_::SomeException) -> return () destroy resource `catch` \(_::SomeException) -> return ()


-- | Temporarily take a resource from a 'Pool', perform an action with -- | Temporarily take a resource from a 'Pool', perform an action with
Expand All @@ -177,7 +177,7 @@ withResource :: MonadCatchIO m => Pool a -> (a -> m b) -> m b
withResource pool act = block $ do withResource pool act = block $ do
(resource, local) <- liftIO $ takeResource pool (resource, local) <- liftIO $ takeResource pool
ret <- act resource `onException` ret <- act resource `onException`
(liftIO $ destroyResource pool local resource) liftIO (destroyResource pool local resource)
liftIO $ putResource local resource liftIO $ putResource local resource
return ret return ret
#if __GLASGOW_HASKELL__ >= 700 #if __GLASGOW_HASKELL__ >= 700
Expand Down

0 comments on commit 91475b5

Please sign in to comment.