Skip to content

Commit

Permalink
Use bracket_
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Sep 24, 2024
1 parent 55d5d4a commit 97bf3d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stackctl/CancelHandler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import System.Posix.Signals

-- | Install a 'keyboardSignal' handler, run an action, then remove it
with :: MonadUnliftIO m => m a -> m b -> m b
with f = bracket (install f) (const remove) . const
with f = bracket_ (install f) remove

-- | Install a 'keyboardSignal' handler that runs the given action once
install :: MonadUnliftIO m => m a -> m ()
Expand Down

0 comments on commit 97bf3d0

Please sign in to comment.