packages feed

pinned-warnings 0.1.3.0 → 0.1.4.0

raw patch · 5 files changed

+32/−26 lines, 5 filesdep ~containersdep ~ghcPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: containers, ghc

API changes (from Hackage documentation)

- Internal.GhcFacade: HsLazy :: HsImplBang
- Internal.GhcFacade: HsSrcBang :: SourceText -> SrcUnpackedness -> SrcStrictness -> HsSrcBang
- Internal.GhcFacade: HsStrict :: Bool -> HsImplBang
- Internal.GhcFacade: HsUnpack :: Maybe Coercion -> HsImplBang
- Internal.GhcFacade: MarkedStrict :: StrictnessMark
- Internal.GhcFacade: NoSrcStrict :: SrcStrictness
- Internal.GhcFacade: NoSrcUnpack :: SrcUnpackedness
- Internal.GhcFacade: NotMarkedStrict :: StrictnessMark
- Internal.GhcFacade: SrcLazy :: SrcStrictness
- Internal.GhcFacade: SrcNoUnpack :: SrcUnpackedness
- Internal.GhcFacade: SrcStrict :: SrcStrictness
- Internal.GhcFacade: SrcUnpack :: SrcUnpackedness
- Internal.GhcFacade: data DataCon
- Internal.GhcFacade: data HsImplBang
- Internal.GhcFacade: data HsSrcBang
- Internal.GhcFacade: data SrcStrictness
- Internal.GhcFacade: data SrcUnpackedness
- Internal.GhcFacade: data StrictnessMark
- Internal.GhcFacade: dataConFieldLabels :: DataCon -> [FieldLabel]
- Internal.GhcFacade: dataConIsInfix :: DataCon -> Bool
- Internal.GhcFacade: dataConSrcBangs :: DataCon -> [HsSrcBang]
- Internal.GhcFacade: dataConTyCon :: DataCon -> TyCon
- Internal.GhcFacade: dataConWrapperType :: DataCon -> Type
- Internal.GhcFacade: isMarkedStrict :: StrictnessMark -> Bool
- Internal.GhcFacade: isVanillaDataCon :: DataCon -> Bool
- Internal.GhcFacade: pattern CDictCan' :: CtEvidence -> Class -> [Xi] -> Ct

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for pinned-warnings +## 0.1.4.0+* Support GHC 9.14+* Drop support for GHC 9.6+ ## 0.1.3.0 * Support GHC 9.12.x * Drop support for GHC 9.4
pinned-warnings.cabal view
@@ -4,7 +4,7 @@ -- http://haskell.org/cabal/users-guide/  name:                pinned-warnings-version:             0.1.3.0+version:             0.1.4.0 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 ==9.6.1 || ==9.8.1 || ==9.10.1 || ==9.12.1+tested-with: GHC ==9.8.1 || ==9.10.1 || ==9.12.1 || == 9.14.1  library   exposed-modules:     PinnedWarnings@@ -28,10 +28,10 @@                        Internal.GhcFacade                        Internal.Types -  build-depends:       ghc              >= 9.6 && < 9.13,+  build-depends:       ghc              >= 9.8 && < 9.15,                        base             >= 4.16.0 && < 5,                        bytestring       >= 0.11.3 && < 0.13,-                       containers       >= 0.6.5 && < 0.8,+                       containers       >= 0.6.5 && < 0.9,                        directory        >= 1.3.6 && < 1.4,                        time             >= 1.11.1 && < 2,                        transformers     >= 0.5.6 && < 0.7@@ -50,3 +50,10 @@                  tasty-hunit,                  bytestring   default-language: Haskell2010++-- executable play+--   main-is: Main.hs+--   hs-source-dirs: play+--   build-depends: base,+--                  pinned-warnings+--   ghc-options: -fplugin PinnedWarnings -Wall
src/Internal/GhcFacade.hs view
@@ -1,12 +1,11 @@ {-# LANGUAGE CPP #-}-{-# LANGUAGE PatternSynonyms #-} module Internal.GhcFacade   ( module X-  , pattern CDictCan'   ) where  import GHC as X hiding (FunDep) import GHC.Core.Class as X+import GHC.Core.DataCon as X import GHC.Core.Make as X import GHC.Data.Bag as X import GHC.Data.FastString as X@@ -14,6 +13,9 @@ import GHC.Driver.Plugins as X hiding (TcPlugin) import GHC.Driver.Env.Types as X import GHC.Tc.Errors.Types as X+#if MIN_VERSION_ghc(9,14,0)+  hiding (HoleError)+#endif import GHC.Tc.Plugin as X import GHC.Tc.Types as X hiding (DefaultingPlugin) import GHC.Tc.Types.Constraint as X@@ -25,15 +27,3 @@ import GHC.Utils.Logger as X import GHC.Utils.Outputable as X import GHC.Driver.Config.Diagnostic as X--pattern CDictCan'-  :: CtEvidence-  -> Class-  -> [Xi]-  -> Ct-pattern CDictCan' diEv diCls diTys-#if MIN_VERSION_ghc(9,8,0)-  <- CDictCan (DictCt diEv diCls diTys _)-#else-  <- CDictCan { cc_ev = diEv, cc_class = diCls, cc_tyargs = diTys }-#endif
src/Internal/Types.hs view
@@ -29,11 +29,7 @@               }    in foldMap (Ghc.showSDocOneLine sdocCtx)       . Ghc.unDecorated-#if MIN_VERSION_ghc(9,6,0)       . Ghc.diagnosticMessage Ghc.NoDiagnosticOpts-#else-      . Ghc.diagnosticMessage-#endif       . Ghc.errMsgDiagnostic . unWarning  instance Eq Warning where
src/PinnedWarnings.hs view
@@ -92,7 +92,7 @@     = fmap (flip Ghc.TcPluginOk [] . catMaybes)     . traverse go   where-    go ct@(Ghc.CDictCan' _ cls _)+    go ct@(Ghc.CDictCan (Ghc.DictCt _ cls _ _))       | Ghc.classTyCon cls == showWarningsClass pluginState = do           counter <- Ghc.tcPluginIO $ readIORef (counterRef pluginState) @@ -101,7 +101,10 @@           when (counter == 2) addWarningsToContext           incrementCounter -          pure $ Just (Ghc.EvExpr Ghc.unitExpr, ct)+          pure $ Just+            ( Ghc.EvExpr $ Ghc.mkCoreConApps (Ghc.classDataCon cls) [Ghc.unitExpr]+            , ct+            )        | Ghc.classTyCon cls == fixWarningsClass pluginState = do           counter <- Ghc.tcPluginIO $ readIORef (counterRef pluginState)@@ -109,7 +112,10 @@           when (counter == 0) (Ghc.tcPluginIO fixWarnings)           incrementCounter -          pure $ Just (Ghc.EvExpr Ghc.unitExpr, ct)+          pure $ Just+            ( Ghc.EvExpr $ Ghc.mkCoreConApps (Ghc.classDataCon cls) [Ghc.unitExpr]+            , ct+            )        | Ghc.classTyCon cls == clearWarningsClass pluginState = do           counter <- Ghc.tcPluginIO $ readIORef (counterRef pluginState)@@ -117,7 +123,10 @@           when (counter == 0) (Ghc.tcPluginIO clearWarnings)           incrementCounter -          pure $ Just (Ghc.EvExpr Ghc.unitExpr, ct)+          pure $ Just+            ( Ghc.EvExpr $ Ghc.mkCoreConApps (Ghc.classDataCon cls) [Ghc.unitExpr]+            , ct+            )      go _ = pure Nothing