hlint 1.8.44 → 1.8.45
raw patch · 2 files changed
+10/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hlint.cabal +1/−1
- src/Hint/Structure.hs +9/−0
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.6 build-type: Simple name: hlint-version: 1.8.44+version: 1.8.45 license: BSD3 license-file: LICENSE category: Development
src/Hint/Structure.hs view
@@ -30,6 +30,8 @@ foo = case v of !(x : xs) -> x -- (x:xs) foo = case v of !1 -> x -- 1 foo = case v of !x -> x+foo = let ~x = 1 in y -- x+foo = let ~(x:xs) = y in z </TEST> -} @@ -108,9 +110,16 @@ patHint o@(PApp _ name args) | length args >= 3 && all isPWildCard args = [warn "Use record patterns" o $ PRec an name []] patHint o@(PBangPat _ x) | f x = [err "Redundant bang pattern" o x] where f (PParen _ x) = f x+ f (PAsPat _ _ x) = f x f PLit{} = True f PApp{} = True f PInfixApp{} = True+ f _ = False+patHint o@(PIrrPat _ x) | f x = [err "Redundant irrefutable pattern" o x]+ where f (PParen _ x) = f x+ f (PAsPat _ _ x) = f x+ f PWildCard{} = True+ f PVar{} = True f _ = False patHint _ = []