weeder 2.3.0 → 2.3.1
raw patch · 4 files changed
+33/−7 lines, 4 filesdep ~algebraic-graphsdep ~dhalldep ~lens
Dependency ranges changed: algebraic-graphs, dhall, lens, optparse-applicative
Files
- CHANGELOG.md +25/−0
- src/Weeder.hs +2/−1
- src/Weeder/Main.hs +1/−1
- weeder.cabal +5/−5
CHANGELOG.md view
@@ -1,5 +1,29 @@ ## Changelog for Weeder +### [`2.3.1`][v2.3.1] - *2022-05-21*++This is the last release of `weeder` compatible with GHC 9.0.++- Weeder now analyzes top-level pattern bindings. For example, with the following input:++ ```haskell+ module Dep (a, b) where++ xxx :: Int+ xxx = 3++ a, b :: Int+ (a, b) = (xxx, 1)+ ```+ + ... `weeder` will determine that both `a` and `b` depend on `xxx`. While this is an over-approximation, it prevents weeder from reporting false positives. For more information, see [#92](https://github.com/ocharles/weeder/issues/92).++- Corrected a typo in `--help` ([#96](https://github.com/ocharles/weeder/pull/96)).+- Shorten the help text for `--require-hs-files` ([#97](https://github.com/ocharles/weeder/pull/97)).+- Allow `algebraic-graphs-0.6` ([#95](https://github.com/ocharles/weeder/pull/95)).+- Allow Dhall 1.41 ([#99](https://github.com/ocharles/weeder/pull/99)).+- Allow `optparse-applicative-0.17` ([#100](https://github.com/ocharles/weeder/pull/100)).+ ### [`2.3.0`][v2.3.0] - *2021-10-11* - Switch to GHC 9@@ -201,6 +225,7 @@ - Initial version +[v2.3.1]: https://github.com/ocharles/weeder/releases/tag/2.3.1 [v2.3.0 ]: https://github.com/ocharles/weeder/releases/tag/2.3.0 [v2.2.0 ]: https://github.com/ocharles/weeder/releases/tag/2.2.0 [v2.1.3 ]: https://github.com/ocharles/weeder/releases/tag/2.1.3
src/Weeder.hs view
@@ -264,7 +264,8 @@ analyseBinding :: ( Alternative m, MonadState Analysis m ) => HieAST a -> m () analyseBinding n@Node{ nodeSpan, sourcedNodeInfo } = do- guard $ any (Set.member ("FunBind", "HsBindLR") . nodeAnnotations) $ getSourcedNodeInfo sourcedNodeInfo+ let bindAnns = Set.fromList [("FunBind", "HsBindLR"), ("PatBind", "HsBindLR")]+ guard $ any (not . Set.disjoint bindAnns . nodeAnnotations) $ getSourcedNodeInfo sourcedNodeInfo for_ ( findDeclarations n ) \d -> do define d nodeSpan
src/Weeder/Main.hs view
@@ -90,7 +90,7 @@ ) <*> switch ( long "require-hs-files"- <> help "Requries that all .hie files have matching .hs files. This can help deal with skipping .hie files for Haskell modules that have since been removed"+ <> help "Skip stale .hie files with no matching .hs modules" ) versionP = infoOption ( "weeder version "
weeder.cabal view
@@ -5,7 +5,7 @@ author: Ollie Charles <ollie@ocharles.org.uk> maintainer: Ollie Charles <ollie@ocharles.org.uk> build-type: Simple-version: 2.3.0+version: 2.3.1 copyright: Neil Mitchell 2017-2020, Oliver Charles 2020 synopsis: Detect dead code description: Find declarations.@@ -18,18 +18,18 @@ library build-depends:- , algebraic-graphs ^>= 0.4 || ^>= 0.5+ , algebraic-graphs ^>= 0.4 || ^>= 0.5 || ^>= 0.6 , base ^>= 4.15.0.0 , bytestring ^>= 0.10.9.0 || ^>= 0.11.0.0 , containers ^>= 0.6.2.1- , dhall ^>= 1.30.0 || ^>= 1.31.0 || ^>= 1.32.0 || ^>= 1.33.0 || ^>= 1.34.0 || ^>= 1.35.0 || ^>= 1.36.0 || ^>= 1.37.0 || ^>= 1.40.0+ , dhall ^>= 1.30.0 || ^>= 1.31.0 || ^>= 1.32.0 || ^>= 1.33.0 || ^>= 1.34.0 || ^>= 1.35.0 || ^>= 1.36.0 || ^>= 1.37.0 || ^>= 1.40.0 || ^>= 1.41 , directory ^>= 1.3.3.2 , filepath ^>= 1.4.2.1 , generic-lens ^>= 2.2.0.0 , ghc ^>= 9.0- , lens ^>= 4.18.1 || ^>= 4.19 || ^>= 5.0.1+ , lens ^>= 4.18.1 || ^>= 4.19 || ^>= 5.0.1 || ^>= 5.1 , mtl ^>= 2.2.2- , optparse-applicative ^>= 0.14.3.0 || ^>= 0.15.1.0 || ^>= 0.16.0.0+ , optparse-applicative ^>= 0.14.3.0 || ^>= 0.15.1.0 || ^>= 0.16.0.0 || ^>= 0.17 , regex-tdfa ^>= 1.2.0.0 || ^>= 1.3.1.0 , text ^>= 1.2.3.0 , transformers ^>= 0.5.6.2 || ^>= 0.6