packages feed

hlint 1.9.23 → 1.9.24

raw patch · 5 files changed

+13/−6 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,5 +1,8 @@ Changelog for HLint +1.9.24+    #188, improve spotting redundant brackets around patterns+    #138, reenable redundant where hint 1.9.23     #184, require haskell-src-exts-1.17     #183, allow test_ as a prefix
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.6 build-type:         Simple name:               hlint-version:            1.9.23+version:            1.9.24 license:            BSD3 license-file:       LICENSE category:           Development@@ -11,7 +11,7 @@ synopsis:           Source code suggestions description:     HLint gives suggestions on how to improve your source code.-homepage:           http://community.haskell.org/~ndm/hlint/+homepage:           https://github.com/ndmitchell/hlint#readme bug-reports:        https://github.com/ndmitchell/hlint/issues data-dir:           data data-files:
src/HSE/Bracket.hs view
@@ -95,6 +95,7 @@         PParen{} -> True         PTuple{} -> True         PList{} -> True+        PRec{} -> True         PVar{} -> True         PApp _ _ [] -> True         PWildCard{} -> True
src/Hint/Bracket.hs view
@@ -31,8 +31,11 @@ data Foo = Foo {foo :: (Maybe Foo)} -- @Warning foo :: Maybe Foo  -- pattern bracket reduction-foo (True) = 1-foo ((True)) = 1 -- @Error True+foo (x:xs) = 1+foo (True) = 1 -- @Error True+foo ((True)) = 1 -- @Error (True)+foo (A{}) = True -- A{}+f x = case x of (Nothing) -> 1; _ -> 2 -- Nothing  -- dollar reduction tests no = groupFsts . sortFst $ mr@@ -99,7 +102,7 @@         -- f (Maybe (index, parent, gen)) child         f :: (Data (a S), Annotated a, Uniplate (a S), ExactP a, Pretty (a S), Brackets (a S)) => Maybe (Int,a S,a S -> a S) -> a S -> [Idea]         f Just{} o@(remParen -> Just x) | isAtom x = bracketError msg o x : g x-        f Nothing o@(remParen -> Just x) | bad = bracketWarning msg o x : g x+        f Nothing o@(remParen -> Just x) | bad || isAtom x = (if isAtom x then bracketError else bracketWarning) msg o x : g x         f (Just (i,o,gen)) v@(remParen -> Just x) | not $ needBracket i o x =           warn msg o (gen x) [r] : g x           where
src/Hint/Structure.hs view
@@ -97,7 +97,7 @@     | prettyPrint test `elem` ["otherwise","True"]     = [gen "Redundant guard" (Pattern l t pats (UnGuardedRhs an bod) bind) [Delete Stmt (toSS test)]] -hints gen (Pattern l t pats bod (Just bind)) | f bind && False -- disabled due to bug #138+hints gen (Pattern l t pats bod (Just bind)) | f bind     = [gen "Redundant where" (Pattern l t pats bod Nothing) []]     where         f (BDecls _ x) = null x