packages feed

symbolize 1.0.2.1 → 1.0.2.2

raw patch · 4 files changed

+12/−8 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -8,6 +8,10 @@  ## Unreleased +## 1.0.2.2++- Fixing some typos in the documentation (PR [#3](https://github.com/Qqwy/haskell-symbolize/pull/3)). Thank you, @Bodigrim!+ ## 1.0.2.1  - Widen dependency bounds, making the package work with the latest version of `containers` and `hashable`.
src/Symbolize.hs view
@@ -14,6 +14,7 @@ -- -- Furthermore, a global symbol table keeps track of which values currently exist, ensuring we always deduplicate symbols. -- This therefore allows us to:+-- -- - Check for equality between symbols in constant-time (using pointer equality) -- - Calculate the hash in constant-time (using `StableName`) -- - Keep the memory footprint of repeatedly-seen strings low.@@ -258,7 +259,7 @@         return $ intern str  -- | The contents inside a `Symbol` are always guaranteed to be evaluated,--- so this only forces the outernmost constructor using `seq`.+-- so this only forces the outermost constructor using `seq`. instance NFData Symbol where   {-# INLINE rnf #-}   rnf a = seq a ()@@ -266,7 +267,7 @@ -- | -- Hashing a `Symbol` is very fast: ----- `hash` takes O(1) and results in zero collissions, as `StableName`s are used.+-- `hash` takes O(1) and results in zero collisions, as `StableName`s are used. -- -- `hashWithSalt` takes O(1) time; just as long as hashWithSalt-ing any other `Int`. instance Hashable Symbol where@@ -385,14 +386,14 @@  -- | Hash an unlifted `Symbol#` ----- Takes O(1) and results in zero collissions, as `StableName`s are used.+-- Takes O(1) and results in zero collisions, as `StableName`s are used. hashSymbol# :: Symbol# -> Int {-# INLINE hashSymbol# #-} hashSymbol# sym# = I# (hashSymbol## sym#)  -- | Hash an unlifted `Symbol#`, returning an unlifted `Int#` ----- Takes O(1) and results in zero collissions, as `StableName`s are used.+-- Takes O(1) and results in zero collisions, as `StableName`s are used. hashSymbol## :: Symbol# -> Int# {-# INLINE hashSymbol## #-} hashSymbol## (Symbol# ba#) = Accursed.byteArrayStableNameHash## ba#
src/Symbolize/SymbolTable.hs view
@@ -133,7 +133,6 @@         Nothing -> False         Just _ -> True --- TODO: Replace with SipHash calculateHash :: SipHash.SipKey -> ByteArray# -> Hash {-# INLINE calculateHash #-} calculateHash sipkey ba# =@@ -144,7 +143,7 @@ {-# INLINE mkWeakSymbol #-} mkWeakSymbol ba# (IO finalizer#) =      -- SAFETY: This should even be safe-    -- in the prescence of inlining, CSE and full laziness+    -- in the presence of inlining, CSE and full laziness     --     -- because the result is outwardly pure     -- and the finalizer we use is idempotent@@ -158,7 +157,7 @@ {-# INLINE deRefWeakSymbol #-} deRefWeakSymbol (WeakSymbol# w _sn) =      -- SAFETY: This should even be safe-    -- in the prescence of inlining, CSE and full laziness;+    -- in the presence of inlining, CSE and full laziness;     Symbolize.Accursed.accursedUnutterablePerformIO $ IO $ \s ->   case deRefWeak# w s of     (# s1, flag, p #) -> case flag of
symbolize.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           symbolize-version:        1.0.2.1+version:        1.0.2.2 synopsis:       Efficient global Symbol table, with Garbage Collection. description:    Symbols, also known as Atoms or Interned Strings, are a common technique                 to reduce memory usage and improve performance when using many small strings: