Skip to content

Commit

Permalink
Fix haddocks in CancelHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Sep 24, 2024
1 parent 9058199 commit 55d5d4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Stackctl/CancelHandler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import Stackctl.Prelude

import System.Posix.Signals

-- | Install a 'keyboardSignal handler, run an action, then remove it
-- | 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

-- | Install a 'keyboardSignal handler that runs the given action once
-- | Install a 'keyboardSignal' handler that runs the given action once
install :: MonadUnliftIO m => m a -> m ()
install f = do
withRunInIO $ \runInIO -> do
Expand All @@ -22,11 +22,11 @@ install f = do
runInIO f
void $ installHandler keyboardSignal handler Nothing

-- | Remove the current handler for 'keyboardSignal (i.e. install 'Default')
-- | Remove the current handler for 'keyboardSignal' (i.e. install 'Default')
remove :: MonadIO m => m ()
remove = liftIO $ void $ installHandler keyboardSignal Default Nothing

-- | Trigger the installed 'keyboardSignal handler
-- | Trigger the installed 'keyboardSignal' handler
--
-- This is used by our test suite.
trigger :: MonadIO m => m ()
Expand Down

0 comments on commit 55d5d4a

Please sign in to comment.