diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 04071dc50..aab41f640 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -53,9 +53,9 @@ jobs: - "9.2" - "9.4" - "9.6" - # - "9.8" + - "9.8" - "9.10" - # - "9.12" + - "9.12" env: CONFIG: "--enable-tests --enable-benchmarks" @@ -73,7 +73,7 @@ jobs: with: mongodb-version: '5.0' - name: Start Redis - uses: supercharge/redis-github-action@1.4.0 + uses: shogo82148/actions-setup-redis@v1 - run: sudo apt-get update && sudo apt-get install -y libpcre3-dev - run: cabal v2-update - run: cabal v2-freeze $CONFIG diff --git a/cabal.project b/cabal.project index 76238c86c..b42793254 100644 --- a/cabal.project +++ b/cabal.project @@ -1,20 +1,28 @@ packages: - persistent - persistent-sqlite - persistent-test - persistent-mongoDB - persistent-mysql - persistent-postgresql - persistent-redis - persistent-qq + persistent + persistent-sqlite + persistent-test + persistent-mongoDB + persistent-mysql + persistent-postgresql + persistent-redis + persistent-qq -- required by nix. package postgresql-libpq - flags: +use-pkg-config + flags: +use-pkg-config -constraints: - -- https://github.com/mongodb-haskell/mongodb/pull/152 - mongoDB < 2.7.1.3 +allow-newer: + -- https://github.com/fizruk/http-api-data/pull/146 + http-api-data:base + , postgresql-simple:base + , postgresql-simple:template-haskell + , bytestring-lexing:base + +source-repository-package + type: git + location: https://github.com/parsonsmatt/mysql + tag: 1e7dc274bf9a2919c9dd4298ed46c1bd1a1b677d -- Needed to test that `persistent-redis` works with mtl-2.3 -- https://github.com/informatikr/hedis/pull/190 diff --git a/persistent-test/src/DataTypeTest.hs b/persistent-test/src/DataTypeTest.hs index 5d7a5fd0d..195f3d119 100644 --- a/persistent-test/src/DataTypeTest.hs +++ b/persistent-test/src/DataTypeTest.hs @@ -117,10 +117,10 @@ specsWith runDb mmigration checks apprxChecks doubleFn = describe "data type spe key <- insert x Just y <- get key liftIO $ do - let check :: (Eq a, Show a) => String -> (entity -> a) -> IO () + let check :: (Eq a, Show a, HasCallStack) => String -> (entity -> a) -> IO () check s f = (s, f x) @=? (s, f y) -- Check floating-point near equality - let check' :: (Fractional p, Show p, Real p) => String -> (entity -> p) -> IO () + let check' :: (Fractional p, Show p, Real p, HasCallStack) => String -> (entity -> p) -> IO () check' s f | abs (f x - f y) < 0.000001 = return () | otherwise = (s, f x) @=? (s, f y) diff --git a/persistent/bench/Main.hs b/persistent/bench/Main.hs index 143ba7d89..5d50ee342 100644 --- a/persistent/bench/Main.hs +++ b/persistent/bench/Main.hs @@ -132,8 +132,11 @@ instance NFData DerivStrategy where instance NFData DerivClause where #endif -#if MIN_VERSION_template_haskell(2,22,0) +#if MIN_VERSION_template_haskell(2,21,0) instance NFData BndrVis where +#endif + +#if MIN_VERSION_template_haskell(2,22,0) instance NFData NamespaceSpecifier where #endif diff --git a/persistent/persistent.cabal b/persistent/persistent.cabal index 20791241d..6ea58bcad 100644 --- a/persistent/persistent.cabal +++ b/persistent/persistent.cabal @@ -42,7 +42,7 @@ library , resourcet >=1.1.10 , scientific , silently - , template-haskell >=2.13 && <2.23 + , template-haskell >=2.13 && <2.24 , text >=1.2 , th-lift-instances >=0.1.14 && <0.2 , time >=1.6 @@ -110,13 +110,13 @@ library -- These modules only make sense for compilers with access to DerivingVia if impl(ghc >=8.6.1) - exposed-modules: Database.Persist.Compatible + exposed-modules: Database.Persist.Compatible other-modules: Database.Persist.Compatible.TH Database.Persist.Compatible.Types - ghc-options: -Wall -Werror=incomplete-patterns - default-language: Haskell2010 + ghc-options: -Wall -Werror=incomplete-patterns + default-language: Haskell2010 test-suite test type: exitcode-stdio-1.0