From 1f89ce8dc39c619d355ccf18ed55bdc91922eb8d Mon Sep 17 00:00:00 2001 From: Jannis Date: Thu, 23 Jan 2020 22:04:10 +0100 Subject: [PATCH] Linter --- prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs | 4 ++-- prettyprinter/test/Testsuite/Main.hs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs b/prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs index aaa73ffe..10ba5b8a 100755 --- a/prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs +++ b/prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs @@ -561,8 +561,8 @@ changesOnFlattening = \doc -> case doc of (NoChange , Flat b' ) -> Flat (Cat a b') (Flat a' , Flat b' ) -> Flat (Cat a' b') - Annotated ann x -> Annotated ann <$> (changesOnFlattening x) - Nest i x -> Nest i <$> (changesOnFlattening x) + Annotated ann x -> Annotated ann <$> changesOnFlattening x + Nest i x -> Nest i <$> changesOnFlattening x Column f -> Flat (Column (flatten . f)) Nesting f -> Flat (Nesting (flatten . f)) diff --git a/prettyprinter/test/Testsuite/Main.hs b/prettyprinter/test/Testsuite/Main.hs index 26e96d28..50a171d4 100644 --- a/prettyprinter/test/Testsuite/Main.hs +++ b/prettyprinter/test/Testsuite/Main.hs @@ -117,12 +117,12 @@ fusionDoesNotChangeRendering depth groupLayoutEqualsSimpleGroupLayout :: Property groupLayoutEqualsSimpleGroupLayout = forAllShow (arbitrary :: Gen (Doc Int)) (show . diag) (\doc -> forAll arbitrary (\layouter -> - let grouped = group $ doc + let grouped = group doc groupedSimple = simpleGroup doc groupedLayedOut = layout layouter grouped groupedSimpleLayedOut = layout layouter groupedSimple - in counterexample ("Grouped: " ++ (show . diag $ grouped)) - (counterexample ("Grouped (Simple) " ++ (show . diag $ groupedSimple)) + in counterexample ("Grouped: " ++ (show . diag) (grouped)) + (counterexample ("Grouped (Simple) " ++ (show . diag) (groupedSimple)) (groupedLayedOut === groupedSimpleLayedOut)))) instance Arbitrary ann => Arbitrary (Doc ann) where