packages feed

fix-imports 1.0.2 → 1.0.3

raw patch · 3 files changed

+16/−5 lines, 3 filesdep ~haskell-src-exts

Dependency ranges changed: haskell-src-exts

Files

fix-imports.cabal view
@@ -1,5 +1,5 @@ name: fix-imports-version: 1.0.2+version: 1.0.3 cabal-version: >= 1.6 build-type: Simple synopsis: Program to manage the imports of a haskell module@@ -56,6 +56,7 @@ executable fix-imports     main-is: Main.hs     hs-source-dirs: src-    build-depends: base >= 3 && < 5, containers, directory, filepath, process,-        haskell-src-exts >= 1.13.2, uniplate, split, cpphs, text+    build-depends: base >= 3 && < 5, containers, directory, filepath, process+        , haskell-src-exts >= 1.14.0 && < 1.15+        , uniplate, split, cpphs, text     ghc-options: -Wall -fno-warn-name-shadowing
src/Config.hs view
@@ -156,8 +156,13 @@     above ++ importLine ++ (if null right then "" else ' ' : right)     where     above = concat [cmt ++ "\n" | Types.Comment Types.CmtAbove cmt <- cmts]-    importLine = Haskell.prettyPrint imp+    importLine = Haskell.prettyPrintStyleMode style mode imp     right = Util.join "\n" [cmt | Types.Comment Types.CmtRight cmt <- cmts]+    style = Haskell.style+        { Haskell.lineLength = 80+        , Haskell.ribbonsPerLine = 1+        }+    mode = Haskell.defaultMode  {- -- t0 = map localPrio imports -- formatGroups priorities (map mkImport imports)
src/FixImports.hs view
@@ -143,7 +143,12 @@     parse = Haskell.parseFileContentsWithComments $         Haskell.defaultParseMode             { Haskell.parseFilename = modulePath-            , Haskell.extensions = Extension.haskell2010+            , Haskell.extensions = map Extension.EnableExtension $+                Extension.toExtensionList Extension.Haskell2010 []+                -- GHC has this extension enabled by default, and it's easy+                -- to wind up with code that relies on it:+                -- http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/bugs-and-infelicities.html#infelicities-syntax+                ++ [Extension.NondecreasingIndentation]             -- The meaning of Nothing is undocumented, but I think it means             -- to not check for fixity ambiguity at all, which is what I want.             , Haskell.fixities = Nothing