inspection-testing 0.4.6.0 → 0.4.6.1
raw patch · 3 files changed
+16/−17 lines, 3 filesdep ~basedep ~ghcPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, ghc
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- inspection-testing.cabal +4/−4
- src/Test/Inspection/Plugin.hs +8/−13
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for inspection-testing +## 0.4.6.1 -- 2022-05-20++* Support GHC 9.4 (thanks @parsonsmatt)+ ## 0.4.6.0 -- 2020-08-23 * Support GHC 9.2 (thanks @Bodigrim)
inspection-testing.cabal view
@@ -1,5 +1,5 @@ name: inspection-testing-version: 0.4.6.0+version: 0.4.6.1 synopsis: GHC plugin to do inspection testing description: Some carefully crafted libraries make promises to their users beyond functionality and performance.@@ -34,7 +34,7 @@ build-type: Simple extra-source-files: ChangeLog.md, README.md cabal-version: >=1.10-Tested-With: GHC == 8.0.2, GHC == 8.2.*, GHC == 8.4.*, GHC ==8.6.*, GHC ==8.8.*, GHC ==8.10.*, GHC ==9.0.*, GHC ==9.2.*+Tested-With: GHC == 8.0.2, GHC == 8.2.*, GHC == 8.4.*, GHC ==8.6.*, GHC ==8.8.*, GHC ==8.10.*, GHC ==9.0.*, GHC ==9.2.*, GHC ==9.4.* source-repository head type: git@@ -45,8 +45,8 @@ Test.Inspection.Plugin Test.Inspection.Core hs-source-dirs: src- build-depends: base >=4.9 && <4.17- build-depends: ghc >= 8.0.2 && <9.3+ build-depends: base >=4.9 && <4.18+ build-depends: ghc >= 8.0.2 && <9.5 build-depends: template-haskell build-depends: containers build-depends: transformers
src/Test/Inspection/Plugin.hs view
@@ -21,6 +21,11 @@ import qualified Data.Map.Strict as M import qualified Language.Haskell.TH.Syntax as TH +#if MIN_VERSION_ghc(9,4,0)+import GHC.Types.Error+import GHC.Driver.Session+#endif+ #if MIN_VERSION_ghc(9,0,0) import GHC.Plugins hiding (SrcLoc) import GHC.Utils.Outputable as Outputable@@ -317,18 +322,9 @@ proofPass :: UponFailure -> ReportingMode -> ModGuts -> CoreM ModGuts proofPass upon_failure report guts = do- dflags <- getDynFlags- let noopt = optLevel dflags < 1- case (noopt, upon_failure) of- (True, SkipO0) -> pure guts- (_ , _ ) -> do- when noopt $ do- warnMsg-#if MIN_VERSION_GLASGOW_HASKELL(8,9,0,0)- NoReason-#endif- $ fsep $ map text- $ words "Test.Inspection: Compilation without -O detected. Expect optimizations to fail."+ case upon_failure of+ SkipO0 -> pure guts+ _ -> do let (guts', obligations) = extractObligations guts (toStore, stats) <- (concat `bimap` M.unionsWith (+)) . unzip <$> mapM (checkObligation report guts') obligations@@ -352,7 +348,6 @@ errorMsg $ text "inspection testing unsuccessful" $$ summary_message case upon_failure of KeepGoing -> return ()- KeepGoingO0 | noopt -> return () _ -> liftIO $ exitFailure -- kill the compiler. Is there a nicer way? return guts''