From 7bbbc4cbea8685219de80a2c760acf01ecf2dd79 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 12 Aug 2016 09:53:16 -0400 Subject: [PATCH] Use the `replacing` combinator in the tests. --- test/Data/RandomWalkSimilarity/Spec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Data/RandomWalkSimilarity/Spec.hs b/test/Data/RandomWalkSimilarity/Spec.hs index 6f99294ed..a122569f4 100644 --- a/test/Data/RandomWalkSimilarity/Spec.hs +++ b/test/Data/RandomWalkSimilarity/Spec.hs @@ -29,7 +29,7 @@ spec = parallel $ do \ (term, p, q, d) -> featureVectorDecorator (rhead . headF) (positively p) (positively q) (positively d) (toTerm term :: Term Text (Record '[Text])) `shouldSatisfy` all ((== (positively d)) . length . rhead) describe "rws" $ do - let compare a b = if ((==) `on` category . extract) a b then Just (pure (Replace a b)) else Nothing + let compare a b = if ((==) `on` category . extract) a b then Just (replacing a b) else Nothing let toTerm' = featureVectorDecorator (category . headF) 2 2 15 . toTerm prop "produces correct diffs" . forAll (scale (`div` 4) arbitrary) $ \ (as, bs) -> let tas = toTerm' <$> (as :: [ArbitraryTerm Text (Record '[Category])])