-- | Makes a 'Doc' non-reflowable.
nowrap :: Doc -> Doc
nowrap doc = Doc $ fromList $ map replaceSpace $ toList $ unDoc doc
  where replaceSpace BreakingSpace = Text 1 " "
        replaceSpace x = x

-- | Returns the width of a 'Doc'.
nowrap :: Doc -> Doc
nowrap doc = Doc $ fromList $ map replaceSpace $ toList $ unDoc doc
  where replaceSpace BreakingSpace = Text 1 " "
        replaceSpace x = x

-- | Returns the width of a 'Doc'.
nowrap doc = Doc $ fromList $ map replaceSpace $ toList $ unDoc doc
  where replaceSpace BreakingSpace = Text 1 " "
        replaceSpace x = x

-- | Returns the width of a 'Doc'.