inspection-testing 0.2 → 0.2.0.1
raw patch · 4 files changed
+15/−6 lines, 4 filesdep ~ghcPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ghc
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Test/Inspection/Core.hs +2/−2
- Test/Inspection/Plugin.hs +6/−1
- inspection-testing.cabal +3/−3
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for inspection-testing +## 0.2.0.1 -- 2018-02-02++* Support GHC HEAD (8.5)+ ## 0.2 -- 2018-01-17 * With `$(inspectTest obligation)` you can now get the result of inspection
Test/Inspection/Core.hs view
@@ -67,8 +67,8 @@ -- | Pretty-print two slices, after removing variables occurring in both pprSliceDifference :: Slice -> Slice -> SDoc pprSliceDifference slice1 slice2 =- nest 4 (hang (text "LHS" <> colon) 4 (pprSlice slice1')) $$- nest 4 (hang (text "RHS" <> colon) 4 (pprSlice slice2'))+ nest 4 (hang (text "LHS" Outputable.<> colon) 4 (pprSlice slice1')) $$+ nest 4 (hang (text "RHS" Outputable.<> colon) 4 (pprSlice slice2')) where both = S.intersection (S.fromList (map fst slice1)) (S.fromList (map fst slice2)) slice1' = filter (\(v,_) -> v `S.notMember` both) slice1
Test/Inspection/Plugin.hs view
@@ -15,6 +15,7 @@ import qualified Language.Haskell.TH.Syntax as TH import GhcPlugins hiding (SrcLoc)+import Outputable import Test.Inspection.Internal (KeepAlive(..)) import Test.Inspection (Obligation(..), Property(..), Result(..))@@ -176,6 +177,10 @@ , Nothing <- p2 -> pure . Just $ ppr n1 <+> text " and " <+> ppr n2 <+> text "are different external names"+ | Nothing <- p1+ -> pure . Just $ ppr n1 <+> text "is an external names"+ | Nothing <- p2+ -> pure . Just $ ppr n2 <+> text "is an external names" where binds = flattenBinds (mg_binds guts) @@ -233,7 +238,7 @@ q s = fromMaybe 0 $ M.lookup s stats let summary_message = nest 2 $- vcat [ nest 2 (desc s) <> colon <+> ppr (q s)+ vcat [ nest 2 (desc s) Outputable.<> colon <+> ppr (q s) | s <- [minBound..maxBound], q s > 0 ] -- Only print a message if there are some compile-time results to report
inspection-testing.cabal view
@@ -1,5 +1,5 @@ name: inspection-testing-version: 0.2+version: 0.2.0.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.3.*+Tested-With: GHC == 8.0.2, GHC == 8.2.*, GHC == 8.4.*, GHC ==8.5.* source-repository head type: git@@ -46,7 +46,7 @@ Test.Inspection.Internal Test.Inspection.Core build-depends: base >=4.9 && <4.12- build-depends: ghc >= 8.0.2 && <8.4+ build-depends: ghc >= 8.0.2 && <8.6 build-depends: template-haskell build-depends: containers build-depends: transformers