Skip to content

Commit

Permalink
just one run
Browse files Browse the repository at this point in the history
  • Loading branch information
parsonsmatt committed Dec 14, 2024
1 parent 828ea03 commit d1abe68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resourcet/Control/Monad/Trans/Resource.hs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ release' istate key act = E.mask_ $ do
-- @since 0.3.0
runResourceT :: MonadUnliftIO m => ResourceT m a -> m a
runResourceT action = withRunInIO $ \run -> do
E.mask_ $ do
(a, cleanup) <- run $ evalResourceT action
run cleanup
E.mask_ $ run $ do
(a, cleanup) <- evalResourceT action
cleanup
pure a

-- | Like 'runResourceT', but this one does *not* run the cleanup action
Expand Down

0 comments on commit d1abe68

Please sign in to comment.