Hi Joachim, >I just noticed that yi is incompatible with QuickCheck-2.7 (without >specifying that in the version we have, unfortunately): >https://buildd.debian.org/status/fetch.php?pkg=yi&arch=amd64&ver=0.7.1-1%2Bb3&stamp=1406815493 >Since you seem to be interested in yi: Could you try to come up a patch >that makes yi-0.7.1 build with QuickCheck-2.7? > >yi-0.8.1 would be compatible... but it doesn’t build. Of course! I have made a minimal patch (Yi.Syntax.Tree-quickcheck-2.7-patch.diff) which fixes the build in clean unstable. I made a quick test of the binary and tried fumbling with pbuilder, which gave neither error nor binary. I think the patch is sufficient, but to make a bit cleaner, the second patch introduces a conservative upper bound in the dependencies of yi to quickcheck, to find this sort of thing before attempting the longish build. Would you kindly commit the patches to make yi-0.7.1 build-/installable on unstable again? Be welcome, Marcel -- Marcel Fourné "Artistic" need not be limited to the fine arts, but "simple" can be harder to achieve in computer science. "Quality" even more so, so don't get me started on "secure".
--- yi-0.7.1-orig/src/library/Yi/Syntax/Tree.hs 2014-08-04 08:36:28.000000000 +0200
+++ yi-0.7.1/src/library/Yi/Syntax/Tree.hs 2014-08-04 08:37:40.618395219 +0200
@@ -25,6 +25,7 @@
import Data.Monoid (First(..), Last(..), getFirst, getLast, mempty)
#ifdef TESTING
import Test.QuickCheck
+import Test.QuickCheck.Property (unProperty)
#endif
import Yi.Buffer.Basic
@@ -339,33 +340,35 @@
let final@(_, (_, finalSubtree)) = fromLeafAfterToFinal p n
finalRegion = subtreeRegion finalSubtree
initialRegion = nodeRegion n
-
+
whenFail (do putStrLn $ "final = " ++ show final
putStrLn $ "final reg = " ++ show finalRegion
putStrLn $ "initialReg = " ++ show initialRegion
putStrLn $ "p = " ++ show p
- )
+ )
((regionStart finalRegion <= p) && (initialRegion `includedRegion` finalRegion))
prop_allLeavesAfter :: NTTT -> Property
-prop_allLeavesAfter (N n@(xs,t)) = do
+prop_allLeavesAfter (N n@(xs,t)) = property $ do
let after = allLeavesRelative afterChild n
(xs',t') <- elements after
let t'' = walkDown (xs',t)
- whenFail (do putStrLn $ "t' = " ++ show t'
- putStrLn $ "t'' = " ++ show t''
- putStrLn $ "xs' = " ++ show xs'
- ) (Just t' == t'' && xs <= xs')
+ unProperty $ whenFail (do
+ putStrLn $ "t' = " ++ show t'
+ putStrLn $ "t'' = " ++ show t''
+ putStrLn $ "xs' = " ++ show xs'
+ ) (Just t' == t'' && xs <= xs')
prop_allLeavesBefore :: NTTT -> Property
-prop_allLeavesBefore (N n@(xs,t)) = do
+prop_allLeavesBefore (N n@(xs,t)) = property $ do
let after = allLeavesRelative beforeChild n
(xs',t') <- elements after
let t'' = walkDown (xs',t)
- whenFail (do putStrLn $ "t' = " ++ show t'
- putStrLn $ "t'' = " ++ show t''
- putStrLn $ "xs' = " ++ show xs'
- ) (Just t' == t'' && xs' <= xs)
+ unProperty $ whenFail (do
+ putStrLn $ "t' = " ++ show t'
+ putStrLn $ "t'' = " ++ show t''
+ putStrLn $ "xs' = " ++ show xs'
+ ) (Just t' == t'' && xs' <= xs)
prop_fromNodeToLeafAfter :: NTTT -> Property
prop_fromNodeToLeafAfter (N n) = forAll (pointInside (subtreeRegion $ snd n)) $ \p -> do
--- yi-0.7.1-orig/debian/control 2014-04-14 23:44:16.000000000 +0200
+++ yi-0.7.1/debian/control 2014-08-04 08:49:42.109183846 +0200
@@ -12,6 +12,7 @@
, libghc-diff-dev (<< 0.4)
, libghc-diff-prof
, libghc-quickcheck2-dev (>= 2.1.0.2)
+ , libghc-quickcheck2-dev (<< 2.8)
, libghc-quickcheck2-prof
, libghc-cautious-file-dev (>= 1.0.1)
, libghc-cautious-file-prof
Attachment:
signature.asc
Description: PGP signature