packages feed

inspection-testing 0.5.0.3 → 0.6

raw patch · 4 files changed

+41/−4 lines, 4 filesdep ~base

Dependency ranges changed: base

Files

ChangeLog.md view
@@ -1,5 +1,11 @@ # Revision history for inspection-testing +## 0.6 -- 2025-01-01++* Support GHC 9.10.1 (thanks Andre Van Der Merwe)+* Support GHC 9.12 (thanks Erik de Castro Lopo)+* Ignore SourceNote tick (thanks Potato Hatsue)+ ## 0.5.0.3 -- 2023-12-29  * Support GHC 9.10 (thanks Bodigrim)
+ examples/DWARF.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE TemplateHaskell #-}+{-# OPTIONS_GHC -g #-}+module DWARF (main) where++import Test.Inspection+import Data.Maybe++lhs :: (a -> b) -> Maybe a -> Bool+lhs f x = isNothing (fmap f x)++rhs :: (a -> b) -> Maybe a -> Bool+rhs f Nothing = True+rhs f (Just _) = False++inspect $ 'lhs === 'rhs++main :: IO ()+main = return ()
inspection-testing.cabal view
@@ -1,5 +1,5 @@ name:                inspection-testing-version:             0.5.0.3+version:             0.6 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.*, GHC ==9.4.*, GHC ==9.6.*, GHC ==9.8.*+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.*, GHC ==9.6.*, GHC ==9.8.*, GHC ==9.10.*  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.21-  build-depends:       ghc >= 8.0.2 && <9.11+  build-depends:       base >=4.9 && <4.22+  build-depends:       ghc >= 8.0.2 && <9.13   build-depends:       template-haskell   build-depends:       containers   build-depends:       transformers@@ -232,3 +232,13 @@   if impl(ghc < 8.4)       ghc-options:       -fplugin=Test.Inspection.Plugin +test-suite dwarf+  type:                exitcode-stdio-1.0+  hs-source-dirs:      examples+  main-is:             DWARF.hs+  build-depends:       inspection-testing+  build-depends:       base+  default-language:    Haskell2010+  ghc-options:         -main-is DWARF+  if impl(ghc < 8.4)+      ghc-options:       -fplugin=Test.Inspection.Plugin
src/Test/Inspection/Core.hs view
@@ -272,6 +272,7 @@ #endif     essentiallyVar (Var v)                      = Just v     essentiallyVar (Tick HpcTick{} e) | it      = essentiallyVar e+    essentiallyVar (Tick SourceNote{} e)        = essentiallyVar e     essentiallyVar _                            = Nothing      go :: Int -> RnEnv2 -> CoreExpr -> CoreExpr -> StateT VarPairSet [] ()@@ -310,6 +311,8 @@                                                    go lv env a1 a2     go lv env (Tick HpcTick{} e1) e2 | it     = go lv env e1 e2     go lv env e1 (Tick HpcTick{} e2) | it     = go lv env e1 e2+    go lv env (Tick SourceNote{} e1) e2       = go lv env e1 e2+    go lv env e1 (Tick SourceNote{} e2)       = go lv env e1 e2     go lv env (Tick n1 e1)  (Tick n2 e2)      = traceBlock lv "TICK" "" $ \lv -> do                                                    guard (go_tick env n1 n2)                                                    go lv env e1 e2