incremental-parser 0.2.3.2 → 0.2.3.3
raw patch · 2 files changed
+5/−6 lines, 2 filesdep ~checkersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: checkers
API changes (from Hackage documentation)
- Control.Applicative.Monoid: class Applicative f => MonoidApplicative f where >< = liftA2 mappend
+ Control.Applicative.Monoid: class Applicative f => MonoidApplicative f where (><) = liftA2 mappend
Files
Test/TestIncrementalParser.hs view
@@ -204,7 +204,9 @@ instance (Eq x, Monoid x, Ord x, Show x) => EqProp (Parser a [Bool] x) where p1 =-= p2 = sameResults (feedEof p1) (feedEof p2)- .&&. halveSize (\s-> sized $ \n-> whenFail (print (n, s, p1, p2)) (feed s p1 =-= feed s p2)) arbitrary+ .&&. forAll (sized $ \n-> resize (min n 20) arbitrary) + (\s-> whenFail (print (s, p1, p2, feed s p1, feed s p2)) + (if length s < 2 then property True else feed s p1 =-= feed s p2)) sameResults p1 p2 = whenFail (print (canonicalResults p1) >> putStrLn " !=" >> print (canonicalResults p2) >> putStrLn " =>" >> print p1 >> putStrLn " !=" >> print p2)@@ -286,6 +288,3 @@ reduceSize :: String -> (a -> b) -> Gen (Described a) -> Gen (Described b) reduceSize prefix f a = sized $ \n-> liftM (\(Described s x)-> Described ('(' : prefix ++ s ++ ")") (f x)) (resize (if n > 0 then pred n else n) a)--halveSize :: (a -> Property) -> Gen a -> Property-halveSize f a = sized $ \n-> if n < 2 then property True else resize (n `div` 2) (a >>= f)
incremental-parser.cabal view
@@ -1,5 +1,5 @@ Name: incremental-parser-Version: 0.2.3.2+Version: 0.2.3.3 Cabal-Version: >= 1.10 Build-Type: Simple Synopsis: Generic parser library capable of providing partial results from partial input.@@ -34,7 +34,7 @@ Type: exitcode-stdio-1.0 x-uses-tf: true Build-Depends: base < 5, monoid-subclasses < 0.4,- QuickCheck >= 2 && < 3, checkers >= 0.2 && < 0.4,+ QuickCheck >= 2 && < 3, checkers >= 0.2 && < 0.5, test-framework >= 0.4.1, test-framework-quickcheck2 Main-is: Test/TestIncrementalParser.hs Other-Modules: Text.ParserCombinators.Incremental,