From 15318fd62708dcefb90948237171bef38b2bd6ed Mon Sep 17 00:00:00 2001 From: Andrii Demydenko Date: Thu, 14 Dec 2023 12:41:38 +0000 Subject: [PATCH 1/3] deps: update resolver to ghc 9.4.8 --- package.yaml | 1 + servant-prometheus.cabal | 1 + stack.yaml | 2 +- stack.yaml.lock | 8 ++++---- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.yaml b/package.yaml index 4f89f9f..a121be0 100644 --- a/package.yaml +++ b/package.yaml @@ -19,6 +19,7 @@ extra-doc-files: tested-with: - GHC == 9.2.8 - GHC == 9.4.7 + - GHC == 9.4.8 verbatim: cabal-version: 2.4 diff --git a/servant-prometheus.cabal b/servant-prometheus.cabal index e018379..424865b 100644 --- a/servant-prometheus.cabal +++ b/servant-prometheus.cabal @@ -19,6 +19,7 @@ build-type: Simple tested-with: GHC == 9.2.8 , GHC == 9.4.7 + , GHC == 9.4.8 extra-source-files: README.md LICENSE diff --git a/stack.yaml b/stack.yaml index c95453d..0c1d80c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.14 +resolver: lts-21.24 ghc-options: # locally install Haddocs for "everything": deps and the project diff --git a/stack.yaml.lock b/stack.yaml.lock index 31decf5..ae6c0c5 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -6,7 +6,7 @@ packages: [] snapshots: - completed: - sha256: 60e54c1ba3c1e7163acf6dafa9d56b2d3b23f88a31ad53a1c9d888f32561f8da - size: 639819 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/14.yaml - original: lts-21.14 + sha256: abcc4a65c15c7c2313f1a87f01bfd4d910516e1930b99653eef1d2d006515916 + size: 640074 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/24.yaml + original: lts-21.24 From e37eef68fad95b30d64c4b46c17199617e53266e Mon Sep 17 00:00:00 2001 From: Andrii Demydenko Date: Thu, 14 Dec 2023 12:41:21 +0000 Subject: [PATCH 2/3] fix: use proper ghc version for CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc5e121..a0b13b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest env: - GHC_VERSION: 9.2.8 + GHC_VERSION: 9.4.8 STACK_LTS: "0" # actual value will be set in later steps steps: From 42ccb747186c5e1e4679878c997957171a06bdf8 Mon Sep 17 00:00:00 2001 From: Andrii Demydenko Date: Thu, 14 Dec 2023 12:56:31 +0000 Subject: [PATCH 3/3] refactor: use newer haskell "language" --- bench/Main.hs | 2 +- package.yaml | 12 ++++-------- servant-prometheus.cabal | 30 +++--------------------------- test/Prometheus/ServantSpec.hs | 4 ++-- 4 files changed, 10 insertions(+), 38 deletions(-) diff --git a/bench/Main.hs b/bench/Main.hs index 4984695..7930cd1 100644 --- a/bench/Main.hs +++ b/bench/Main.hs @@ -10,7 +10,7 @@ import Servant , JSON , Proxy (..) , serve - , type (:>) + , (:>) ) import System.Process (callCommand) diff --git a/package.yaml b/package.yaml index a121be0..7aeaf10 100644 --- a/package.yaml +++ b/package.yaml @@ -24,20 +24,16 @@ tested-with: verbatim: cabal-version: 2.4 +# GHC's GHC2021 language extension is supported by GHC >= 9.2.1 +# for more details see: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0380-ghc2021.rst +language: GHC2021 + default-extensions: - - BangPatterns - DataKinds - DeriveAnyClass - - DeriveGeneric - DerivingStrategies - - FlexibleContexts - - FlexibleInstances - - ImportQualifiedPost - OverloadedStrings - - PolyKinds - RecordWildCards - - ScopedTypeVariables - - TypeOperators - UndecidableInstances ghc-options: diff --git a/servant-prometheus.cabal b/servant-prometheus.cabal index 424865b..78cfcc9 100644 --- a/servant-prometheus.cabal +++ b/servant-prometheus.cabal @@ -41,19 +41,11 @@ library hs-source-dirs: lib default-extensions: - BangPatterns DataKinds DeriveAnyClass - DeriveGeneric DerivingStrategies - FlexibleContexts - FlexibleInstances - ImportQualifiedPost OverloadedStrings - PolyKinds RecordWildCards - ScopedTypeVariables - TypeOperators UndecidableInstances ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-inferred-safe-imports -Wno-missing-safe-haskell-mode -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-prepositive-qualified-module -Wno-missing-kind-signatures -Wno-implicit-prelude build-depends: @@ -66,7 +58,7 @@ library , servant >=0.14 && <0.20 , text >=1.2.5 && <2.1 , wai >=3.2.3 && <3.3 - default-language: Haskell2010 + default-language: GHC2021 test-suite spec type: exitcode-stdio-1.0 @@ -79,19 +71,11 @@ test-suite spec hs-source-dirs: test default-extensions: - BangPatterns DataKinds DeriveAnyClass - DeriveGeneric DerivingStrategies - FlexibleContexts - FlexibleInstances - ImportQualifiedPost OverloadedStrings - PolyKinds RecordWildCards - ScopedTypeVariables - TypeOperators UndecidableInstances ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-inferred-safe-imports -Wno-missing-safe-haskell-mode -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-prepositive-qualified-module -Wno-missing-kind-signatures -Wno-implicit-prelude -Wno-missing-export-lists -threaded "-with-rtsopts=-N -A64m -AL256m" build-tool-depends: @@ -111,7 +95,7 @@ test-suite spec , text , wai , warp >=3.2.4 && <3.4 - default-language: Haskell2010 + default-language: GHC2021 benchmark bench type: exitcode-stdio-1.0 @@ -123,19 +107,11 @@ benchmark bench hs-source-dirs: bench default-extensions: - BangPatterns DataKinds DeriveAnyClass - DeriveGeneric DerivingStrategies - FlexibleContexts - FlexibleInstances - ImportQualifiedPost OverloadedStrings - PolyKinds RecordWildCards - ScopedTypeVariables - TypeOperators UndecidableInstances ghc-options: -Weverything -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-inferred-safe-imports -Wno-missing-safe-haskell-mode -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-prepositive-qualified-module -Wno-missing-kind-signatures -Wno-implicit-prelude -threaded "-with-rtsopts=-N -A64m -AL256m" build-depends: @@ -146,4 +122,4 @@ benchmark bench , text , wai , warp - default-language: Haskell2010 + default-language: GHC2021 diff --git a/test/Prometheus/ServantSpec.hs b/test/Prometheus/ServantSpec.hs index 15a0dd7..ed67e6f 100644 --- a/test/Prometheus/ServantSpec.hs +++ b/test/Prometheus/ServantSpec.hs @@ -21,8 +21,8 @@ import Servant , ReqBody , Server , serve - , type (:<|>) (..) - , type (:>) + , (:<|>) (..) + , (:>) ) import Servant.Client ( BaseUrl (..)