Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
1Jajen1 committed Jan 23, 2020
1 parent 714557d commit 1f89ce8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions prettyprinter/test/Testsuite/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f89ce8

Please sign in to comment.