git.iko.soy/typeable/haskell-stack-trace-plugin
on master help sign in
Allow ghc-9.0.1
2ab07fbwaddlaw
.github/workflows/cabal.yml+1−1
@@ -13,7 +13,7 @@ jobs:
13 runs-on: ubuntu-18.04
13 runs-on: ubuntu-18.04
14 strategy:
14 strategy:
15 matrix:
15 matrix:
16− ghc: ["8.6", "8.8", "8.10"]
16+ ghc: ["8.6", "8.8", "8.10", "9.0"]
17 cabal: ["3.2"]
17 cabal: ["3.2"]
18 cache-version: ["2021-05-21"]
18 cache-version: ["2021-05-21"]
19
19
CHANGELOG.md+1
@@ -5,6 +5,7 @@
5## 0.1.2.0 -- 2021-05-21
5## 0.1.2.0 -- 2021-05-21
6
6
7- Added support for GHC 8.10 [#7](https://github.com/waddlaw/haskell-stack-trace-plugin/pull/7) (@etorreborre)
7- Added support for GHC 8.10 [#7](https://github.com/waddlaw/haskell-stack-trace-plugin/pull/7) (@etorreborre)
8+- Added support for GHC 9.0 @waddlaw
8
9
9## 0.1.1.1 -- 2020-01-18
10## 0.1.1.1 -- 2020-01-18
10
11
haskell-stack-trace-plugin.cabal+4−3
@@ -20,7 +20,7 @@ extra-source-files:
20 CHANGELOG.md
20 CHANGELOG.md
21 Readme.md
21 Readme.md
22
22
23−tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.4
23+tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1
24
24
25source-repository head
25source-repository head
26 type: git
26 type: git
@@ -32,19 +32,20 @@ flag dev
32 default: False
32 default: False
33
33
34common common-opts
34common common-opts
35− build-depends: base >=4.12 && <4.15
35+ build-depends: base >=4.12 && <4.16
36 default-language: Haskell2010
36 default-language: Haskell2010
37
37
38library
38library
39 import: common-opts
39 import: common-opts
40 hs-source-dirs: src
40 hs-source-dirs: src
41− build-depends: ghc ^>=8.6 || ^>=8.8 || ^>=8.10
41+ build-depends: ghc ^>=8.6 || ^>=8.8 || ^>=8.10 || ^>=9.0
42 exposed-modules: StackTrace.Plugin
42 exposed-modules: StackTrace.Plugin
43
43
44 if flag(dev)
44 if flag(dev)
45 ghc-options:
45 ghc-options:
46 -Wall -Werror -Wcompat -Wincomplete-uni-patterns
46 -Wall -Werror -Wcompat -Wincomplete-uni-patterns
47 -Wnoncanonical-monad-instances -Wno-missing-home-modules
47 -Wnoncanonical-monad-instances -Wno-missing-home-modules
48+
48 else
49 else
49 ghc-options: -Wall
50 ghc-options: -Wall
50
51
src/StackTrace/Plugin.hs+9
@@ -5,7 +5,12 @@ module StackTrace.Plugin (plugin) where
5
5
6import Control.Arrow (first)
6import Control.Arrow (first)
7import Data.Monoid (Any(Any, getAny))
7import Data.Monoid (Any(Any, getAny))
8+#if __GLASGOW_HASKELL__ >= 900
9+import GHC.Plugins
10+#else
11+
8import GhcPlugins
12import GhcPlugins
13+#endif
9#if __GLASGOW_HASKELL__ >= 810
14#if __GLASGOW_HASKELL__ >= 810
10import GHC.Hs
15import GHC.Hs
11#endif
16#endif
@@ -48,7 +53,11 @@ ghcStackImport =
48 (simpleImportDecl $ mkModuleName "GHC.Stack")
53 (simpleImportDecl $ mkModuleName "GHC.Stack")
49 {ideclQualified = importDeclQualified, ideclAs = Just $ noLoc ghcStackModuleName}
54 {ideclQualified = importDeclQualified, ideclAs = Just $ noLoc ghcStackModuleName}
50
55
56+#if __GLASGOW_HASKELL__ >= 900
57+updateHsModule :: HsModule -> HsModule
58+#else
51updateHsModule :: HsModule GhcPs -> HsModule GhcPs
59updateHsModule :: HsModule GhcPs -> HsModule GhcPs
60+#endif
52updateHsModule hsm =
61updateHsModule hsm =
53 hsm {hsmodImports = hsmodImports', hsmodDecls = hsmodDecls'}
62 hsm {hsmodImports = hsmodImports', hsmodDecls = hsmodDecls'}
54 where
63 where