packages feed

stylish-haskell 0.3.1.0 → 0.3.2.0

raw patch · 16 files changed

+216/−115 lines, 16 files

Files

.stylish-haskell.yaml view
@@ -54,6 +54,10 @@   # Remove trailing whitespace   - trailing_whitespace: {} +# A common setting is the number of columns (parts of) code will be wrapped+# to. Different steps take this into account. Default: 80.+columns: 80+ # Sometimes, language extensions are specified in a cabal file or from the # command line instead of using language pragmas in the file. stylish-haskell # needs to be aware of these, so it can parse the file correctly.
src/Main.hs view
@@ -11,6 +11,7 @@ import           Data.Version           (Version(..)) import           Prelude                hiding (readFile) import           System.Console.CmdArgs+import           System.IO              (hPutStrLn, stderr) import           System.IO.Strict       (readFile)  @@ -74,7 +75,11 @@ file :: StylishArgs -> Config -> Maybe FilePath -> IO () file sa conf mfp = do     contents <- maybe getContents readFile mfp-    write $ unlines $ runSteps (configLanguageExtensions conf)-        mfp (configSteps conf) $ lines contents+    let result = runSteps (configLanguageExtensions conf)+            mfp (configSteps conf) $ lines contents++    case result of+        Left  err -> hPutStrLn stderr err >> write contents+        Right ok  -> write $ unlines ok   where     write = maybe putStr (if inPlace sa then writeFile else const putStr) mfp
src/StylishHaskell.hs view
@@ -6,18 +6,23 @@   --------------------------------------------------------------------------------+import           Control.Applicative   ((<$>))+import           Control.Monad         (foldM)+++-------------------------------------------------------------------------------- import           StylishHaskell.Config import           StylishHaskell.Parse import           StylishHaskell.Step   ---------------------------------------------------------------------------------runStep :: Extensions -> Maybe FilePath -> Step -> Lines -> Lines-runStep exts mfp step ls = case parseModule exts mfp (unlines ls) of-    Left err      -> error err  -- TODO: maybe return original lines?-    Right module' -> stepFilter step ls module'+runStep :: Extensions -> Maybe FilePath -> Lines -> Step -> Either String Lines+runStep exts mfp ls step =+    stepFilter step ls <$> parseModule exts mfp (unlines ls)   ---------------------------------------------------------------------------------runSteps :: Extensions -> Maybe FilePath -> [Step] -> Lines -> Lines-runSteps exts mfp = foldr (flip (.)) id . map (runStep exts mfp)+runSteps :: Extensions -> Maybe FilePath -> [Step] -> Lines+         -> Either String Lines+runSteps exts mfp steps ls = foldM (runStep exts mfp) ls steps
src/StylishHaskell/Config.hs view
@@ -10,7 +10,7 @@   ---------------------------------------------------------------------------------import           Control.Applicative                    ((<$>), (<*>))+import           Control.Applicative                    (pure, (<$>), (<*>)) import           Control.Monad                          (forM, msum, mzero) import           Data.Aeson                             (FromJSON(..)) import qualified Data.Aeson                             as A@@ -42,6 +42,7 @@ -------------------------------------------------------------------------------- data Config = Config     { configSteps              :: [Step]+    , configColumns            :: Int     , configLanguageExtensions :: [String]     } @@ -53,7 +54,7 @@  -------------------------------------------------------------------------------- emptyConfig :: Config-emptyConfig = Config [] []+emptyConfig = Config [] 80 []   --------------------------------------------------------------------------------@@ -105,14 +106,21 @@  -------------------------------------------------------------------------------- parseConfig :: A.Value -> A.Parser Config-parseConfig (A.Object o) = Config-    <$> (o A..: "steps" >>= fmap concat . mapM parseSteps)-    <*> (o A..:? "language_extensions" A..!= [])+parseConfig (A.Object o) = do+    -- First load the config without the actual steps+    config <- Config+        <$> pure []+        <*> (o A..:? "columns"             A..!= 80)+        <*> (o A..:? "language_extensions" A..!= [])++    -- Then fill in the steps based on the partial config we already have+    steps <- (o A..:  "steps" >>= fmap concat . mapM (parseSteps config))+    return config {configSteps = steps} parseConfig _            = mzero   ---------------------------------------------------------------------------------catalog :: Map String (A.Object -> A.Parser Step)+catalog :: Map String (Config -> A.Object -> A.Parser Step) catalog = M.fromList     [ ("imports",             parseImports)     , ("language_pragmas",    parseLanguagePragmas)@@ -123,11 +131,11 @@   ---------------------------------------------------------------------------------parseSteps :: A.Value -> A.Parser [Step]-parseSteps val = do+parseSteps :: Config -> A.Value -> A.Parser [Step]+parseSteps config val = do     map' <- parseJSON val :: A.Parser (Map String A.Value)     forM (M.toList map') $ \(k, v) -> case (M.lookup k catalog, v) of-        (Just parser, A.Object o) -> parser o+        (Just parser, A.Object o) -> parser config o         _                         -> fail $ "Invalid declaration for " ++ k  @@ -142,9 +150,10 @@   ---------------------------------------------------------------------------------parseImports :: A.Object -> A.Parser Step-parseImports o = Imports.step-    <$> (o A..:? "align" >>= parseEnum aligns Imports.Global)+parseImports :: Config -> A.Object -> A.Parser Step+parseImports config o = Imports.step+    <$> pure (configColumns config)+    <*> (o A..:? "align" >>= parseEnum aligns Imports.Global)   where     aligns =         [ ("global", Imports.Global)@@ -154,9 +163,10 @@   ---------------------------------------------------------------------------------parseLanguagePragmas :: A.Object -> A.Parser Step-parseLanguagePragmas o = LanguagePragmas.step-    <$> (o A..:? "style" >>= parseEnum styles LanguagePragmas.Vertical)+parseLanguagePragmas :: Config -> A.Object -> A.Parser Step+parseLanguagePragmas config o = LanguagePragmas.step+    <$> pure (configColumns config)+    <*> (o A..:? "style" >>= parseEnum styles LanguagePragmas.Vertical)     <*> o A..:? "remove_redundant" A..!= True   where     styles =@@ -166,17 +176,17 @@   ---------------------------------------------------------------------------------parseTabs :: A.Object -> A.Parser Step-parseTabs o = Tabs.step+parseTabs :: Config -> A.Object -> A.Parser Step+parseTabs _ o = Tabs.step     <$> o A..:? "spaces" A..!= 8   ---------------------------------------------------------------------------------parseTrailingWhitespace :: A.Object -> A.Parser Step-parseTrailingWhitespace _ = return TrailingWhitespace.step+parseTrailingWhitespace :: Config -> A.Object -> A.Parser Step+parseTrailingWhitespace _ _ = return TrailingWhitespace.step   ---------------------------------------------------------------------------------parseUnicodeSyntax :: A.Object -> A.Parser Step-parseUnicodeSyntax o = UnicodeSyntax.step+parseUnicodeSyntax :: Config -> A.Object -> A.Parser Step+parseUnicodeSyntax _ o = UnicodeSyntax.step     <$> o A..:? "add_language_pragma" A..!= True
src/StylishHaskell/Parse.hs view
@@ -25,6 +25,14 @@   --------------------------------------------------------------------------------+-- | If the given string is prefixed with an UTF-8 Byte Order Mark, drop it+-- because haskell-src-exts can't handle it.+dropBom :: String -> String+dropBom ('\xfeff' : str) = str+dropBom str              = str+++-------------------------------------------------------------------------------- -- | Read an extension name from a string parseExtension :: String -> Either String H.Extension parseExtension str = case reads str of@@ -46,8 +54,8 @@         mode     = H.defaultParseMode             {H.extensions = exts, H.fixities = Nothing} -        -- Special handling for CPP, haskell-src-exts can't deal with it-        string'  = if H.CPP `elem` exts then unCpp string else string+        -- Preprocessing+        string'  = dropBom $ (if H.CPP `elem` exts then unCpp else id) $ string      case H.parseModuleWithComments mode string' of         H.ParseOk md -> return md
src/StylishHaskell/Step/Imports.hs view
@@ -8,7 +8,7 @@ -------------------------------------------------------------------------------- import           Control.Arrow                   ((&&&)) import           Data.Char                       (isAlpha, toLower)-import           Data.List                       (sortBy)+import           Data.List                       (intercalate, sortBy) import           Data.Maybe                      (isJust, maybeToList) import           Data.Ord                        (comparing) import qualified Language.Haskell.Exts.Annotated as H@@ -91,15 +91,46 @@   ---------------------------------------------------------------------------------prettyImport :: Bool -> Bool -> Int -> H.ImportDecl l -> String-prettyImport padQualified padName longest imp = unwords $ concat-    [ ["import"]-    , qualified-    , [(if hasExtras && padName then padRight longest else id) (importName imp)]-    , ["as " ++ as | H.ModuleName _ as <- maybeToList $ H.importAs imp]-    , [H.prettyPrint specs | specs <- maybeToList $ H.importSpecs imp]-    ]+-- | By default, haskell-src-exts pretty-prints+--+-- > import Foo (Bar(..))+--+-- but we want+--+-- > import Foo (Bar (..))+--+-- instead.+prettyImportSpec :: H.ImportSpec l -> String+prettyImportSpec (H.IThingAll  _ n)     = H.prettyPrint n ++ " (..)"+prettyImportSpec (H.IThingWith _ n cns) = H.prettyPrint n ++ " (" +++    intercalate ", " (map H.prettyPrint cns) ++ ")"+prettyImportSpec x                      = H.prettyPrint x+++--------------------------------------------------------------------------------+prettyImport :: Int -> Bool -> Bool -> Int -> H.ImportDecl l -> String+prettyImport columns padQualified padName longest imp =+    intercalate "\n" $+    wrap columns base (length base + 2) $+    (if hiding then ("hiding" :) else id) $+    withInit (++ ",") $+    withHead ("(" ++) $+    withLast (++ ")") $+    map prettyImportSpec $+    importSpecs   where+    base = unwords $ concat+         [ ["import"]+         , qualified+         , [(if hasExtras && padName then padRight longest else id)+            (importName imp)]+         , ["as " ++ as | H.ModuleName _ as <- maybeToList $ H.importAs imp]+         ]++    (hiding, importSpecs) = case H.importSpecs imp of+        Just (H.ImportSpecList _ h l) -> (h, l)+        _                             -> (False, [])+     hasExtras = isJust (H.importAs imp) || isJust (H.importSpecs imp)      qualified@@ -109,9 +140,10 @@   ---------------------------------------------------------------------------------prettyImportGroup :: Align -> Int -> [H.ImportDecl LineBlock] -> Lines-prettyImportGroup align longest imps =-    map (prettyImport padQual padName longest') $ sortBy compareImports imps+prettyImportGroup :: Int -> Align -> Int -> [H.ImportDecl LineBlock] -> Lines+prettyImportGroup columns align longest imps =+    map (prettyImport columns padQual padName longest') $+    sortBy compareImports imps   where     longest' = case align of         Group -> longestImport imps@@ -126,14 +158,14 @@   ---------------------------------------------------------------------------------step :: Align -> Step-step = makeStep "Imports" . step'+step :: Int -> Align -> Step+step columns = makeStep "Imports" . step' columns   ---------------------------------------------------------------------------------step' :: Align -> Lines -> Module -> Lines-step' align ls (module', _) = flip applyChanges ls-    [ change block (prettyImportGroup align longest importGroup)+step' :: Int -> Align -> Lines -> Module -> Lines+step' columns align ls (module', _) = flip applyChanges ls+    [ change block (prettyImportGroup columns align longest importGroup)     | (block, importGroup) <- groups     ]   where
src/StylishHaskell/Step/LanguagePragmas.hs view
@@ -41,7 +41,6 @@   ----------------------------------------------------------------------------------- | TODO: multiple lines if longer than 80 columns verticalPragmas :: [String] -> Lines verticalPragmas pragmas' =     [ "{-# LANGUAGE " ++ padRight longest pragma ++ " #-}"@@ -52,25 +51,25 @@   ---------------------------------------------------------------------------------compactPragmas :: [String] -> Lines-compactPragmas pragmas' = wrap 80 "{-# LANGUAGE" 13 $+compactPragmas :: Int -> [String] -> Lines+compactPragmas columns pragmas' = wrap columns "{-# LANGUAGE" 13 $     map (++ ",") (init pragmas') ++ [last pragmas', "#-}"]   ---------------------------------------------------------------------------------prettyPragmas :: Style -> [String] -> Lines-prettyPragmas Vertical = verticalPragmas-prettyPragmas Compact  = compactPragmas+prettyPragmas :: Int -> Style -> [String] -> Lines+prettyPragmas _       Vertical = verticalPragmas+prettyPragmas columns Compact  = compactPragmas columns   ---------------------------------------------------------------------------------step :: Style -> Bool -> Step-step style = makeStep "LanguagePragmas" . step' style+step :: Int -> Style -> Bool -> Step+step columns style = makeStep "LanguagePragmas" . step' columns style   ---------------------------------------------------------------------------------step' :: Style -> Bool -> Lines -> Module -> Lines-step' style removeRedundant ls (module', _)+step' :: Int -> Style -> Bool -> Lines -> Module -> Lines+step' columns style removeRedundant ls (module', _)     | null pragmas' = ls     | otherwise     = applyChanges changes ls   where@@ -82,7 +81,7 @@     uniques  = filterRedundant $ nub $ sort $ snd =<< pragmas'     loc      = firstLocation pragmas'     deletes  = map (delete . fst) pragmas'-    changes  = insert loc (prettyPragmas style uniques) : deletes+    changes  = insert loc (prettyPragmas columns style uniques) : deletes   --------------------------------------------------------------------------------
src/StylishHaskell/Step/UnicodeSyntax.hs view
@@ -103,13 +103,6 @@     take (endRow - startRow + 1) .     drop (startRow - 1)   where-    withHead _ []       = []-    withHead f (x : xs) = (f x) : xs--    withLast f [x]      = [f x]-    withLast f (x : xs) = x : withLast f xs-    withLast _ []       = []-     search _      []            = Nothing     search (r, _) ([] : xs)     = search (r + 1, 1) xs     search (r, c) (x : xs)
src/StylishHaskell/Util.hs view
@@ -1,10 +1,15 @@ -------------------------------------------------------------------------------- module StylishHaskell.Util     ( nameToString+    , indent     , padRight     , everything     , infoPoints     , wrap++    , withHead+    , withLast+    , withInit     ) where  @@ -28,6 +33,11 @@   --------------------------------------------------------------------------------+indent :: Int -> String -> String+indent len str = replicate len ' ' ++ str+++-------------------------------------------------------------------------------- padRight :: Int -> String -> String padRight len str = str ++ replicate (len - length str) ' ' @@ -48,17 +58,35 @@      -> Int       -- ^ Indentation      -> [String]  -- ^ Strings to add/wrap      -> Lines     -- ^ Resulting lines-wrap maxWidth leading indent strs =+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-        | width' > maxWidth = (ls ++ [curr], spaces ++ str, indent + len)+        | width' > maxWidth = (ls ++ [curr], indent ind str, ind + len)         | otherwise         = (ls, curr ++ " " ++ str, width')       where         len    = length str         width' = width + 1 + len -    spaces = replicate indent ' '++--------------------------------------------------------------------------------+withHead :: (a -> a) -> [a] -> [a]+withHead _ []       = []+withHead f (x : xs) = f x : xs+++--------------------------------------------------------------------------------+withLast :: (a -> a) -> [a] -> [a]+withLast _ []       = []+withLast f (x : []) = [f x]+withLast f (x : xs) = x : withLast f xs+++--------------------------------------------------------------------------------+withInit :: (a -> a) -> [a] -> [a]+withInit _ []       = []+withInit _ (x : []) = [x]+withInit f (x : xs) = f x : withInit f xs
stylish-haskell.cabal view
@@ -1,5 +1,5 @@ Name:          stylish-haskell-Version:       0.3.1.0+Version:       0.3.2.0 Synopsis:      Haskell code prettifier Homepage:      https://github.com/jaspervdj/stylish-haskell License:       BSD3
tests/StylishHaskell/Step/Imports/Tests.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- import           Test.Framework                 (Test, testGroup) import           Test.Framework.Providers.HUnit (testCase)-import           Test.HUnit                     ((@=?))+import           Test.HUnit                     (Assertion, (@=?))   --------------------------------------------------------------------------------@@ -18,9 +18,10 @@ -------------------------------------------------------------------------------- tests :: Test tests = testGroup "StylishHaskell.Step.Imports.Tests"-    [ case01-    , case02-    , case03+    [ testCase "case 01" case01+    , testCase "case 02" case02+    , testCase "case 03" case03+    , testCase "case 04" case04     ]  @@ -34,15 +35,15 @@     , "import       Data.Map     (lookup, (!), insert, Map)"     , ""     , "import Herp.Derp.Internals hiding (foo)"-    , "import HURR"+    , "import  Foo (Bar (..))"     , ""     , "herp = putStrLn \"import Hello world\""     ]   ---------------------------------------------------------------------------------case01 :: Test-case01 = testCase "case 01" $ expected @=? testStep (step Global) input+case01 :: Assertion+case01 = expected @=? testStep (step 80 Global) input   where     expected = unlines         [ "module Herp where"@@ -51,16 +52,16 @@         , "import           Data.Map            (Map, insert, lookup, (!))"         , "import qualified Data.Map            as M"         , ""+        , "import           Foo                 (Bar (..))"         , "import           Herp.Derp.Internals hiding (foo)"-        , "import           HURR"         , ""         , "herp = putStrLn \"import Hello world\""         ]   ---------------------------------------------------------------------------------case02 :: Test-case02 = testCase "case 02" $ expected @=? testStep (step Group) input+case02 :: Assertion+case02 = expected @=? testStep (step 80 Group) input   where     expected = unlines         [ "module Herp where"@@ -69,16 +70,16 @@         , "import           Data.Map      (Map, insert, lookup, (!))"         , "import qualified Data.Map      as M"         , ""+        , "import Foo                 (Bar (..))"         , "import Herp.Derp.Internals hiding (foo)"-        , "import HURR"         , ""         , "herp = putStrLn \"import Hello world\""         ]   ---------------------------------------------------------------------------------case03 :: Test-case03 = testCase "case 03" $ expected @=? testStep (step None) input+case03 :: Assertion+case03 = expected @=? testStep (step 80 None) input   where     expected = unlines         [ "module Herp where"@@ -87,8 +88,23 @@         , "import Data.Map (Map, insert, lookup, (!))"         , "import qualified Data.Map as M"         , ""+        , "import Foo (Bar (..))"         , "import Herp.Derp.Internals hiding (foo)"-        , "import HURR"         , ""         , "herp = putStrLn \"import Hello world\""+        ]+++--------------------------------------------------------------------------------+case04 :: Assertion+case04 = expected @=? testStep (step 80 Global) input'+  where+    input' =+        "import Data.Aeson.Types (object, typeMismatch, FromJSON(..)," +++        "ToJSON(..), Value(..), parseEither, (.!=), (.:), (.:?), (.=))"++    expected = unlines+        [ "import           Data.Aeson.Types (FromJSON (..), ToJSON (..), Value (..),"+        , "                                   object, parseEither, typeMismatch, (.!=),"+        , "                                   (.:), (.:?), (.=))"         ]
tests/StylishHaskell/Step/LanguagePragmas/Tests.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- import           Test.Framework                      (Test, testGroup) import           Test.Framework.Providers.HUnit      (testCase)-import           Test.HUnit                          ((@=?))+import           Test.HUnit                          (Assertion, (@=?))   --------------------------------------------------------------------------------@@ -18,17 +18,16 @@ -------------------------------------------------------------------------------- tests :: Test tests = testGroup "StylishHaskell.Step.LanguagePragmas.Tests"-    [ case01-    , case02-    , case03-    , case04+    [ testCase "case 01" case01+    , testCase "case 02" case02+    , testCase "case 03" case03+    , testCase "case 04" case04     ]   ---------------------------------------------------------------------------------case01 :: Test-case01 = testCase "case 01" $-    expected @=? testStep (step Vertical False) input+case01 :: Assertion+case01 = expected @=? testStep (step 80 Vertical False) input   where     input = unlines         [ "{-# LANGUAGE ViewPatterns #-}"@@ -46,9 +45,8 @@   ---------------------------------------------------------------------------------case02 :: Test-case02 = testCase "case 02" $-    expected @=? testStep (step Vertical True) input+case02 :: Assertion+case02 = expected @=? testStep (step 80 Vertical True) input   where     input = unlines         [ "{-# LANGUAGE BangPatterns #-}"@@ -63,9 +61,8 @@   ---------------------------------------------------------------------------------case03 :: Test-case03 = testCase "case 03" $-    expected @=? testStep (step Vertical True) input+case03 :: Assertion+case03 = expected @=? testStep (step 80 Vertical True) input   where     input = unlines         [ "{-# LANGUAGE BangPatterns #-}"@@ -80,9 +77,8 @@   ---------------------------------------------------------------------------------case04 :: Test-case04 = testCase "case 04" $-    expected @=? testStep (step Compact False) input+case04 :: Assertion+case04 = expected @=? testStep (step 80 Compact False) input   where     input = unlines         [ "{-# LANGUAGE TypeOperators, StandaloneDeriving, DeriveDataTypeable,"
tests/StylishHaskell/Step/Tabs/Tests.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- import           Test.Framework                 (Test, testGroup) import           Test.Framework.Providers.HUnit (testCase)-import           Test.HUnit                     ((@=?))+import           Test.HUnit                     (Assertion, (@=?))   --------------------------------------------------------------------------------@@ -17,12 +17,14 @@  -------------------------------------------------------------------------------- tests :: Test-tests = testGroup "StylishHaskell.Step.Tabs.Tests" [case01]+tests = testGroup "StylishHaskell.Step.Tabs.Tests"+    [ testCase "case 01" case01+    ]   ---------------------------------------------------------------------------------case01 :: Test-case01 = testCase "case 01" $ expected @=? testStep (step 4) input+case01 :: Assertion+case01 = expected @=? testStep (step 4) input   where     input = unlines         [ "module Main"@@ -39,4 +41,3 @@         , "    = Bar"         , "    | Qux"         ]-
tests/StylishHaskell/Step/TrailingWhitespace/Tests.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- import           Test.Framework                         (Test, testGroup) import           Test.Framework.Providers.HUnit         (testCase)-import           Test.HUnit                             ((@=?))+import           Test.HUnit                             (Assertion, (@=?))   --------------------------------------------------------------------------------@@ -17,12 +17,14 @@  -------------------------------------------------------------------------------- tests :: Test-tests = testGroup "StylishHaskell.Step.TrailingWhitespace.Tests" [case01]+tests = testGroup "StylishHaskell.Step.TrailingWhitespace.Tests"+    [ testCase "case 01" case01+    ]   ---------------------------------------------------------------------------------case01 :: Test-case01 = testCase "case 01" $ expected @=? testStep step input+case01 :: Assertion+case01 = expected @=? testStep step input   where     input = unlines         [ "module Main where"
tests/StylishHaskell/Step/UnicodeSyntax/Tests.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- import           Test.Framework                    (Test, testGroup) import           Test.Framework.Providers.HUnit    (testCase)-import           Test.HUnit                        ((@=?))+import           Test.HUnit                        (Assertion, (@=?))   --------------------------------------------------------------------------------@@ -18,13 +18,13 @@ -------------------------------------------------------------------------------- tests :: Test tests = testGroup "StylishHaskell.Step.UnicodeSyntax.Tests"-    [ case01+    [ testCase "case 01" case01     ]   ---------------------------------------------------------------------------------case01 :: Test-case01 = testCase "case 01" $ expected @=? testStep (step True) input+case01 :: Assertion+case01 = expected @=? testStep (step True) input   where     input = unlines         [ "sort :: Ord a => [a] -> [a]"
tests/TestSuite.hs view
@@ -9,6 +9,7 @@   --------------------------------------------------------------------------------+import qualified StylishHaskell.Parse.Tests import qualified StylishHaskell.Step.Imports.Tests import qualified StylishHaskell.Step.LanguagePragmas.Tests import qualified StylishHaskell.Step.Tabs.Tests@@ -19,7 +20,8 @@ -------------------------------------------------------------------------------- main :: IO () main = defaultMain-    [ StylishHaskell.Step.Imports.Tests.tests+    [ StylishHaskell.Parse.Tests.tests+    , StylishHaskell.Step.Imports.Tests.tests     , StylishHaskell.Step.LanguagePragmas.Tests.tests     , StylishHaskell.Step.Tabs.Tests.tests     , StylishHaskell.Step.TrailingWhitespace.Tests.tests