@@ -5,7 +5,12 @@ module StackTrace.Plugin (plugin) where
55
66import Control.Arrow (first)
77import Data.Monoid (Any(Any, getAny))
8+#if __GLASGOW_HASKELL__ >= 900
9+import GHC.Plugins
10+#else
11+
812import GhcPlugins
13+#endif
914#if __GLASGOW_HASKELL__ >= 810
1015import GHC.Hs
1116#endif
@@ -48,7 +53,11 @@ ghcStackImport =
4853 (simpleImportDecl $ mkModuleName "GHC.Stack")
4954 {ideclQualified = importDeclQualified, ideclAs = Just $ noLoc ghcStackModuleName}
5055
56+#if __GLASGOW_HASKELL__ >= 900
57+updateHsModule :: HsModule -> HsModule
58+#else
5159updateHsModule :: HsModule GhcPs -> HsModule GhcPs
60+#endif
5261updateHsModule hsm =
5362 hsm {hsmodImports = hsmodImports', hsmodDecls = hsmodDecls'}
5463 where