packages feed

mealstrom 0.0.1.0 → 0.0.1.1

raw patch · 4 files changed

+45/−23 lines, 4 filesdep +deferred-foldsdep −list-tdep ~aesondep ~hashabledep ~stm-containersPVP ok

version bump matches the API change (PVP)

Dependencies added: deferred-folds

Dependencies removed: list-t

Dependency ranges changed: aeson, hashable, stm-containers, time

API changes (from Hackage documentation)

Files

+ CHANGELOG.md view
@@ -0,0 +1,10 @@+# Changelog+All notable changes to this project will be documented in this file.++The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)++## [Unreleased]++## [0.0.1.1] - 2021-01-15+### Changed+- bump dependencies and make code compile again
mealstrom.cabal view
@@ -1,7 +1,7 @@ cabal-version:       2.2  name:                mealstrom-version:             0.0.1.0+version:             0.0.1.1 synopsis:            Manipulate FSMs and store them in PostgreSQL. homepage:            https://github.com/linearray/mealstrom bug-reports:         https://github.com/linearray/mealstrom/issues@@ -11,6 +11,9 @@     a kind of finite-state machine, in Haskell using PostgreSQL for     persistence. +extra-source-files:+                     README.md+                     CHANGELOG.md license:             MIT license-file:        LICENSE author:              Max Amanshauser@@ -23,17 +26,17 @@ common deps     build-depends:       , base              >= 4.8      && < 5.0-      , aeson             >= 1.1      && < 1.5+      , aeson             >= 1.1      && < 1.6       , async             >= 2.1.0    && < 2.3       , bytestring        >= 0.10.8.1 && < 0.11-      , hashable          >= 1.2.4    && < 1.3-      , list-t            >= 1        && < 2+      , hashable          >= 1.2.4    && < 1.4+      , deferred-folds    >= 0.9.10.1 && < 1       , postgresql-simple >= 0.5.1.2  && < 0.7       , resource-pool     >= 0.2.3.2  && < 0.3       , stm               >= 2.4.4.1  && < 2.6-      , stm-containers    >= 0.2.15   && < 1+      , stm-containers    >= 1.0      && < 1.3       , text              >= 1.2.2.1  && < 1.3-      , time              >= 1.6      && < 2.0+      , time              >= 1.6      && < 1.12       , uuid              >= 1.3.12   && < 1.4  library
src/Mealstrom/MemoryStore.hs view
@@ -24,8 +24,8 @@ import           Control.Exception import           Data.Text import           Data.Time-import qualified ListT-import           STMContainers.Map as Map+import qualified DeferredFolds.UnfoldlM as UnfoldlM+import           StmContainers.Map as Map  import           Mealstrom.FSM import           Mealstrom.FSMStore@@ -116,9 +116,9 @@     getCurrentTime >>= \t -> atomically $         let xx = addUTCTime (negate (fromInteger (toInteger cutoff) :: NominalDiffTime)) t in -        ListT.fold (\acc (k,(t,w)) -> if t < xx+        UnfoldlM.foldlM' (\acc (k,(t,w)) -> if t < xx                                     then return (WALEntry k t w : acc)-                                    else return acc) [] (stream memstoreWals)+                                    else return acc) [] (Map.unfoldlM memstoreWals)   printWal :: MemoryStore k s e a -> k -> IO ()
test/Main.hs view
@@ -10,21 +10,30 @@ import Database.PostgreSQL.Simple.Types  import Data.ByteString.Char8             as DBSC8+import Data.Maybe                           (fromMaybe)+import Data.Semigroup ((<>)) +import System.Environment+ import Test.Tasty  main :: IO ()-main =-    let c = "host='localhost' port=5432 dbname='fsmtest'" in do-        conn <- connectPostgreSQL (DBSC8.pack c)-        _    <- execute_ conn $ Query (DBSC8.pack "DROP SCHEMA public CASCADE; CREATE SCHEMA public;")+main = do+    h  <- fromMaybe "localhost" <$> lookupEnv "PGHOST"+    p  <- fromMaybe "5432"      <$> lookupEnv "PGPORT"+    u  <- fromMaybe "postgres"  <$> lookupEnv "PGUSER"+    pw <- fromMaybe ""          <$> lookupEnv "PGPASSWORD" -        defaultMain $ testGroup "All tests" [-            runBasicTests c,-            runFSM2FSMTests c,-            runCounterTests c,-            runRecoveryTests c,-            runTimeoutTests c,-            runExceptionTests c,-            runUpgradeTests c-            ]+    let c = "host='" <> h <> "' port=" <> p <> " dbname='fsmtest' user='" <> u <> "' password='" <> pw <> "'"+    conn <- connectPostgreSQL (DBSC8.pack c)+    _    <- execute_ conn $ Query (DBSC8.pack "DROP SCHEMA public CASCADE; CREATE SCHEMA public;")++    defaultMain $ testGroup "All tests" [+        runBasicTests c,+        runFSM2FSMTests c,+        runCounterTests c,+        runRecoveryTests c,+        runTimeoutTests c,+        runExceptionTests c,+        runUpgradeTests c+        ]