packages feed

hlint 1.8.37 → 1.8.39

raw patch · 4 files changed

+8/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

data/Default.hs view
@@ -147,8 +147,8 @@  error = (\x -> x) ==> id error = (\x y -> x) ==> const-error = (\(_,y) -> y) ==> snd-error = (\(x,_) -> x) ==> fst+error = (\(x,y) -> y) ==> snd where _ = notIn x y+error = (\(x,y) -> x) ==> fst where _ = notIn y x warn "Use curry" = (\x y-> f (x,y)) ==> curry f where _ = notIn [x,y] f warn "Use uncurry" = (\(x,y) -> f x y) ==> uncurry f where _ = notIn [x,y] f error "Redundant $" = (($) . f) ==> f@@ -506,6 +506,7 @@ foo = evaluate [12] -- return [12] test = \ a -> f a >>= \ b -> return (a, b) fooer input = catMaybes . map Just $ input -- mapMaybe Just+main = print $ map (\_->5) [2,3,5] -- const 5  import Prelude \ yes = flip mapM -- Control.Monad.forM
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.6 build-type:         Simple name:               hlint-version:            1.8.37+version:            1.8.39 license:            BSD3 license-file:       LICENSE category:           Development
src/Hint/Match.hs view
@@ -131,7 +131,7 @@  unifyPat :: NameMatch -> Pat_ -> Pat_ -> Maybe [(String,Exp_)] unifyPat nm (PVar _ x) (PVar _ y) = Just [(fromNamed x, toNamed $ fromNamed y)]-unifyPat nm PWildCard{} PVar{} = Just []+unifyPat nm (PVar _ x) PWildCard{} = Just [(fromNamed x, toNamed $ "_" ++ fromNamed x)] unifyPat nm x y = unifyDef nm x y   
src/Hint/Naming.hs view
@@ -3,7 +3,7 @@     Suggest the use of camelCase      Only permit:-    _*[A-Za-z]*_*'*+    _*[A-Za-z]*_*#*'*      Apply this to things that would get exported by default only     Also allow prop_ as it's a standard QuickCheck idiom@@ -24,6 +24,7 @@ data Yes = FOO_A | Foo_B -- data Yes = FOO_A | FooB case_foo = 1 cast_foo = 1 -- castFoo = ...+runMutator# = 1 </TEST> -} @@ -80,7 +81,7 @@ suggestName :: String -> Maybe String suggestName x = listToMaybe [f x | not $ isSym x || good || not (any isLower x) || "prop_" `isPrefixOf` x || "case_" `isPrefixOf` x]     where-        good = all isAlphaNum $ drp '_' $ drp '\'' $ reverse $ drp '_' x+        good = all isAlphaNum $ drp '_' $ drp '#' $ drp '\'' $ reverse $ drp '_' x         drp x = dropWhile (== x)          f xs = us ++ g ys