From 559e2e0c59e1b53d9ffd34897b00d89f4f417b5a Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 21 Oct 2019 11:42:55 -0400 Subject: [PATCH 1/2] Fix a missed rename. --- test/Data/Functor/Listable.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Data/Functor/Listable.hs b/test/Data/Functor/Listable.hs index 16dabf916..ebc943c26 100644 --- a/test/Data/Functor/Listable.hs +++ b/test/Data/Functor/Listable.hs @@ -157,7 +157,7 @@ instance (Listable1 syntax, Listable ann1, Listable ann2) => Listable (Diff synt instance Listable2 Edit where - liftTiers2 t1 t2 = liftCons1 t2 Insert \/ liftCons1 t1 Delete \/ liftCons2 t1 t2 Replace + liftTiers2 t1 t2 = liftCons1 t2 Insert \/ liftCons1 t1 Delete \/ liftCons2 t1 t2 Compare instance (Listable a, Listable b) => Listable (Edit a b) where tiers = tiers2 From 5da3a1183b8c014186b73f769ee644b2ecfc2475 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 21 Oct 2019 12:03:07 -0400 Subject: [PATCH 2/2] Correct stale references to patch. --- test/Rendering/TOC/Spec.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Rendering/TOC/Spec.hs b/test/Rendering/TOC/Spec.hs index dc65a1ec7..7e091df89 100644 --- a/test/Rendering/TOC/Spec.hs +++ b/test/Rendering/TOC/Spec.hs @@ -36,9 +36,9 @@ spec = do \ term -> tableOfContentsBy (Just . termFAnnotation) (diffTerms term (term :: Term ListableSyntax ())) `shouldBe` [] prop "produces inserted/deleted/replaced entries for relevant nodes within patches" $ - \ p -> tableOfContentsBy (Just . termFAnnotation) (patch deleting inserting comparing p) + \ p -> tableOfContentsBy (Just . termFAnnotation) (edit deleting inserting comparing p) `shouldBe` - patch (fmap (Deleted,)) (fmap (Inserted,)) (\ as bs -> (Replaced, head bs) : fmap (Deleted,) (tail as) <> fmap (Inserted,) (tail bs)) (bimap (foldMap pure) (foldMap pure) (p :: Edit (Term ListableSyntax Int) (Term ListableSyntax Int))) + edit (fmap (Deleted,)) (fmap (Inserted,)) (\ as bs -> (Replaced, head bs) : fmap (Deleted,) (tail as) <> fmap (Inserted,) (tail bs)) (bimap (foldMap pure) (foldMap pure) (p :: Edit (Term ListableSyntax Int) (Term ListableSyntax Int))) prop "produces changed entries for relevant nodes containing irrelevant patches" $ \ diff -> do