From 4504fe007d59470755b97c17bb6c7e33ca1fd70f Mon Sep 17 00:00:00 2001 From: Jaro Date: Fri, 7 Apr 2023 10:44:33 +0200 Subject: [PATCH] Fix style: long lines. --- src/Data/Text/ParagraphLayout/Internal/Run.hs | 3 ++- test/Data/Text/ParagraphLayout/Internal/ZipperSpec.hs | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Data/Text/ParagraphLayout/Internal/Run.hs b/src/Data/Text/ParagraphLayout/Internal/Run.hs index 72ac0b6..95a8f77 100644 --- a/src/Data/Text/ParagraphLayout/Internal/Run.hs +++ b/src/Data/Text/ParagraphLayout/Internal/Run.hs @@ -115,7 +115,8 @@ foldRun x (previousRun@(_, d1, s1) : tailRuns) = s2 = charScript (nextChar x) -- | Simplified detection of text direction for unidirectional text. -mergeDirections :: Maybe Direction -> Maybe Direction -> Merged (Maybe Direction) +mergeDirections :: Maybe Direction -> Maybe Direction -> + Merged (Maybe Direction) mergeDirections Nothing Nothing = Merged Nothing mergeDirections (Just d1) Nothing = Merged (Just d1) mergeDirections Nothing (Just d2) = Merged (Just d2) diff --git a/test/Data/Text/ParagraphLayout/Internal/ZipperSpec.hs b/test/Data/Text/ParagraphLayout/Internal/ZipperSpec.hs index d66ecd1..6355cda 100644 --- a/test/Data/Text/ParagraphLayout/Internal/ZipperSpec.hs +++ b/test/Data/Text/ParagraphLayout/Internal/ZipperSpec.hs @@ -106,14 +106,15 @@ spec = do preMidPositions `forM_` \ n -> describe ("split at " ++ (show n) ++ " and step") $ do let z = Zipper.step $ Zipper.splitAt n sampleText + let n' = n + 1 it "is not at start" $ Zipper.atStart z `shouldBe` False it "is not at end" $ Zipper.atEnd z `shouldBe` False - it ("preceding text has length " ++ show (n + 1)) $ - Text.length (Zipper.preceding z) `shouldBe` (n + 1) - it ("following text has length " ++ show (sampleLength - n - 1)) $ - Text.length (Zipper.following z) `shouldBe` (sampleLength - n - 1) + it ("preceding text has length " ++ show n') $ + Text.length (Zipper.preceding z) `shouldBe` n' + it ("following text has length " ++ show (sampleLength - n')) $ + Text.length (Zipper.following z) `shouldBe` (sampleLength - n') it "recombines into original text" $ Zipper.recombine z `shouldBe` sampleText -- 2.30.2