@@ -5,7 +5,6 @@ module StackTrace.Plugin (plugin) where
55
66import Control.Arrow (first)
77import Data.Monoid (Any(Any, getAny))
8−import GHC.Types.SrcLoc
98#if __GLASGOW_HASKELL__ >= 900
109import GHC.Plugins
1110#else
@@ -50,14 +49,9 @@ importDeclQualified = QualifiedPre
5049
5150ghcStackImport :: Located (ImportDecl (GhcPass p))
5251ghcStackImport =
53− L srcSpan $
52+ noLoc $
5453 (simpleImportDecl $ mkModuleName "GHC.Stack")
55− { 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
54+ {ideclQualified = importDeclQualified, ideclAs = Just $ noLoc ghcStackModuleName}
6155
6256#if __GLASGOW_HASKELL__ >= 900
6357updateHsModule :: HsModule -> HsModule