From 29ef2b04c50761b344638c192c76b44592696bd1 Mon Sep 17 00:00:00 2001 From: Ryan Scott <rscott@galois.com> Date: Fri, 9 Jul 2021 08:58:38 -0400 Subject: [PATCH] Update inspection-testing patch to accommodate DiagOpts --- patches/inspection-testing-0.4.5.0.patch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/patches/inspection-testing-0.4.5.0.patch b/patches/inspection-testing-0.4.5.0.patch index 00c4b38c..cb78ad52 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) -- GitLab