git.iko.soy/typeable/haskell-stack-trace-plugin
on bd27c03 help sign in
haskell-stack-trace-plugin.cabal+2−2
since splitsnapshots
unifiedsplit
@@ -32,13 +32,13 @@ flag dev
32 default: False
32 default: False
33
33
34common common-opts
34common common-opts
35− build-depends: base >=4.12 && <4.18
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 || ^>=9.0 || ^>=9.2 || ^>=9.4
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)
src/StackTrace/Plugin.hs+3−9
@@ -5,7 +5,6 @@ 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−import GHC.Types.SrcLoc
9#if __GLASGOW_HASKELL__ >= 900
8#if __GLASGOW_HASKELL__ >= 900
10import GHC.Plugins
9import GHC.Plugins
11#else
10#else
@@ -50,14 +49,9 @@ importDeclQualified = QualifiedPre
50
49
51ghcStackImport :: Located (ImportDecl (GhcPass p))
50ghcStackImport :: Located (ImportDecl (GhcPass p))
52ghcStackImport =
51ghcStackImport =
53− L srcSpan $
52+ noLoc $
54 (simpleImportDecl $ mkModuleName "GHC.Stack")
53 (simpleImportDecl $ mkModuleName "GHC.Stack")
55− { ideclQualified = importDeclQualified, ideclAs = Just $ noLoc ghcStackModuleName }
54+ {ideclQualified = importDeclQualified, ideclAs = Just $ noLoc ghcStackModuleName}
56− where
57− -- This is for GHC-9 related problems. @noLoc@ causes GHC to throw warnings
58− -- about unused imports. Even if the import is used
59− -- See: https://github.com/waddlaw/haskell-stack-trace-plugin/issues/16
60− srcSpan = RealSrcSpan (realSrcLocSpan $ mkRealSrcLoc "haskell-stack-trace-plugin:very-unique-file-name-to-avoid-collision" 1 1) Nothing
61
55
62#if __GLASGOW_HASKELL__ >= 900
56#if __GLASGOW_HASKELL__ >= 900
63updateHsModule :: HsModule -> HsModule
57updateHsModule :: HsModule -> HsModule
@@ -65,7 +59,7 @@ updateHsModule :: HsModule -> HsModule
65updateHsModule :: HsModule GhcPs -> HsModule GhcPs
59updateHsModule :: HsModule GhcPs -> HsModule GhcPs
66#endif
60#endif
67updateHsModule hsm =
61updateHsModule hsm =
68− hsm {hsmodImports = hsmodImports', hsmodDecls = hsmodDecls'}
62+ hsm {hsmodDecls = hsmodDecls'}
69 where
63 where
70 -- Traverse the haskell AST; if we have to add some HasStack
64 -- Traverse the haskell AST; if we have to add some HasStack
71 -- constraint we set a flag in a (Any,) functor.
65 -- constraint we set a flag in a (Any,) functor.