From b47bc5bc161ad75ce6b826c6dbaf1fa7a75dce02 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 7 Mar 2016 16:33:30 -0500 Subject: [PATCH] =?UTF-8?q?Apply=20some=20of=20hlint=E2=80=99s=20advice.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/AlignmentSpec.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/AlignmentSpec.hs b/test/AlignmentSpec.hs index 25b172e7b..ab471f8c2 100644 --- a/test/AlignmentSpec.hs +++ b/test/AlignmentSpec.hs @@ -100,7 +100,7 @@ spec = parallel $ do describe "splitPatchByLines" $ do prop "starts at initial indices" $ \ patch sources -> let indices = length <$> sources in - fmap start . maybeFirst . Maybe.catMaybes <$> Both.unzip (fmap maybeFirst . unRow . fmap Prelude.snd <$> (splitPatchByLines ((Source.++) <$> sources <*> sources) (patchWithBoth patch (leafWithRangeInSource <$> sources <*> (Range <$> indices <*> ((2 *) <$> indices)))))) `shouldBe` (<$) <$> indices <*> unPatch patch + fmap start . maybeFirst . Maybe.catMaybes <$> Both.unzip (fmap maybeFirst . unRow . fmap Prelude.snd <$> splitPatchByLines ((Source.++) <$> sources <*> sources) (patchWithBoth patch (leafWithRangeInSource <$> sources <*> (Range <$> indices <*> ((2 *) <$> indices))))) `shouldBe` (<$) <$> indices <*> unPatch patch describe "openLineBy" $ do it "produces the earliest non-empty line in a list, if open" $ @@ -123,11 +123,11 @@ spec = parallel $ do getTotalRange (Source vector) = Range 0 $ length vector - combineIntoLeaves (leaves, start) char = (leaves ++ [ Free $ Annotated (Info <$> (pure (Range start $ start + 1)) <*> mempty) (Leaf [ char ]) ], start + 1) + combineIntoLeaves (leaves, start) char = (leaves ++ [ Free $ Annotated (Info <$> pure (Range start $ start + 1) <*> mempty) (Leaf [ char ]) ], start + 1) leafWithRangesInSources sources ranges = Free $ Annotated (Info <$> ranges <*> pure mempty) (Leaf $ runBothWith (++) (toList <$> sources)) - leafWithRangeInSource source range = (Info range mempty :< Leaf source) + leafWithRangeInSource source range = Info range mempty :< Leaf source patchWithBoth (Insert ()) = Insert . snd patchWithBoth (Delete ()) = Delete . fst