diff --git a/patches/inspection-testing-0.4.5.0.patch b/patches/inspection-testing-0.4.5.0.patch index 00c4b38c9021e21656fdf75041ad828624e00cec..cb78ad525ee76326b39bde21d2e23751d77626d1 100644 --- a/patches/inspection-testing-0.4.5.0.patch +++ b/patches/inspection-testing-0.4.5.0.patch @@ -118,7 +118,7 @@ index e745975..244362d 100644 doesNotContainTypeClasses :: Slice -> [Name] -> Maybe (Var, CoreExpr, [TyCon]) doesNotContainTypeClasses slice tcNs diff --git a/src/Test/Inspection/Plugin.hs b/src/Test/Inspection/Plugin.hs -index ee16f46..60e7158 100644 +index ee16f46..b2ce66b 100644 --- a/src/Test/Inspection/Plugin.hs +++ b/src/Test/Inspection/Plugin.hs @@ -17,7 +17,7 @@ import System.Exit @@ -130,7 +130,7 @@ index ee16f46..60e7158 100644 import qualified Data.Map.Strict as M import qualified Language.Haskell.TH.Syntax as TH -@@ -29,6 +29,14 @@ import GhcPlugins hiding (SrcLoc) +@@ -29,6 +29,15 @@ import GhcPlugins hiding (SrcLoc) import Outputable #endif @@ -139,18 +139,20 @@ index ee16f46..60e7158 100644 +#endif + +#if MIN_VERSION_ghc(9,3,0) ++import GHC.Driver.Config.Diagnostic +import GHC.Utils.Error (mkMCDiagnostic) +#endif + import Test.Inspection (Obligation(..), Property(..), Result(..)) import Test.Inspection.Core -@@ -319,9 +327,13 @@ proofPass upon_failure report guts = do +@@ -319,9 +328,14 @@ proofPass upon_failure report guts = do (True, SkipO0) -> pure guts (_ , _ ) -> do when noopt $ do +#if MIN_VERSION_GLASGOW_HASKELL(9,3,0,0) -+ msg (mkMCDiagnostic dflags WarningWithoutFlag) ++ let diag_opts = initDiagOpts dflags ++ msg (mkMCDiagnostic diag_opts WarningWithoutFlag) +#else warnMsg #if MIN_VERSION_GLASGOW_HASKELL(8,9,0,0)