packages feed

hsimport 0.6 → 0.6.1

raw patch · 5 files changed

+41/−34 lines, 5 filesdep ~haskell-src-extsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: haskell-src-exts

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,3 +1,7 @@+0.6.1+-----+* Changes for haskell-src-exts 1.16.0+ 0.6 --- * Add option '--as'
hsimport.cabal view
@@ -1,5 +1,5 @@ name: hsimport-version: 0.6+version: 0.6.1 cabal-version: >=1.9.2 build-type: Simple license: BSD3@@ -26,7 +26,7 @@     build-depends:         base >=3 && <5,         cmdargs >=0.10.5 && <0.11,-        haskell-src-exts >=1.14.0 && <1.16,+        haskell-src-exts >=1.16.0 && <1.17,         lens >=3.9.2 && <4.5,         mtl >=2.1.2 && <2.3,         text >=0.11.3.1 && <1.3,@@ -72,7 +72,7 @@         tasty >=0.6 && <0.11,         tasty-golden >=2.2.0.1 && <2.3,         filepath >=1.3.0.1 && <1.4,-        haskell-src-exts >=1.14.0 && <1.16,+        haskell-src-exts >=1.16.0 && <1.17,         hsimport -any     type: exitcode-stdio-1.0     main-is: Main.hs
lib/HsImport/ImportChange.hs view
@@ -149,7 +149,7 @@    | otherwise    = False    where-      imports (Symbol symName)             (HS.IVar name)                    = symName == nameString name+      imports (Symbol symName)             (HS.IVar _ name)                  = symName == nameString name       imports (Symbol symName)             (HS.IAbs name)                    = symName == nameString name       imports (Symbol symName)             (HS.IThingAll name)               = symName == nameString name       imports (Symbol symName)             (HS.IThingWith name _)            = symName == nameString name@@ -179,6 +179,7 @@    , HS.importModule    = HS.ModuleName moduleName    , HS.importQualified = False    , HS.importSrc       = False+   , HS.importSafe      = False    , HS.importPkg       = Nothing    , HS.importAs        = Nothing    , HS.importSpecs     = Nothing@@ -207,7 +208,7 @@   importSpec :: Symbol -> HS.ImportSpec-importSpec (Symbol symName)             = HS.IVar $ hsName symName+importSpec (Symbol symName)             = HS.IVar HS.NoNamespace (hsName symName) importSpec (AllOfSymbol symName)        = HS.IThingAll $ hsName symName importSpec (SomeOfSymbol symName names) = HS.IThingWith (hsName symName) (map (HS.VarName . hsName) names) 
lib/HsImport/Utils.hs view
@@ -16,34 +16,36 @@ declSrcLoc :: HS.Decl -> Maybe HS.SrcLoc declSrcLoc decl =    case decl of-        HS.TypeDecl srcLoc _ _ _          -> Just srcLoc-        HS.TypeFamDecl srcLoc _ _ _       -> Just srcLoc-        HS.DataDecl srcLoc _ _ _ _ _ _    -> Just srcLoc-        HS.GDataDecl srcLoc _ _ _ _ _ _ _ -> Just srcLoc-        HS.DataFamDecl srcLoc _ _ _ _     -> Just srcLoc-        HS.TypeInsDecl srcLoc _ _         -> Just srcLoc-        HS.DataInsDecl srcLoc _ _ _ _     -> Just srcLoc-        HS.GDataInsDecl srcLoc _ _ _ _ _  -> Just srcLoc-        HS.ClassDecl srcLoc _ _ _ _ _     -> Just srcLoc-        HS.InstDecl srcLoc _ _ _ _        -> Just srcLoc-        HS.DerivDecl srcLoc _ _ _         -> Just srcLoc-        HS.InfixDecl srcLoc _ _ _         -> Just srcLoc-        HS.DefaultDecl srcLoc _           -> Just srcLoc-        HS.SpliceDecl srcLoc _            -> Just srcLoc-        HS.TypeSig srcLoc _ _             -> Just srcLoc-        HS.FunBind _                      -> Nothing-        HS.PatBind srcLoc _ _ _ _         -> Just srcLoc-        HS.ForImp srcLoc _ _ _ _ _        -> Just srcLoc-        HS.ForExp srcLoc _ _ _ _          -> Just srcLoc-        HS.RulePragmaDecl srcLoc _        -> Just srcLoc-        HS.DeprPragmaDecl srcLoc _        -> Just srcLoc-        HS.WarnPragmaDecl srcLoc _        -> Just srcLoc-        HS.InlineSig srcLoc _ _ _         -> Just srcLoc-        HS.InlineConlikeSig srcLoc _ _    -> Just srcLoc-        HS.SpecSig srcLoc _ _ _           -> Just srcLoc-        HS.SpecInlineSig srcLoc _ _ _ _   -> Just srcLoc-        HS.InstSig srcLoc _ _ _           -> Just srcLoc-        HS.AnnPragma srcLoc _             -> Just srcLoc+        HS.TypeDecl srcLoc _ _ _            -> Just srcLoc+        HS.TypeFamDecl srcLoc _ _ _         -> Just srcLoc+        HS.ClosedTypeFamDecl srcLoc _ _ _ _ -> Just srcLoc+        HS.DataDecl srcLoc _ _ _ _ _ _      -> Just srcLoc+        HS.GDataDecl srcLoc _ _ _ _ _ _ _   -> Just srcLoc+        HS.DataFamDecl srcLoc _ _ _ _       -> Just srcLoc+        HS.TypeInsDecl srcLoc _ _           -> Just srcLoc+        HS.DataInsDecl srcLoc _ _ _ _       -> Just srcLoc+        HS.GDataInsDecl srcLoc _ _ _ _ _    -> Just srcLoc+        HS.ClassDecl srcLoc _ _ _ _ _       -> Just srcLoc+        HS.InstDecl srcLoc _ _ _ _ _ _      -> Just srcLoc+        HS.DerivDecl srcLoc _ _ _ _ _       -> Just srcLoc+        HS.InfixDecl srcLoc _ _ _           -> Just srcLoc+        HS.DefaultDecl srcLoc _             -> Just srcLoc+        HS.SpliceDecl srcLoc _              -> Just srcLoc+        HS.TypeSig srcLoc _ _               -> Just srcLoc+        HS.FunBind _                        -> Nothing+        HS.PatBind srcLoc _ _ _             -> Just srcLoc+        HS.ForImp srcLoc _ _ _ _ _          -> Just srcLoc+        HS.ForExp srcLoc _ _ _ _            -> Just srcLoc+        HS.RulePragmaDecl srcLoc _          -> Just srcLoc+        HS.DeprPragmaDecl srcLoc _          -> Just srcLoc+        HS.WarnPragmaDecl srcLoc _          -> Just srcLoc+        HS.InlineSig srcLoc _ _ _           -> Just srcLoc+        HS.InlineConlikeSig srcLoc _ _      -> Just srcLoc+        HS.SpecSig srcLoc _ _ _             -> Just srcLoc+        HS.SpecInlineSig srcLoc _ _ _ _     -> Just srcLoc+        HS.InstSig srcLoc _ _ _ _           -> Just srcLoc+        HS.AnnPragma srcLoc _               -> Just srcLoc+        HS.MinimalPragma srcLoc _           -> Just srcLoc   importDecls :: HS.Module -> [HS.ImportDecl]
tests/Main.hs view
@@ -117,7 +117,7 @@       ppSyms = intercalate " , " symNames       symNames = map symName syms -      symName (HS.IVar (HS.Ident name)) = name+      symName (HS.IVar HS.NoNamespace (HS.Ident name)) = name       symName _ = ""  prettyPrint _ = "Uupps"