From ca694df50e158d596a9e22992f06ca9e6bd02aa7 Mon Sep 17 00:00:00 2001 From: Joshua Clayton Date: Wed, 11 May 2016 21:30:03 -0400 Subject: [PATCH] Use void --- src/Unused/CLI/Util.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Unused/CLI/Util.hs b/src/Unused/CLI/Util.hs index 178a41e..a785cc0 100644 --- a/src/Unused/CLI/Util.hs +++ b/src/Unused/CLI/Util.hs @@ -4,6 +4,7 @@ module Unused.CLI.Util , module System.Console.ANSI ) where +import Control.Monad (void) import System.Console.ANSI import Control.Exception (throwTo) import System.Posix.Signals (Handler(Catch), installHandler, keyboardSignal) @@ -18,7 +19,7 @@ resetScreen = do withInterruptHandler :: IO () -> IO () withInterruptHandler body = do tid <- myThreadId - _ <- installHandler keyboardSignal (Catch (handleInterrupt tid)) Nothing + void $ installHandler keyboardSignal (Catch (handleInterrupt tid)) Nothing body handleInterrupt :: ThreadId -> IO ()