packages feed

vty 5.28 → 5.28.1

raw patch · 3 files changed

+13/−13 lines, 3 files

Files

CHANGELOG.md view
@@ -1,4 +1,10 @@ +5.28.1+------++Bug fixes:+ * `installUnicodeWidthTable`: use `throwIO`, not `throw`+ 5.28 ---- 
src/Graphics/Vty/UnicodeWidthTable/Install.hs view
@@ -9,7 +9,8 @@  import Control.Monad (when, forM_) import qualified Control.Exception as E-import Control.Concurrent.MVar (MVar, newMVar, takeMVar, putMVar)+import GHC.Conc.Sync (withMVar)+import Control.Concurrent.MVar (MVar, newMVar) import Data.Word (Word8, Word32) #if !(MIN_VERSION_base(4,11,0)) import Data.Semigroup ((<>))@@ -31,14 +32,7 @@ isCustomTableReady = withInstallLock $ (== 1) <$> c_isCustomTableReady  withInstallLock :: IO a -> IO a-withInstallLock act =-    E.bracket takeInstallLock (const releaseInstallLock) $ const act--takeInstallLock :: IO ()-takeInstallLock = takeMVar installLock--releaseInstallLock :: IO ()-releaseInstallLock = putMVar installLock ()+withInstallLock act = withMVar installLock $ const act  -- This is the size of the allocated custom character width table, in -- character slots. It's important that this be large enough to hold all@@ -101,7 +95,7 @@ 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 +104,11 @@          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
vty.cabal view
@@ -1,5 +1,5 @@ name:                vty-version:             5.28+version:             5.28.1 license:             BSD3 license-file:        LICENSE author:              AUTHORS