Commit 6d4b9755 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Actually we don't need wrapText'

Any users of custom wrapText versions can go from the underlying wrapLine
parent 1f2a7ef0
...@@ -100,7 +100,6 @@ module Distribution.Simple.Utils ( ...@@ -100,7 +100,6 @@ module Distribution.Simple.Utils (
intercalate, intercalate,
lowercase, lowercase,
wrapText, wrapText,
wrapText',
wrapLine, wrapLine,
) where ) where
...@@ -249,15 +248,11 @@ breaks f xs = case span f xs of ...@@ -249,15 +248,11 @@ breaks f xs = case span f xs of
-- | Wraps text to the default line width. Existing newlines are preserved. -- | Wraps text to the default line width. Existing newlines are preserved.
wrapText :: String -> String wrapText :: String -> String
wrapText = wrapText' 79 wrapText = unlines
. concatMap (map unwords
-- | Wraps text to the given line width. Existing newlines are preserved. . wrapLine 79
wrapText' :: Int -> String -> String . words)
wrapText' width = unlines . lines
. concatMap (map unwords
. wrapLine width
. words)
. lines
-- | Wraps a list of words to a list of lines of words of a particular width. -- | Wraps a list of words to a list of lines of words of a particular width.
wrapLine :: Int -> [String] -> [[String]] wrapLine :: Int -> [String] -> [[String]]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment