Allow ghc-9.0.1

This commit is contained in:
waddlaw 2021-05-21 15:42:58 +09:00
parent 093a052f05
commit 2ab07fb3af
4 changed files with 15 additions and 4 deletions

View File

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
ghc: ["8.6", "8.8", "8.10"]
ghc: ["8.6", "8.8", "8.10", "9.0"]
cabal: ["3.2"]
cache-version: ["2021-05-21"]

View File

@ -5,6 +5,7 @@
## 0.1.2.0 -- 2021-05-21
- Added support for GHC 8.10 [#7](https://github.com/waddlaw/haskell-stack-trace-plugin/pull/7) (@etorreborre)
- Added support for GHC 9.0 @waddlaw
## 0.1.1.1 -- 2020-01-18

View File

@ -20,7 +20,7 @@ extra-source-files:
CHANGELOG.md
Readme.md
tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.4
tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1
source-repository head
type: git
@ -32,19 +32,20 @@ flag dev
default: False
common common-opts
build-depends: base >=4.12 && <4.15
build-depends: base >=4.12 && <4.16
default-language: Haskell2010
library
import: common-opts
hs-source-dirs: src
build-depends: ghc ^>=8.6 || ^>=8.8 || ^>=8.10
build-depends: ghc ^>=8.6 || ^>=8.8 || ^>=8.10 || ^>=9.0
exposed-modules: StackTrace.Plugin
if flag(dev)
ghc-options:
-Wall -Werror -Wcompat -Wincomplete-uni-patterns
-Wnoncanonical-monad-instances -Wno-missing-home-modules
else
ghc-options: -Wall

View File

@ -5,7 +5,12 @@ module StackTrace.Plugin (plugin) where
import Control.Arrow (first)
import Data.Monoid (Any(Any, getAny))
#if __GLASGOW_HASKELL__ >= 900
import GHC.Plugins
#else
import GhcPlugins
#endif
#if __GLASGOW_HASKELL__ >= 810
import GHC.Hs
#endif
@ -48,7 +53,11 @@ ghcStackImport =
(simpleImportDecl $ mkModuleName "GHC.Stack")
{ideclQualified = importDeclQualified, ideclAs = Just $ noLoc ghcStackModuleName}
#if __GLASGOW_HASKELL__ >= 900
updateHsModule :: HsModule -> HsModule
#else
updateHsModule :: HsModule GhcPs -> HsModule GhcPs
#endif
updateHsModule hsm =
hsm {hsmodImports = hsmodImports', hsmodDecls = hsmodDecls'}
where