Skip to content

Commit 4aec326

Browse files
Support GHC 9.8 and GHC 9.12 (#1575)
* Support GHC 9.8 * both of em * neat * no * sigh, docker limits * lol * hascallstack * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fmt * maybe you will work * ok now it works --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 44e3955 commit 4aec326

File tree

5 files changed

+33
-22
lines changed

5 files changed

+33
-22
lines changed

.github/workflows/haskell.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
- "9.2"
5454
- "9.4"
5555
- "9.6"
56-
# - "9.8"
56+
- "9.8"
5757
- "9.10"
58-
# - "9.12"
58+
- "9.12"
5959

6060
env:
6161
CONFIG: "--enable-tests --enable-benchmarks"
@@ -73,7 +73,7 @@ jobs:
7373
with:
7474
mongodb-version: '5.0'
7575
- name: Start Redis
76-
uses: supercharge/[email protected]
76+
uses: shogo82148/actions-setup-redis@v1
7777
- run: sudo apt-get update && sudo apt-get install -y libpcre3-dev
7878
- run: cabal v2-update
7979
- run: cabal v2-freeze $CONFIG

cabal.project

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
packages:
2-
persistent
3-
persistent-sqlite
4-
persistent-test
5-
persistent-mongoDB
6-
persistent-mysql
7-
persistent-postgresql
8-
persistent-redis
9-
persistent-qq
2+
persistent
3+
persistent-sqlite
4+
persistent-test
5+
persistent-mongoDB
6+
persistent-mysql
7+
persistent-postgresql
8+
persistent-redis
9+
persistent-qq
1010

1111
-- required by nix.
1212
package postgresql-libpq
13-
flags: +use-pkg-config
13+
flags: +use-pkg-config
1414

15-
constraints:
16-
-- https://github.com/mongodb-haskell/mongodb/pull/152
17-
mongoDB < 2.7.1.3
15+
allow-newer:
16+
-- https://github.com/fizruk/http-api-data/pull/146
17+
http-api-data:base
18+
, postgresql-simple:base
19+
, postgresql-simple:template-haskell
20+
, bytestring-lexing:base
21+
22+
source-repository-package
23+
type: git
24+
location: https://github.com/parsonsmatt/mysql
25+
tag: 1e7dc274bf9a2919c9dd4298ed46c1bd1a1b677d
1826

1927
-- Needed to test that `persistent-redis` works with mtl-2.3
2028
-- https://github.com/informatikr/hedis/pull/190

persistent-test/src/DataTypeTest.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ specsWith runDb mmigration checks apprxChecks doubleFn = describe "data type spe
117117
key <- insert x
118118
Just y <- get key
119119
liftIO $ do
120-
let check :: (Eq a, Show a) => String -> (entity -> a) -> IO ()
120+
let check :: (Eq a, Show a, HasCallStack) => String -> (entity -> a) -> IO ()
121121
check s f = (s, f x) @=? (s, f y)
122122
-- Check floating-point near equality
123-
let check' :: (Fractional p, Show p, Real p) => String -> (entity -> p) -> IO ()
123+
let check' :: (Fractional p, Show p, Real p, HasCallStack) => String -> (entity -> p) -> IO ()
124124
check' s f
125125
| abs (f x - f y) < 0.000001 = return ()
126126
| otherwise = (s, f x) @=? (s, f y)

persistent/bench/Main.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,11 @@ instance NFData DerivStrategy where
132132
instance NFData DerivClause where
133133
#endif
134134

135-
#if MIN_VERSION_template_haskell(2,22,0)
135+
#if MIN_VERSION_template_haskell(2,21,0)
136136
instance NFData BndrVis where
137+
#endif
138+
139+
#if MIN_VERSION_template_haskell(2,22,0)
137140
instance NFData NamespaceSpecifier where
138141
#endif
139142

persistent/persistent.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ library
4242
, resourcet >=1.1.10
4343
, scientific
4444
, silently
45-
, template-haskell >=2.13 && <2.23
45+
, template-haskell >=2.13 && <2.24
4646
, text >=1.2
4747
, th-lift-instances >=0.1.14 && <0.2
4848
, time >=1.6
@@ -110,13 +110,13 @@ library
110110

111111
-- These modules only make sense for compilers with access to DerivingVia
112112
if impl(ghc >=8.6.1)
113-
exposed-modules: Database.Persist.Compatible
113+
exposed-modules: Database.Persist.Compatible
114114
other-modules:
115115
Database.Persist.Compatible.TH
116116
Database.Persist.Compatible.Types
117117

118-
ghc-options: -Wall -Werror=incomplete-patterns
119-
default-language: Haskell2010
118+
ghc-options: -Wall -Werror=incomplete-patterns
119+
default-language: Haskell2010
120120

121121
test-suite test
122122
type: exitcode-stdio-1.0

0 commit comments

Comments
 (0)