diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Language/Haskell/Stylish/Util.hs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/Language/Haskell/Stylish/Util.hs b/src/Language/Haskell/Stylish/Util.hs index 48cc0d3..51b5df9 100644 --- a/src/Language/Haskell/Stylish/Util.hs +++ b/src/Language/Haskell/Stylish/Util.hs @@ -77,26 +77,6 @@ wrap maxWidth leading ind strs' = wrap' leading strs' && ind + length str <= maxWidth --- wrap :: Int -- ^ Maximum line width --- -> String -- ^ Leading string --- -> Int -- ^ Indentation --- -> [String] -- ^ Strings to add/wrap --- -> Lines -- ^ Resulting lines --- wrap maxWidth leading ind strs = --- let (ls, curr, _) = foldl step ([], leading, length leading) strs --- in ls ++ [curr] --- where --- -- TODO: In order to optimize this, use a difference list instead of a --- -- regular list for 'ls'. --- step (ls, curr, width) str --- | nextLine = (ls ++ [curr], indent ind str, ind + len) --- | otherwise = (ls, curr ++ " " ++ str, width') --- where --- -- Put it on the next line if it would make the current line too long, --- -- AND if it doesn't make the next line too long. --- nextLine = width' > maxWidth && ind + len <= maxWidth --- len = length str --- width' = width + 1 + len -------------------------------------------------------------------------------- wrapRest :: Int |