From 0d2226cb1ad87da0a9bf8ae8a61f14ef00e4df5f Mon Sep 17 00:00:00 2001 From: Jonathan Daugherty Date: Mon, 9 Mar 2020 13:45:02 -0700 Subject: [PATCH] installUnicodeWidthTable: use throwIO, not throw --- src/Graphics/Vty/UnicodeWidthTable/Install.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Graphics/Vty/UnicodeWidthTable/Install.hs b/src/Graphics/Vty/UnicodeWidthTable/Install.hs index 7673ed9..feda3e6 100644 --- a/src/Graphics/Vty/UnicodeWidthTable/Install.hs +++ b/src/Graphics/Vty/UnicodeWidthTable/Install.hs @@ -101,7 +101,7 @@ installUnicodeWidthTable :: UnicodeWidthTable -> IO () installUnicodeWidthTable table = withInstallLock $ do initResult <- initCustomTable tableSize when (initResult /= 0) $ - E.throw $ TableInitFailure initResult tableSize + E.throwIO $ TableInitFailure initResult tableSize forM_ (unicodeWidthTableRanges table) $ \r -> do result <- setCustomTableRange (rangeStart r) @@ -110,11 +110,11 @@ installUnicodeWidthTable table = withInstallLock $ do when (result /= 0) $ do deallocateCustomTable - E.throw $ TableRangeFailure result r + E.throwIO $ TableRangeFailure result r actResult <- activateCustomTable when (actResult /= 0) $ - E.throw $ TableActivationFailure actResult + E.throwIO $ TableActivationFailure actResult ------------------------------------------------------------------------ -- C imports