Skip to content

Commit 3d90449

Browse files
authored
Try to clarify behaviour of group with hardline (#168)
1 parent 58c140a commit 3d90449

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,11 @@ hardline :: Doc ann
576576
hardline = Line
577577

578578
-- | @('group' x)@ tries laying out @x@ into a single line by removing the
579-
-- contained line breaks; if this does not fit the page, @x@ is laid out without
580-
-- any changes. The 'group' function is key to layouts that adapt to available
581-
-- space nicely.
579+
-- contained line breaks; if this does not fit the page, or when a 'hardline'
580+
-- within @x@ prevents it from being flattened, @x@ is laid out without any
581+
-- changes.
582+
--
583+
-- The 'group' function is key to layouts that adapt to available space nicely.
582584
--
583585
-- See 'vcat', 'line', or 'flatAlt' for examples that are related, or make good
584586
-- use of it.

0 commit comments

Comments
 (0)