packages feed

hsimport 0.8.1 → 0.8.2

raw patch · 3 files changed

+10/−4 lines, 3 files

Files

CHANGELOG view
@@ -1,3 +1,7 @@+0.8.2+-----+* Update README+ 0.8.1 ----- * Use SrcSpan info of haskell-src-exts instead of parsing import declarations by hand
README.md view
@@ -51,19 +51,21 @@     import qualified Language.Haskell.Exts as HS     import HsImport +    type HsImportDecl = HS.ImportDecl HS.SrcSpanInfo+     main :: IO ()     main = hsimport $ defaultConfig { prettyPrint = prettyPrint, findImportPos = findImportPos }        where           -- This is a bogus implementation of prettyPrint, because it doesn't handle the           -- qualified import case nor does it considers any explicitely imported or hidden symbols.-          prettyPrint :: HS.ImportDecl -> String-          prettyPrint (HS.ImportDecl { HS.importModule = HS.ModuleName modName }) =+          prettyPrint :: HsImportDecl -> String+          prettyPrint (HS.ImportDecl { HS.importModule = HS.ModuleName _ modName }) =              "import " ++ modName            -- This findImportPos implementation will always add the new import declaration           -- at the end of the current ones. The data type ImportPos has the two constructors           -- After and Before.-          findImportPos :: HS.ImportDecl -> [HS.ImportDecl] -> Maybe ImportPos+          findImportPos :: HsImportDecl -> [HsImportDecl] -> Maybe ImportPos           findImportPos _         []             = Nothing           findImportPos newImport currentImports = Just . After . last $ currentImports 
hsimport.cabal view
@@ -1,5 +1,5 @@ name: hsimport-version: 0.8.1+version: 0.8.2 cabal-version: >=1.9.2 build-type: Simple license: BSD3