From 15fdc198bb99550704e8500c95a70c15629bb3c9 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 17 Oct 2019 22:53:35 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20convert=20to=20These.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/Diffing/Algorithm/SES/Spec.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Diffing/Algorithm/SES/Spec.hs b/test/Diffing/Algorithm/SES/Spec.hs index 1e573fcc4..aadc139f3 100644 --- a/test/Diffing/Algorithm/SES/Spec.hs +++ b/test/Diffing/Algorithm/SES/Spec.hs @@ -1,6 +1,6 @@ module Diffing.Algorithm.SES.Spec (spec) where -import Data.These +import Data.Edit import Diffing.Algorithm.SES import Test.Hspec import Test.Hspec.LeanCheck @@ -21,4 +21,4 @@ spec = do \ as bs -> length (ses (==) ((,) 0 <$> as :: [(Int, Char)]) ((,) 1 <$> bs :: [(Int, Char)])) `shouldBe` length as + length bs prop "is lossless w.r.t. both input elements & ordering" $ - \ as bs -> foldr (\ each (as, bs) -> these (flip (,) bs. (:as)) ((,) as . (:bs)) (\ a b -> (a:as, b:bs)) (toThese each)) ([], []) (ses (==) as bs :: [Edit Char Char]) `shouldBe` (as, bs) + \ as bs -> foldr (\ each (as, bs) -> edit (flip (,) bs. (:as)) ((,) as . (:bs)) (\ a b -> (a:as, b:bs)) each) ([], []) (ses (==) as bs :: [Edit Char Char]) `shouldBe` (as, bs)