on master help sign in
installUnicodeWidthTable: use throwIO, not throw
0d2226cJonathan Daugherty
src/Graphics/Vty/UnicodeWidthTable/Install.hs+3−3
@@ -101,7 +101,7 @@ installUnicodeWidthTable :: UnicodeWidthTable -> IO ()
101installUnicodeWidthTable table = withInstallLock $ do
101installUnicodeWidthTable table = withInstallLock $ do
102 initResult <- initCustomTable tableSize
102 initResult <- initCustomTable tableSize
103 when (initResult /= 0) $
103 when (initResult /= 0) $
104− E.throw $ TableInitFailure initResult tableSize
104+ E.throwIO $ TableInitFailure initResult tableSize
105
105
106 forM_ (unicodeWidthTableRanges table) $ \r -> do
106 forM_ (unicodeWidthTableRanges table) $ \r -> do
107 result <- setCustomTableRange (rangeStart r)
107 result <- setCustomTableRange (rangeStart r)
@@ -110,11 +110,11 @@ installUnicodeWidthTable table = withInstallLock $ do
110
110
111 when (result /= 0) $ do
111 when (result /= 0) $ do
112 deallocateCustomTable
112 deallocateCustomTable
113− E.throw $ TableRangeFailure result r
113+ E.throwIO $ TableRangeFailure result r
114
114
115 actResult <- activateCustomTable
115 actResult <- activateCustomTable
116 when (actResult /= 0) $
116 when (actResult /= 0) $
117− E.throw $ TableActivationFailure actResult
117+ E.throwIO $ TableActivationFailure actResult
118
118
119------------------------------------------------------------------------
119------------------------------------------------------------------------
120-- C imports
120-- C imports