Have withInterruptHandler be more transparent

This commit is contained in:
Joshua Clayton 2016-05-15 16:02:21 -04:00
parent 790b62c999
commit 233f83bdf8

View File

@ -16,7 +16,7 @@ resetScreen = do
clearScreen
setCursorPosition 0 0
withInterruptHandler :: IO () -> IO ()
withInterruptHandler :: IO a -> IO a
withInterruptHandler body = do
tid <- myThreadId
void $ installHandler keyboardSignal (Catch (handleInterrupt tid)) Nothing