hsimport 0.5.1 → 0.5.2
raw patch · 3 files changed
+11/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG +4/−0
- hsimport.cabal +3/−2
- lib/HsImport/Parse.hs +4/−4
CHANGELOG view
@@ -1,3 +1,7 @@+0.5.2+-----+* Build/tested with GHC 7.8.3+ 0.5.1 ----- * Better handling of multi line imports like:
hsimport.cabal view
@@ -1,5 +1,5 @@ name: hsimport-version: 0.5.1+version: 0.5.2 cabal-version: >=1.9.2 build-type: Simple license: BSD3@@ -8,8 +8,9 @@ synopsis: A command line program for extending the import list of a Haskell source file. description: A command line program for extending the import list of a Haskell source file.-category: Utils+category: Utils, Development author: Daniel Trstenjak+tested-with: GHC ==7.6.2 GHC ==7.6.3 GHC ==7.8.3 extra-source-files: README.md CHANGELOG
lib/HsImport/Parse.hs view
@@ -59,7 +59,7 @@ | lastLine <= numSrcLines = case parseFileContents source of HS.ParseOk module_- | oneImportDeclWithoutSymbols module_ && startsWithImportDeclSymbols lastLine+ | oneImportDeclWithoutSymbols module_ && startsWithImportDeclSymbols (lastLine + 1) -> parseImport (lastLine + 1) | otherwise@@ -82,9 +82,9 @@ -- | Returns True if the line represents the starting of a ImportDecl symbol list. startsWithImportDeclSymbols lineNum- | (line : _) <- drop lineNum srcLines- , (' ' : _) <- line- , ('(' : _) <- dropWhile (== ' ') line+ | line : _ <- drop (lineNum - 1) srcLines+ , ' ' : _ <- line+ , '(' : _ <- dropWhile (== ' ') line = True | otherwise