git.iko.soy/typeable/haskell-stack-trace-plugin
on master help sign in
Merge pull request #10 from waddlaw/release
0e20658Shinya Yamaguchi
.github/workflows/cabal.yml+16−28
@@ -2,13 +2,9 @@ name: cabal
2
2
3on:
3on:
4 push:
4 push:
5− branches:
5+ branches: [ master ]
6− - master
7− tags-ignore:
8− - '*'
9 pull_request:
6 pull_request:
10− branches:
7+ branches: [ '*' ]
11− - '*'
12 schedule:
8 schedule:
13 - cron: "00 15 * * *"
9 - cron: "00 15 * * *"
14
10
@@ -17,40 +13,32 @@ jobs:
17 runs-on: ubuntu-18.04
13 runs-on: ubuntu-18.04
18 strategy:
14 strategy:
19 matrix:
15 matrix:
20− ghc: ["8.6.5", "8.8.1", "8.10.4"]
16+ ghc: ["8.6", "8.8", "8.10", "9.0"]
21− cabal: ["3.0"]
17+ cabal: ["3.2"]
18+ cache-version: ["2021-05-21"]
22
19
23 steps:
20 steps:
24 - uses: actions/checkout@v2
21 - uses: actions/checkout@v2
25− - uses: actions/setup-haskell@v1
22+ - uses: haskell/actions/setup@v1
26 with:
23 with:
27 ghc-version: ${{ matrix.ghc }}
24 ghc-version: ${{ matrix.ghc }}
28 cabal-version: ${{ matrix.cabal }}
25 cabal-version: ${{ matrix.cabal }}
29
26
30− - name: Display ghc & cabal version
31− run: |
32− ghc -V
33− cabal -V
34−
35 - name: Cache ~/.cabal/store
27 - name: Cache ~/.cabal/store
36− uses: actions/cache@v1.1.0
28+ uses: actions/cache@v2
37− with:
38− path: ~/.cabal/store
39− key: ${{ matrix.ghc }}-v0-cabal-store-${{ hashFiles('*.cabal') }}
40−
41− - name: Cache dist-newstyle
42− uses: actions/cache@v1.1.0
43 with:
29 with:
30+ path: |
31+ ~/.cabal/store
44− path: dist-newstyle
32+ dist-newstyle
45− key: ${{ matrix.ghc }}-v0-cabal-dist-${{ hashFiles('*.cabal') }}
33+ key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cache-version }}-cabal
46
34
47 - name: Install dependencies
35 - name: Install dependencies
48 run: |
36 run: |
49− cabal v2-update
37+ cabal update
50− cabal v2-configure --disable-optimization --enable-tests --write-ghc-environment-files=always -j2
38+ cabal configure --disable-optimization --enable-tests --write-ghc-environment-files=always -j2
51− cabal v2-build --only-dependencies
39+ cabal build --only-dependencies
52
40
53 - name: Build & Test
41 - name: Build & Test
54 run: |
42 run: |
55− cabal v2-build --flag dev
43+ cabal build --flag dev
56− cabal v2-test --flag dev
44+ cabal test --flag dev
.gitignore+2−1
@@ -3,4 +3,5 @@ dist-*/
3.ghc.environment.*
3.ghc.environment.*
4cabal.project.local
4cabal.project.local
5
5
6−*~
6+*~
7+tasks.json
CHANGELOG.md+5
@@ -2,6 +2,11 @@
2
2
3## Unreleased changes
3## Unreleased changes
4
4
5+## 0.1.2.0 -- 2021-05-21
6+
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
9+
5## 0.1.1.1 -- 2020-01-18
10## 0.1.1.1 -- 2020-01-18
6
11
7- Allow GHC-8.8.1
12- Allow GHC-8.8.1
LICENSE+1−1
@@ -1,4 +1,4 @@
1−Copyright (c) 2018-2020 Shinya Yamaguchi
1+Copyright (c) 2018-2021 Shinya Yamaguchi
2
2
3Permission is hereby granted, free of charge, to any person obtaining
3Permission is hereby granted, free of charge, to any person obtaining
4a copy of this software and associated documentation files (the
4a copy of this software and associated documentation files (the
haskell-stack-trace-plugin.cabal+10−12
@@ -12,15 +12,15 @@ bug-reports:
12license: MIT
12license: MIT
13license-file: LICENSE
13license-file: LICENSE
14author: Shinya Yamaguchi
14author: Shinya Yamaguchi
15−maintainer: ingronze@gmail.com
15+maintainer: a@wado.dev
16−copyright: 2018-2020 Shinya Yamaguchi
16+copyright: 2018-2021 Shinya Yamaguchi
17category: Compiler Plugin, Development, Debug
17category: Compiler Plugin, Development, Debug
18build-type: Simple
18build-type: Simple
19extra-source-files:
19extra-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.1 || ==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,22 +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
47+ -Wnoncanonical-monad-instances -Wno-missing-home-modules
48− -Wno-missing-home-modules
49
48
50− -- -Wincomplete-record-updates
51 else
49 else
52 ghc-options: -Wall
50 ghc-options: -Wall
53
51
@@ -57,11 +55,11 @@ test-suite test
57 hs-source-dirs: test
55 hs-source-dirs: test
58 type: exitcode-stdio-1.0
56 type: exitcode-stdio-1.0
59 build-depends:
57 build-depends:
60− , bytestring ^>=0.10
58+ , bytestring >=0.10 && <0.12
61− , hspec ^>=2.7
59+ , hspec ^>=2.8
62− , typed-process ^>=0.2.6
60+ , typed-process ^>=0.2
63
61
64− build-tool-depends: hspec-discover:hspec-discover ^>=2.7
62+ build-tool-depends: hspec-discover:hspec-discover ^>=2.8
65 other-modules: StackTrace.PluginSpec
63 other-modules: StackTrace.PluginSpec
66
64
67 if flag(dev)
65 if flag(dev)
src/StackTrace/Plugin.hs+14
@@ -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
@@ -90,12 +99,16 @@ updateSig _ sig = pure sig
90updateLHsSigWsType :: Traversal' (LHsSigWcType GhcPs) (LHsSigType GhcPs)
99updateLHsSigWsType :: Traversal' (LHsSigWcType GhcPs) (LHsSigType GhcPs)
91updateLHsSigWsType f lhs@HsWC {} =
100updateLHsSigWsType f lhs@HsWC {} =
92 (\x -> lhs {hswc_body = x}) <$> f (hswc_body lhs)
101 (\x -> lhs {hswc_body = x}) <$> f (hswc_body lhs)
102+#if __GLASGOW_HASKELL__ < 900
93updateLHsSigWsType _ lhs = pure lhs
103updateLHsSigWsType _ lhs = pure lhs
104+#endif
94
105
95updateLHsSigType :: Traversal' (LHsSigType GhcPs) (LHsType GhcPs)
106updateLHsSigType :: Traversal' (LHsSigType GhcPs) (LHsType GhcPs)
96updateLHsSigType f lhs@HsIB {} =
107updateLHsSigType f lhs@HsIB {} =
97 (\x -> lhs {hsib_body = x}) <$> f (hsib_body lhs)
108 (\x -> lhs {hsib_body = x}) <$> f (hsib_body lhs)
109+#if __GLASGOW_HASKELL__ < 900
98updateLHsSigType _ lhs = pure lhs
110updateLHsSigType _ lhs = pure lhs
111+#endif
99
112
100updateLHsType :: Traversal' (LHsType GhcPs) (HsType GhcPs)
113updateLHsType :: Traversal' (LHsType GhcPs) (HsType GhcPs)
101updateLHsType = traverse
114updateLHsType = traverse
@@ -117,6 +130,7 @@ updateHsType ty@HsTupleTy {} =
117updateHsType ty = pure ty
130updateHsType ty = pure ty
118
131
119#if __GLASGOW_HASKELL__ < 810
132#if __GLASGOW_HASKELL__ < 810
133+xQualTy :: NoExt
120xQualTy = noExt
134xQualTy = noExt
121#else
135#else
122xQualTy :: NoExtField
136xQualTy :: NoExtField