packages feed

stylish-haskell 0.5.2.0 → 0.5.3.0

raw patch · 3 files changed

+17/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

src/Language/Haskell/Stylish/Util.hs view
@@ -65,11 +65,14 @@     -- TODO: In order to optimize this, use a difference list instead of a     -- regular list for 'ls'.     step (ls, curr, width) str-        | width' > maxWidth = (ls ++ [curr], indent ind str, ind + len)-        | otherwise         = (ls, curr ++ " " ++ str, width')+        | nextLine  = (ls ++ [curr], indent ind str, ind + len)+        | otherwise = (ls, curr ++ " " ++ str, width')       where-        len    = length str-        width' = width + 1 + len+        -- 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   --------------------------------------------------------------------------------
stylish-haskell.cabal view
@@ -1,5 +1,5 @@ Name:          stylish-haskell-Version:       0.5.2.0+Version:       0.5.3.0 Synopsis:      Haskell code prettifier Homepage:      https://github.com/jaspervdj/stylish-haskell License:       BSD3
tests/Language/Haskell/Stylish/Step/Imports/Tests.hs view
@@ -22,6 +22,7 @@     , testCase "case 02" case02     , testCase "case 03" case03     , testCase "case 04" case04+    , testCase "case 05" case05     ]  @@ -112,3 +113,11 @@         , "                                   object, parseEither, typeMismatch, (.!=),"         , "                                   (.:), (.:?), (.=))"         ]+++--------------------------------------------------------------------------------+case05 :: Assertion+case05 = input' @=? testStep (step 80 Group) input'+  where+    input' = "import Distribution.PackageDescription.Configuration " +++        "(finalizePackageDescription)\n"