pinned-warnings 0.1.0.13 → 0.1.0.14
raw patch · 5 files changed
+45/−7 lines, 5 filesdep ~ghcdep ~transformersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ghc, transformers
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- pinned-warnings.cabal +4/−4
- src/Internal/GhcFacade.hs +22/−1
- src/Internal/Types.hs +6/−1
- src/PinnedWarnings.hs +9/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for pinned-warnings +## 0.1.0.14++* Support GHC 9.6.x+ ## 0.1.0.13 * Support GHC 9.4.x
pinned-warnings.cabal view
@@ -4,7 +4,7 @@ -- http://haskell.org/cabal/users-guide/ name: pinned-warnings-version: 0.1.0.13+version: 0.1.0.14 synopsis: Preserve warnings in a GHCi session description: Please see the README on GitHub at <https://github.com/aaronallen8455/pinned-warnings#readme> homepage: https://github.com/aaronallen8455/pinned-warnings#readme@@ -19,7 +19,7 @@ extra-source-files: README.md CHANGELOG.md-tested-with: GHC ==8.10.4 || ==8.10.5 || ==8.10.6 || ==8.10.7 || ==9.0.1 || ==9.2.2 || ==9.4.2+tested-with: GHC ==8.10.4 || ==8.10.5 || ==8.10.6 || ==8.10.7 || ==9.0.1 || ==9.2.2 || ==9.4.2 || ==9.6.1 library exposed-modules: PinnedWarnings@@ -28,13 +28,13 @@ Internal.GhcFacade Internal.Types - build-depends: ghc >= 8.10 && < 9.5,+ build-depends: ghc >= 8.10 && < 9.7, base >= 4.14.1 && < 5, bytestring >= 0.10.12, containers >= 0.6.2, directory >= 1.3.6, time >= 1.9.3,- transformers >= 0.5.6 && < 0.6+ transformers >= 0.5.6 && < 0.7 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall
src/Internal/GhcFacade.hs view
@@ -10,7 +10,28 @@ , TcPluginResult' ) where -#if MIN_VERSION_ghc(9,4,0)+#if MIN_VERSION_ghc(9,6,0)+import GHC as X hiding (FunDep)+import GHC.Core.Class as X+import GHC.Core.Make as X+import GHC.Data.Bag as X+import GHC.Data.FastString as X+import GHC.Data.IOEnv as X+import GHC.Driver.Plugins as X hiding (TcPlugin)+import GHC.Driver.Env.Types as X+import GHC.Tc.Errors.Types as X+import GHC.Tc.Plugin as X+import GHC.Tc.Types as X hiding (DefaultingPlugin)+import GHC.Tc.Types.Constraint as X+import GHC.Tc.Types.Evidence as X+import GHC.Types.Error as X+import GHC.Types.Name.Occurrence as X+import GHC.Types.SrcLoc as X+import GHC.Utils.Error as X+import GHC.Utils.Logger as X+import GHC.Utils.Outputable as X++#elif MIN_VERSION_ghc(9,4,0) import GHC as X hiding (FunDep) import GHC.Core.Class as X import GHC.Core.Make as X
src/Internal/Types.hs view
@@ -37,7 +37,12 @@ , Ghc.sdocCanUseUnicode = True } in foldMap (Ghc.showSDocOneLine sdocCtx)- . Ghc.unDecorated . Ghc.diagnosticMessage+ . Ghc.unDecorated+#if MIN_VERSION_ghc(9,6,0)+ . Ghc.diagnosticMessage Ghc.NoDiagnosticOpts+#else+ . Ghc.diagnosticMessage+#endif . Ghc.errMsgDiagnostic . unWarning #elif MIN_VERSION_ghc(9,2,0) let sdocCtx = Ghc.defaultSDocContext
src/PinnedWarnings.hs view
@@ -143,8 +143,12 @@ <$> Ghc.tcPluginIO (readMVar globalState) Ghc.tcPluginIO . atomicModifyIORef' errsRef-#if MIN_VERSION_ghc(9,4,0)+#if MIN_VERSION_ghc(9,6,0) $ \messages ->+ (Ghc.mkMessages ((fmap . fmap) Ghc.mkTcRnUnknownMessage pinnedWarns)+ `Ghc.unionMessages` messages, ())+#elif MIN_VERSION_ghc(9,4,0)+ $ \messages -> (Ghc.mkMessages ((fmap . fmap) Ghc.TcRnUnknownMessage pinnedWarns) `Ghc.unionMessages` messages, ()) #elif MIN_VERSION_ghc(9,2,0)@@ -198,7 +202,11 @@ warningsHook :: Ghc.LogAction -> Ghc.LogAction warningsHook logAction dynFlags messageClass srcSpan sdoc = do case messageClass of+#if MIN_VERSION_ghc(9,6,0)+ Ghc.MCDiagnostic Ghc.SevWarning _ _+#else Ghc.MCDiagnostic Ghc.SevWarning _+#endif | Ghc.RealSrcLoc' start <- Ghc.srcSpanStart srcSpan , Ghc.RealSrcLoc' end <- Ghc.srcSpanEnd srcSpan , Just modFile <- Ghc.srcSpanFileName_maybe srcSpan