Skip to content

Commit

Permalink
Try to clarify behaviour of group with hardline (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjakobi authored Jun 17, 2020
1 parent 58c140a commit 3d90449
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,11 @@ hardline :: Doc ann
hardline = Line

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

0 comments on commit 3d90449

Please sign in to comment.