From d7f8fb875ba734aee757dbd2c5b914d64c1a9dfa Mon Sep 17 00:00:00 2001 From: Brandon Chinn Date: Sat, 19 Nov 2022 17:20:56 -0800 Subject: [PATCH] Add GHC 9.2 + 9.4 snapshots --- .github/workflows/ci.yml | 4 +++- CHANGELOG.md | 2 ++ package.yaml | 13 ++++++++++--- persistent-mtl.cabal | 9 ++++++--- stack-ghc-9.2.yaml | 12 ++++++++++++ stack-ghc-9.4.yaml | 13 +++++++++++++ test/Example.hs | 1 + 7 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 stack-ghc-9.2.yaml create mode 100644 stack-ghc-9.4.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc7e3e3..1ef6357 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ jobs: stack_yaml: - stack-ghc-8.10.yaml - stack-ghc-9.0.yaml + # - stack-ghc-9.2.yaml + - stack-ghc-9.4.yaml - stack-persistent-2.13.yaml - stack-persistent-2.14.yaml include: @@ -20,7 +22,7 @@ jobs: latest: true name: build_and_test (${{ matrix.stack_yaml }}) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 services: postgres: image: postgres:13.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e7dd09..919811c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +* Add GHC 9.4 support + # v0.5.0.0 * Export `SqlQueryT` constructor ([#46](https://github.com/brandonchinn178/persistent-mtl/pull/46)) diff --git a/package.yaml b/package.yaml index f57e0a2..d91a746 100644 --- a/package.yaml +++ b/package.yaml @@ -19,21 +19,28 @@ github: brandonchinn178/persistent-mtl library: source-dirs: src dependencies: - - base >= 4.14 && < 4.16 + - base >= 4.14 && < 5 - conduit >= 1.3.4 && < 1.4 - containers >= 0.6 && < 0.7 - exceptions >= 0.10 && < 0.11 - monad-logger >= 0.3 && < 0.4 - mtl >= 2.2.2 && < 2.3 - persistent >= 2.13 && < 2.15 - - resource-pool >= 0.2.3.2 && < 0.3 + - resource-pool >= 0.2.3.2 && < 0.4 - resourcet >= 1.2.4 && < 1.3 - - text >= 1.2.4 && < 1.3 + - text >= 1.2.4 && < 2.1 - transformers >= 0.5.6 && < 0.6 - unliftio >= 0.2 && < 0.3 - unliftio-core >= 0.2 && < 0.3 - unliftio-pool >= 0.2 && < 0.3 + when: + # https://gitlab.haskell.org/ghc/ghc/-/issues/20836 + - condition: > + impl(ghc >= 9.2.0) && impl(ghc < 9.2.6) || + impl(ghc >= 9.4.0) && impl(ghc < 9.4.3) + buildable: false + tests: persistent-mtl-test: source-dirs: test diff --git a/persistent-mtl.cabal b/persistent-mtl.cabal index 57821ae..db94bde 100644 --- a/persistent-mtl.cabal +++ b/persistent-mtl.cabal @@ -44,21 +44,24 @@ library src ghc-options: -Wall build-depends: - base >=4.14 && <4.16 + base >=4.14 && <5 , conduit >=1.3.4 && <1.4 , containers ==0.6.* , exceptions ==0.10.* , monad-logger ==0.3.* , mtl >=2.2.2 && <2.3 , persistent >=2.13 && <2.15 - , resource-pool >=0.2.3.2 && <0.3 + , resource-pool >=0.2.3.2 && <0.4 , resourcet >=1.2.4 && <1.3 - , text >=1.2.4 && <1.3 + , text >=1.2.4 && <2.1 , transformers >=0.5.6 && <0.6 , unliftio ==0.2.* , unliftio-core ==0.2.* , unliftio-pool ==0.2.* default-language: Haskell2010 + if impl(ghc >= 9.2.0) && impl(ghc < 9.2.6) || impl(ghc >= 9.4.0) && impl(ghc < 9.4.3) + + buildable: False test-suite persistent-mtl-test type: exitcode-stdio-1.0 diff --git a/stack-ghc-9.2.yaml b/stack-ghc-9.2.yaml new file mode 100644 index 0000000..f634972 --- /dev/null +++ b/stack-ghc-9.2.yaml @@ -0,0 +1,12 @@ +resolver: lts-20.0 + +extra-deps: + # https://github.com/yesodweb/persistent/issues/1406#issuecomment-1226741099 + - persistent-2.13.3.3 + +flags: + explainable-predicates: + regex: false + +ghc-options: + "$locals": -Werror diff --git a/stack-ghc-9.4.yaml b/stack-ghc-9.4.yaml new file mode 100644 index 0000000..13df3f7 --- /dev/null +++ b/stack-ghc-9.4.yaml @@ -0,0 +1,13 @@ +resolver: nightly-2022-11-19 + +extra-deps: + # tasty-autocollect-0.3.2.0 + - github: brandonchinn178/tasty-autocollect + commit: d48d8ecb4215aae115dce9407989592caa5f47a0 + +flags: + explainable-predicates: + regex: false + +ghc-options: + "$locals": -Werror diff --git a/test/Example.hs b/test/Example.hs index 5f87d9f..cbe96b1 100644 --- a/test/Example.hs +++ b/test/Example.hs @@ -9,6 +9,7 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -Wno-missing-methods #-} {-# OPTIONS_GHC -Wno-unused-top-binds #-}