Fix #112 with support for GHC 9.8 (#113)

* Add missing signature for overloaded `withEpAnnNotUsed`

* Fixed issued caused by #112

* Stack support for GHC 9.8

* Add stack-9.8.yaml

* Bump Tasty to `< 1.6`
This commit is contained in:
Peter Matta 2024-04-01 18:56:43 +02:00 committed by GitHub
parent 26256ea4ed
commit d9707003aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 32 additions and 8 deletions

View File

@ -106,7 +106,7 @@ test-suite name_test
, base >=4.7 && <5
, ghc >=8.4 && <9.9
, ghc-source-gen
, tasty >=1.0 && <1.5
, tasty >=1.0 && <1.6
, tasty-hunit ==0.10.*
, tasty-quickcheck >=0.9 && <0.11
default-language: Haskell2010
@ -128,7 +128,7 @@ test-suite pprint_examples
, ghc >=8.4 && <9.9
, ghc-paths ==0.1.*
, ghc-source-gen
, tasty >=1.0 && <1.5
, tasty >=1.0 && <1.6
, tasty-hunit ==0.10.*
default-language: Haskell2010
if impl(ghc<9.0)
@ -154,7 +154,7 @@ test-suite pprint_test
, ghc >=8.4 && <9.9
, ghc-paths ==0.1.*
, ghc-source-gen
, tasty >=1.0 && <1.5
, tasty >=1.0 && <1.6
, tasty-hunit ==0.10.*
default-language: Haskell2010
if impl(ghc<9.0)

View File

@ -30,7 +30,7 @@ description: |
dependencies:
- base >= 4.7 && < 5
- ghc >= 8.4 && < 9.7
- ghc >= 8.4 && < 9.9
default-extensions:
- DataKinds
@ -84,7 +84,7 @@ tests:
dependencies:
- ghc-source-gen
- ghc-paths == 0.1.*
- tasty >= 1.0 && < 1.5
- tasty >= 1.0 && < 1.6
- tasty-hunit == 0.10.*
when:
@ -100,7 +100,7 @@ tests:
dependencies:
- ghc-source-gen
- ghc-paths == 0.1.*
- tasty >= 1.0 && < 1.5
- tasty >= 1.0 && < 1.6
- tasty-hunit == 0.10.*
when:
@ -117,6 +117,6 @@ tests:
dependencies:
- ghc-source-gen
- QuickCheck >= 2.10 && < 2.15
- tasty >= 1.0 && < 1.5
- tasty >= 1.0 && < 1.6
- tasty-hunit == 0.10.*
- tasty-quickcheck >= 0.9 && < 0.11

View File

@ -219,5 +219,14 @@ moduleContents = withEpAnnNotUsed' IEModuleContents . mkLocated . unModuleNameSt
withEpAnnNotUsed' :: ((Maybe x, EpAnn ann) -> a) -> a
withEpAnnNotUsed' = ($ (Nothing, EpAnnNotUsed))
#else
withEpAnnNotUsed' = withEpAnnNotUsed
#if MIN_VERSION_ghc(9,2,0)
withEpAnnNotUsed' :: (EpAnn ann -> a) -> a
#elif MIN_VERSION_ghc(8,6,0)
withEpAnnNotUsed' :: (NoExtField -> a) -> a
#else
withEpAnnNotUsed' :: a -> a
#endif
withEpAnnNotUsed' = withEpAnnNotUsed
#endif

15
stack-9.8.yaml Normal file
View File

@ -0,0 +1,15 @@
# Copyright 2019 Google LLC
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
resolver: nightly-2024-03-29
compiler: ghc-9.8.2
packages:
- .
- ghc-show-ast
ghc-options:
"$locals": -Wall -Werror -Wwarn=unused-imports -Wwarn=dodgy-imports