summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-07-31 16:36:30 +0200
committerJasper Van der Jeugt <m@jaspervdj.be>2012-07-31 16:36:30 +0200
commitdfb873f74831ff12a3aab8961d175e35214e15f1 (patch)
tree45003da18243141aef6bad9984c2739775fd26a6
parentdafe122baea8c4afb30b7faab399cab080abd5af (diff)
downloadstylish-haskell-dfb873f74831ff12a3aab8961d175e35214e15f1.tar.gz
Align imports after the start-parenthesis
See #7
-rw-r--r--src/StylishHaskell/Step/Imports.hs2
-rw-r--r--tests/StylishHaskell/Step/Imports/Tests.hs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/StylishHaskell/Step/Imports.hs b/src/StylishHaskell/Step/Imports.hs
index 1b50d5c..5b1198f 100644
--- a/src/StylishHaskell/Step/Imports.hs
+++ b/src/StylishHaskell/Step/Imports.hs
@@ -94,7 +94,7 @@ sortImportSpecs imp = imp {H.importSpecs = fmap sort $ H.importSpecs imp}
prettyImport :: Int -> Bool -> Bool -> Int -> H.ImportDecl l -> String
prettyImport columns padQualified padName longest imp =
intercalate "\n" $
- wrap columns base (length base + 1) $
+ wrap columns base (length base + 2) $
(if hiding then ("hiding" :) else id) $
withInit (++ ",") $
withHead ("(" ++) $
diff --git a/tests/StylishHaskell/Step/Imports/Tests.hs b/tests/StylishHaskell/Step/Imports/Tests.hs
index 6da0af3..6b820f0 100644
--- a/tests/StylishHaskell/Step/Imports/Tests.hs
+++ b/tests/StylishHaskell/Step/Imports/Tests.hs
@@ -105,6 +105,6 @@ case04 = expected @=? testStep (step 80 Global) input'
expected = unlines
[ "import Data.Aeson.Types (FromJSON(..), ToJSON(..), Value(..), object,"
- , " parseEither, typeMismatch, (.!=), (.:), (.:?),"
- , " (.=))"
+ , " parseEither, typeMismatch, (.!=), (.:),"
+ , " (.:?), (.=))"
]