From 099096b40916282a4d892d1ada048b97daed08f1 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 11:04:49 -0500 Subject: [PATCH 01/20] Spacing. --- test/SplitSpec.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 0c4231bd8..e26951607 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -16,7 +16,6 @@ instance Arbitrary Row where arbitrary = oneof [ Row <$> arbitrary <*> arbitrary ] - instance Arbitrary HTML where arbitrary = oneof [ Text <$> arbitrary, From d1020f4ca355a2418a47f46a295815229d734ea9 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 11:05:41 -0500 Subject: [PATCH 02/20] Tweak some test names. --- test/SplitSpec.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index e26951607..42caefdae 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -122,11 +122,11 @@ spec = do prop "is identity on top of no rows" $ \ a -> adjoin2 [] a == [ a ] - it "appends appends HTML onto incomplete lines" $ + it "appends elements onto incomplete lines" $ adjoin2 [ rightRowText "[" ] (rightRowText "a") `shouldBe` [ rightRow [ Text "[", Text "a" ] ] - it "does not append HTML onto complete lines" $ + it "does not append elements onto complete lines" $ adjoin2 [ leftRow [ Break ] ] (leftRowText ",") `shouldBe` [ leftRowText ",", leftRow [ Break ] ] @@ -134,7 +134,7 @@ spec = do adjoin2 [ leftRowText "a" ] (leftRow [ Break ]) `shouldBe` [ leftRow [ Text "a", Break ] ] - it "does not promote HTML through empty lines onto complete lines" $ + it "does not promote elements through empty lines onto complete lines" $ adjoin2 [ rightRowText "b", leftRow [ Break ] ] (leftRowText "a") `shouldBe` [ leftRowText "a", rightRowText "b", leftRow [ Break ] ] From 013ed0e22713e721dea2365fd2c2f4a9e092cb6d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 12:10:46 -0500 Subject: [PATCH 03/20] Add a predicate for open rows. --- test/SplitSpec.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 42caefdae..acba7bff7 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -176,3 +176,4 @@ spec = do offsetInfo by (Info (Range start end) categories) = Info (Range (start + by) (end + by)) categories offsetAnnotated by1 by2 (Annotated (left, right) syntax) = Annotated (offsetInfo by1 left, offsetInfo by2 right) syntax span = Span (Just "category-leaf") + isOpen (Row a b) = (maybe False (const True) $ openLine [ a ]) && (maybe False (const True) $ openLine [ b ]) From a549354030ae719b56ed17333866be31eef965fa Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 12:11:01 -0500 Subject: [PATCH 04/20] Stub in a property test of appending onto open rows. --- test/SplitSpec.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index acba7bff7..ecb4450a0 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -122,6 +122,9 @@ spec = do prop "is identity on top of no rows" $ \ a -> adjoin2 [] a == [ a ] + prop "appends onto open lines" $ + const True <$> ((arbitrary :: Gen Row) `suchThat` isOpen) + it "appends elements onto incomplete lines" $ adjoin2 [ rightRowText "[" ] (rightRowText "a") `shouldBe` [ rightRow [ Text "[", Text "a" ] ] From e49715dd86fd5814c4c22ae180176ba89cabe398 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 12:28:57 -0500 Subject: [PATCH 05/20] Use `forAll` to stub in the test. --- test/SplitSpec.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index ecb4450a0..2549c1f4e 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -122,8 +122,8 @@ spec = do prop "is identity on top of no rows" $ \ a -> adjoin2 [] a == [ a ] - prop "appends onto open lines" $ - const True <$> ((arbitrary :: Gen Row) `suchThat` isOpen) + prop "appends onto open rows" $ forAll ((arbitrary :: Gen Row) `suchThat` isOpen) $ + \ a -> True it "appends elements onto incomplete lines" $ adjoin2 [ rightRowText "[" ] (rightRowText "a") `shouldBe` From 595293e1a5c8c2e783cd589ad6c9157debaa10ff Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:02:46 -0500 Subject: [PATCH 06/20] Actually test the property. --- test/SplitSpec.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 2549c1f4e..80d2ca2d3 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -122,8 +122,9 @@ spec = do prop "is identity on top of no rows" $ \ a -> adjoin2 [] a == [ a ] - prop "appends onto open rows" $ forAll ((arbitrary :: Gen Row) `suchThat` isOpen) $ - \ a -> True + prop "appends onto open rows" $ forAll ((arbitrary `suchThat` isOpen) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isOpen)) $ + \ (a@(Row (Line ac1 as1) (Line bc1 bs1)), b@(Row (Line ac2 as2) (Line bc2 bs2))) -> + adjoin2 [ a ] b `shouldBe` [ Row (Line (ac1 || ac2) $ as1 ++ as2) (Line (bc1 || bc2) $ bs1 ++ bs2) ] it "appends elements onto incomplete lines" $ adjoin2 [ rightRowText "[" ] (rightRowText "a") `shouldBe` From 6ffe3719d056f3920060ab3e61545189e01185c1 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:04:52 -0500 Subject: [PATCH 07/20] Reformat. --- test/SplitSpec.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 80d2ca2d3..7956f1eb5 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -122,9 +122,10 @@ spec = do prop "is identity on top of no rows" $ \ a -> adjoin2 [] a == [ a ] - prop "appends onto open rows" $ forAll ((arbitrary `suchThat` isOpen) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isOpen)) $ - \ (a@(Row (Line ac1 as1) (Line bc1 bs1)), b@(Row (Line ac2 as2) (Line bc2 bs2))) -> - adjoin2 [ a ] b `shouldBe` [ Row (Line (ac1 || ac2) $ as1 ++ as2) (Line (bc1 || bc2) $ bs1 ++ bs2) ] + prop "appends onto open rows" $ + forAll ((arbitrary `suchThat` isOpen) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isOpen)) $ + \ (a@(Row (Line ac1 as1) (Line bc1 bs1)), b@(Row (Line ac2 as2) (Line bc2 bs2))) -> + adjoin2 [ a ] b `shouldBe` [ Row (Line (ac1 || ac2) $ as1 ++ as2) (Line (bc1 || bc2) $ bs1 ++ bs2) ] it "appends elements onto incomplete lines" $ adjoin2 [ rightRowText "[" ] (rightRowText "a") `shouldBe` From 8f2473fd481cc30f139f0d3dbe7a833f5aef9d11 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:05:08 -0500 Subject: [PATCH 08/20] Remove a redundant test. --- test/SplitSpec.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 7956f1eb5..b9e1b816d 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -127,10 +127,6 @@ spec = do \ (a@(Row (Line ac1 as1) (Line bc1 bs1)), b@(Row (Line ac2 as2) (Line bc2 bs2))) -> adjoin2 [ a ] b `shouldBe` [ Row (Line (ac1 || ac2) $ as1 ++ as2) (Line (bc1 || bc2) $ bs1 ++ bs2) ] - it "appends elements onto incomplete lines" $ - adjoin2 [ rightRowText "[" ] (rightRowText "a") `shouldBe` - [ rightRow [ Text "[", Text "a" ] ] - it "does not append elements onto complete lines" $ adjoin2 [ leftRow [ Break ] ] (leftRowText ",") `shouldBe` [ leftRowText ",", leftRow [ Break ] ] From 8bb258a8e6682b14e513b8ae0f333fbeef903b19 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:17:03 -0500 Subject: [PATCH 09/20] Add a predicate for closed rows. --- test/SplitSpec.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index b9e1b816d..c4c4d8181 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -178,3 +178,4 @@ spec = do offsetAnnotated by1 by2 (Annotated (left, right) syntax) = Annotated (offsetInfo by1 left, offsetInfo by2 right) syntax span = Span (Just "category-leaf") isOpen (Row a b) = (maybe False (const True) $ openLine [ a ]) && (maybe False (const True) $ openLine [ b ]) + isClosed (Row a b) = (maybe True (const False) $ openLine [ a ]) && (maybe True (const False) $ openLine [ b ]) From c02bd6e11ae22e0524d1f3a6c2c265fb9b41e035 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:19:05 -0500 Subject: [PATCH 10/20] EmptyLines are not closed. --- test/SplitSpec.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index c4c4d8181..fb22c3e35 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -178,4 +178,5 @@ spec = do offsetAnnotated by1 by2 (Annotated (left, right) syntax) = Annotated (offsetInfo by1 left, offsetInfo by2 right) syntax span = Span (Just "category-leaf") isOpen (Row a b) = (maybe False (const True) $ openLine [ a ]) && (maybe False (const True) $ openLine [ b ]) - isClosed (Row a b) = (maybe True (const False) $ openLine [ a ]) && (maybe True (const False) $ openLine [ b ]) + isClosed (Row a@(Line _ _) b@(Line _ _)) = (maybe True (const False) $ openLine [ a ]) && (maybe True (const False) $ openLine [ b ]) + isClosed (Row _ _) = False From d699adc7148958afc2b326c2543e6df8ad3509ae Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:19:40 -0500 Subject: [PATCH 11/20] Test the property that closed rows are closed. --- test/SplitSpec.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index fb22c3e35..7787c3fde 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -127,6 +127,10 @@ spec = do \ (a@(Row (Line ac1 as1) (Line bc1 bs1)), b@(Row (Line ac2 as2) (Line bc2 bs2))) -> adjoin2 [ a ] b `shouldBe` [ Row (Line (ac1 || ac2) $ as1 ++ as2) (Line (bc1 || bc2) $ bs1 ++ bs2) ] + prop "does not append onto closed rows" $ + forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $ + \ (a, b) -> adjoin2 [ a ] b `shouldBe` [ b, a ] + it "does not append elements onto complete lines" $ adjoin2 [ leftRow [ Break ] ] (leftRowText ",") `shouldBe` [ leftRowText ",", leftRow [ Break ] ] From 0b4aeb06af4b9d2c8d691f39162c88726fb684ef Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:19:51 -0500 Subject: [PATCH 12/20] Remove the redundant test. --- test/SplitSpec.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 7787c3fde..50a46aeae 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -131,10 +131,6 @@ spec = do forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $ \ (a, b) -> adjoin2 [ a ] b `shouldBe` [ b, a ] - it "does not append elements onto complete lines" $ - adjoin2 [ leftRow [ Break ] ] (leftRowText ",") `shouldBe` - [ leftRowText ",", leftRow [ Break ] ] - it "appends breaks onto incomplete lines" $ adjoin2 [ leftRowText "a" ] (leftRow [ Break ]) `shouldBe` [ leftRow [ Text "a", Break ] ] From 7e67a6a4902516e86d5718495d46aff6a07aa2c8 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:22:30 -0500 Subject: [PATCH 13/20] Remove a redundant test. --- test/SplitSpec.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 50a46aeae..f96e732cd 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -131,10 +131,6 @@ spec = do forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $ \ (a, b) -> adjoin2 [ a ] b `shouldBe` [ b, a ] - it "appends breaks onto incomplete lines" $ - adjoin2 [ leftRowText "a" ] (leftRow [ Break ]) `shouldBe` - [ leftRow [ Text "a", Break ] ] - it "does not promote elements through empty lines onto complete lines" $ adjoin2 [ rightRowText "b", leftRow [ Break ] ] (leftRowText "a") `shouldBe` [ leftRowText "a", rightRowText "b", leftRow [ Break ] ] From 963887a1153521cb0c147baf725188d2d3b51e3f Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:27:03 -0500 Subject: [PATCH 14/20] =?UTF-8?q?Test=20the=20property=20that=20we=20don?= =?UTF-8?q?=E2=80=99t=20promote=20through=20empty=20lines=20onto=20closed?= =?UTF-8?q?=20lines.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is falsified by empty row elision. --- test/SplitSpec.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index f96e732cd..b6e07646c 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -131,6 +131,10 @@ spec = do forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $ \ (a, b) -> adjoin2 [ a ] b `shouldBe` [ b, a ] + prop "does not promote elements through empty lines onto closed lines" $ + forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $ + \ (a, b) -> adjoin2 [ Row EmptyLine EmptyLine, a ] b `shouldBe` [ b, Row EmptyLine EmptyLine, a ] + it "does not promote elements through empty lines onto complete lines" $ adjoin2 [ rightRowText "b", leftRow [ Break ] ] (leftRowText "a") `shouldBe` [ leftRowText "a", rightRowText "b", leftRow [ Break ] ] From bcc7d6d578419444d5d598bea2f790cf517b9207 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:27:11 -0500 Subject: [PATCH 15/20] =?UTF-8?q?Don=E2=80=99t=20elide=20empty=20rows.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Split.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Split.hs b/src/Split.hs index 7d6b2ab5e..f0caf0e4b 100644 --- a/src/Split.hs +++ b/src/Split.hs @@ -244,10 +244,6 @@ maybeLast list = listToMaybe $ reverse list adjoin2 :: [Row] -> Row -> [Row] adjoin2 [] row = [row] -adjoin2 rows (Row EmptyLine EmptyLine) = rows - -adjoin2 (Row EmptyLine EmptyLine : rows) row = adjoin2 rows row - adjoin2 rows (Row left' right') | Just _ <- openLine $ leftLines rows, Just _ <- openLine $ rightLines rows = zipWith Row lefts rights where lefts = adjoin2Lines (leftLines rows) left' rights = adjoin2Lines (rightLines rows) right' From e1cc29e032be3aa5015899752c342c2d7778fc2b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:27:16 -0500 Subject: [PATCH 16/20] =?UTF-8?q?Don=E2=80=99t=20expect=20empty=20rows=20t?= =?UTF-8?q?o=20be=20elided.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/SplitSpec.hs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index b6e07646c..59745f0cc 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -113,12 +113,6 @@ spec = do describe "adjoin2" $ do - prop "is idempotent for additions of empty rows" $ - \ a -> adjoin2 (adjoin2 [ a ] mempty) mempty == (adjoin2 [ a ] mempty) - - prop "is identity on top of empty rows" $ - \ a -> adjoin2 [ mempty ] a == [ a ] - prop "is identity on top of no rows" $ \ a -> adjoin2 [] a == [ a ] From de456dfe4979392e0958ab9082d98c0c5e161d80 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:40:54 -0500 Subject: [PATCH 17/20] Remove the redundant test. --- test/SplitSpec.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 59745f0cc..162d562bb 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -129,10 +129,6 @@ spec = do forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $ \ (a, b) -> adjoin2 [ Row EmptyLine EmptyLine, a ] b `shouldBe` [ b, Row EmptyLine EmptyLine, a ] - it "does not promote elements through empty lines onto complete lines" $ - adjoin2 [ rightRowText "b", leftRow [ Break ] ] (leftRowText "a") `shouldBe` - [ leftRowText "a", rightRowText "b", leftRow [ Break ] ] - it "promotes breaks through empty lines onto incomplete lines" $ adjoin2 [ rightRowText "c", rowText "a" "b" ] (leftRow [ Break ]) `shouldBe` [ rightRowText "c", Row (Line False [ Text "a", Break ]) (Line False [ Text "b" ]) ] From 60edfc661aa735404b8f81a25e733cadb3b6fab3 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:58:02 -0500 Subject: [PATCH 18/20] Test promotion through empty lines. --- test/SplitSpec.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 162d562bb..0102fbb73 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -129,6 +129,10 @@ spec = do forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $ \ (a, b) -> adjoin2 [ Row EmptyLine EmptyLine, a ] b `shouldBe` [ b, Row EmptyLine EmptyLine, a ] + prop "promotes elements through empty lines onto open lines" $ + forAll ((arbitrary `suchThat` isOpen) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isOpen)) $ + \ (a, b) -> adjoin2 [ Row EmptyLine EmptyLine, a ] b `shouldBe` Row EmptyLine EmptyLine : adjoin2 [ a ] b + it "promotes breaks through empty lines onto incomplete lines" $ adjoin2 [ rightRowText "c", rowText "a" "b" ] (leftRow [ Break ]) `shouldBe` [ rightRowText "c", Row (Line False [ Text "a", Break ]) (Line False [ Text "b" ]) ] From e8f57d6b272f92c3971ddecc91700ebe07dc98c6 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 13:58:13 -0500 Subject: [PATCH 19/20] Remove the redundant test. --- test/SplitSpec.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index 0102fbb73..fc71340a5 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -133,10 +133,6 @@ spec = do forAll ((arbitrary `suchThat` isOpen) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isOpen)) $ \ (a, b) -> adjoin2 [ Row EmptyLine EmptyLine, a ] b `shouldBe` Row EmptyLine EmptyLine : adjoin2 [ a ] b - it "promotes breaks through empty lines onto incomplete lines" $ - adjoin2 [ rightRowText "c", rowText "a" "b" ] (leftRow [ Break ]) `shouldBe` - [ rightRowText "c", Row (Line False [ Text "a", Break ]) (Line False [ Text "b" ]) ] - describe "termToLines" $ do it "splits multi-line terms into multiple lines" $ termToLines (Info (Range 0 5) (Set.singleton "leaf") :< (Leaf "")) "/*\n*/" From 7ed7c71a63793a74657ecdc9fe185bf56b4d37cf Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 14:18:21 -0500 Subject: [PATCH 20/20] :fire: the unused `adjoinLines` function. --- src/Split.hs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Split.hs b/src/Split.hs index f0caf0e4b..a39afc2ab 100644 --- a/src/Split.hs +++ b/src/Split.hs @@ -292,11 +292,6 @@ adjoin2Lines (EmptyLine : xs) line | Just _ <- openLine xs = EmptyLine : adjoin2 adjoin2Lines (prev:rest) line | Just _ <- openLine [ prev ] = (prev <> line) : rest adjoin2Lines lines line = line : lines -adjoinLines :: [Line] -> [Line] -> [Line] -adjoinLines [] lines = lines -adjoinLines lines [] = lines -adjoinLines accum (line : lines) = init accum ++ [ last accum <> line ] ++ lines - zipWithMaybe :: (Maybe a -> Maybe b -> c) -> [a] -> [b] -> [c] zipWithMaybe f la lb = take len $ zipWith f la' lb' where