packages feed

rematch 0.1.2.0 → 0.1.2.1

raw patch · 2 files changed

+25/−2 lines, 2 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Control.Rematch.QuickCheck: expectP :: a -> Matcher a -> Property
+ Control.Rematch.QuickCheck: instance Testable Match
+ Control.Rematch.QuickCheck: liftMatchResult :: Match -> Result

Files

+ Control/Rematch/QuickCheck.hs view
@@ -0,0 +1,23 @@+module Control.Rematch.QuickCheck where+import Test.QuickCheck.Property+import Control.Rematch+import Control.Rematch.Run++-- |Run a matcher as an QuickCheck assertion+--+-- Example output:+--+-- @+--Expected: equalTo "a"+--     but: was "b"+-- @+expectP :: a -> Matcher a -> Property+expectP a matcher = property $ (runMatch matcher a)++instance Testable Match where+  property = property . liftMatchResult+  exhaustive = const True++liftMatchResult :: Match -> Result+liftMatchResult MatchSuccess = succeeded+liftMatchResult (MatchFailure mismatch) = failed { reason = mismatch }
rematch.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                rematch-version:             0.1.2.0+version:             0.1.2.1 synopsis:            A simple api for matchers description:     Rematch is a simple library of matchers, which express rules@@ -26,5 +26,5 @@ cabal-version:       >=1.8  library-  exposed-modules:     Control.Rematch, Control.Rematch.Formatting, Control.Rematch.Run+  exposed-modules:     Control.Rematch, Control.Rematch.Formatting, Control.Rematch.Run, Control.Rematch.QuickCheck   build-depends:       base >= 4.5.0 && < 5, HUnit >= 1.0, QuickCheck >= 2.0