packages feed

text-compression 0.1.0.12 → 0.1.0.13

raw patch · 3 files changed

+15/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -51,3 +51,7 @@ ## 0.1.0.12 -- 2022-11-23  * Added Full-text Minute-space index (FM-index) implementation.++## 0.1.0.13 -- 2022-11-23++* Bug fixes to FM-index STRef functions.
src/Data/FMIndex/Internal.hs view
@@ -53,7 +53,8 @@ import Data.Foldable() import Data.List() import Data.Maybe()-import Data.Sequence as DS (Seq(..),empty,(|>))+import Data.Sequence as DS (Seq(..),ViewR(..),empty,(|>))+import Data.Sequence.Internal as DSI import Data.STRef as DSTR import Data.Text as DText import GHC.Generics (Generic)@@ -93,8 +94,10 @@                      -> (Int,Int,Maybe ByteString)                      -> ST s () updateSTFMIndexSeqAB s e = do-  (s2 DS.:|> s2fm) <- readSTRef s-  writeSTRef s (s2 DS.|> (((\(a,_) -> a) s2fm),((\(_,b) -> b) s2fm) DS.|> e))+  s2 <- readSTRef s+  case viewr s2 of+    EmptyR           -> pure ()+    (s2h DS.:> s2fm) -> writeSTRef s (s2h DS.|> (((\(a,_) -> a) s2fm),((\(_,b) -> b) s2fm) DS.|> e))  -- | State function to update 'FMIndexSeqB' -- with each step of the FMIndex.@@ -226,8 +229,10 @@                      -> (Int,Int,Maybe Text)                      -> ST s () updateSTFMIndexSeqAT s e = do-  (s2 DS.:|> s2fm) <- readSTRef s-  writeSTRef s (s2 DS.|> (((\(a,_) -> a) s2fm),((\(_,b) -> b) s2fm) DS.|> e))+  s2 <- readSTRef s+  case viewr s2 of+    EmptyR           -> pure ()+    (s2h DS.:> s2fm) -> writeSTRef s (s2h DS.|> (((\(a,_) -> a) s2fm),((\(_,b) -> b) s2fm) DS.|> e))  -- | State function to update 'FMIndexSeqT' -- with each step of the FMIndex.
text-compression.cabal view
@@ -20,7 +20,7 @@ -- PVP summary:     +-+------- breaking API changes --                  | | +----- non-breaking API additions --                  | | | +--- code changes with no API change-version:            0.1.0.12+version:            0.1.0.13  -- A short (one-line) description of the package. synopsis:           A text compression library.