packages feed

persistent-stm 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+8/−8 lines, 3 filesdep ~binary

Dependency ranges changed: binary

Files

CHANGELOG.md view
@@ -1,5 +1,5 @@ # Revision history for persistent-stm -## 0.1.0.0 -- YYYY-mm-dd+## 0.1.0.0 -- 2022-07-21  * First version. Released on an unsuspecting world.
persistent-stm.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               persistent-stm-version:            0.1.0.0+version:            0.1.0.1 synopsis:           STM transactions involving persistent storage description:        While Haskell's STM monad allows you to execute code                     transactionally, it does not allow you to persist the state@@ -17,7 +17,7 @@  extra-source-files: CHANGELOG.md -tested-with:        GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.1 || == 9.2.2+tested-with:        GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.1 || == 9.2.3  source-repository   head     type:     git@@ -26,7 +26,7 @@ library     exposed-modules:  PersistentSTM     build-depends:    base           >= 4.12 && < 4.17,-                      binary         >= 0.8 && < 0.9,+                      binary         >= 0.8 && < 0.11,                       bytestring     >= 0.10 && < 0.12,                       containers     >= 0.6 && < 0.7,                       directory      >= 1.3 && < 1.4,
src/PersistentSTM.hs view
@@ -145,7 +145,7 @@   encode = Binary.encode . fmap encode   decode db = traverse (decode db) . Binary.decode --- | Internal state of a 'DBRef'.  'Loading' means that the value is already+-- | Internal state of a 'DBRef'.  Loading means that the value is already -- being loaded from persistent storage in a different thread, so the current -- transaction can just retry to wait for it to load. data Possible a = Loading | Missing | Present a@@ -175,7 +175,7 @@     persistentFinish :: IO ()   } --- A currently open database in which 'DBRef's can be read and written.  See+-- | A currently open database in which 'DBRef's can be read and written.  See -- 'openDB', 'closeDB', and 'withDB' to manage 'DB' values. data DB = DB   { -- | Cached 'TVar's corresponding to 'DBRef's that are already loading or@@ -187,7 +187,7 @@     -- | Collection of dirty values that need to be written.  Only the     -- 'ByteString' from the value is needed, but keeping the 'TVar' as well     -- ensures that the 'TVar' won't be garbage collected and removed from-    -- 'dbRefs', which guarantees the value won't be read again until after the+    -- dbRefs, which guarantees the value won't be read again until after the     -- write is complete.  This is needed for consistency.     dbDirty :: TVar (Map String (SomeTVar, Maybe ByteString)),     -- | The persistence that is used for this database.@@ -201,7 +201,7 @@     dbClosed :: TVar Bool   } --- A reference to persistent data from some 'DB' that can be accessed in 'STM'+-- | A reference to persistent data from some 'DB' that can be accessed in 'STM' -- transaction.  @'DBRef' a@ is similar to @'TVar ('Maybe' a)@, except that -- values exist in persistent storage as well as in memory. data DBRef a = DBRef DB String (TVar (Possible a))