Hello community,

here is the log from the commit of package hlint for openSUSE:Factory checked 
in at 2016-02-29 09:14:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hlint (Old)
 and      /work/SRC/openSUSE:Factory/.hlint.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hlint"

Changes:
--------
--- /work/SRC/openSUSE:Factory/hlint/hlint.changes      2016-02-11 
12:37:29.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.hlint.new/hlint.changes 2016-02-29 
09:16:11.000000000 +0100
@@ -1,0 +2,8 @@
+Sun Feb 28 21:42:14 UTC 2016 - [email protected]
+
+- update to 1.9.30
+* fix incorrect hints of foldr/foldl on a tuple accumulator
+* add warnings about foldable methods on tuple
+* Put warnings before suggestions in the HTML report
+
+-------------------------------------------------------------------

Old:
----
  hlint-1.9.28.tar.gz

New:
----
  hlint-1.9.30.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hlint.spec ++++++
--- /var/tmp/diff_new_pack.ZKYdIr/_old  2016-02-29 09:16:13.000000000 +0100
+++ /var/tmp/diff_new_pack.ZKYdIr/_new  2016-02-29 09:16:13.000000000 +0100
@@ -20,7 +20,7 @@
 # no useful debuginfo for Haskell packages without C sources
 %global debug_package %{nil}
 Name:           hlint
-Version:        1.9.28
+Version:        1.9.30
 Release:        0
 Summary:        Source code suggestions
 License:        BSD-3-Clause

++++++ hlint-1.9.28.tar.gz -> hlint-1.9.30.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hlint-1.9.28/CHANGES.txt new/hlint-1.9.30/CHANGES.txt
--- old/hlint-1.9.28/CHANGES.txt        2016-02-04 09:55:19.000000000 +0100
+++ new/hlint-1.9.30/CHANGES.txt        2016-02-26 21:55:03.000000000 +0100
@@ -1,5 +1,10 @@
 Changelog for HLint
 
+1.9.30
+    #220, fix incorrect hints of foldr/foldl on a tuple accumulator
+1.9.29
+    #219, add warnings about foldable methods on tuple
+    Put warnings before suggestions in the HTML report
 1.9.28
     #215, spot newtype deriving inside classes
 1.9.27
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hlint-1.9.28/data/Default.hs 
new/hlint-1.9.30/data/Default.hs
--- old/hlint-1.9.28/data/Default.hs    2016-02-04 09:55:19.000000000 +0100
+++ new/hlint-1.9.30/data/Default.hs    2016-02-26 21:55:03.000000000 +0100
@@ -509,6 +509,51 @@
 warn "Evaluate" = zip [] [] ==> []
 warn "Evaluate" = const x y ==> x
 
+-- FOLDABLE + TUPLES
+
+warn "Using foldr on tuple"   = foldr   f z (x,b) ==> f b z
+warn "Using foldr' on tuple"  = foldr'  f z (x,b) ==> f b z
+warn "Using foldl on tuple"   = foldl   f z (x,b) ==> f z b
+warn "Using foldl' on tuple"  = foldl'  f z (x,b) ==> f z b
+warn "Using foldMap on tuple" = foldMap f   (x,b) ==> f b
+warn "Using foldr1 on tuple"  = foldr1  f   (x,b) ==> b
+warn "Using foldl1 on tuple"  = foldl1  f   (x,b) ==> b
+warn "Using elem on tuple"    = elem    e   (x,b) ==> e == b
+warn "Using fold on tuple"    = fold        (x,b) ==> b
+warn "Using toList on tuple"  = toList      (x,b) ==> b
+warn "Using maximum on tuple" = maximum     (x,b) ==> b
+warn "Using minimum on tuple" = minimum     (x,b) ==> b
+warn "Using sum on tuple"     = sum         (x,b) ==> b
+warn "Using product on tuple" = product     (x,b) ==> b
+warn "Using concat on tuple"  = concat      (x,b) ==> b
+warn "Using and on tuple"     = and         (x,b) ==> b
+warn "Using or on tuple"      = or          (x,b) ==> b
+warn "Using any on tuple"     = any     f   (x,b) ==> f b
+warn "Using all on tuple"     = all     f   (x,b) ==> f b
+
+warn "Using foldr on tuple"   = foldr   f z (x,y,b) ==> f b z
+warn "Using foldr' on tuple"  = foldr'  f z (x,y,b) ==> f b z
+warn "Using foldl on tuple"   = foldl   f z (x,y,b) ==> f z b
+warn "Using foldl' on tuple"  = foldl'  f z (x,y,b) ==> f z b
+warn "Using foldMap on tuple" = foldMap f   (x,y,b)   ==> f b
+warn "Using foldr1 on tuple"  = foldr1  f   (x,y,b)   ==> b
+warn "Using foldl1 on tuple"  = foldl1  f   (x,y,b)   ==> b
+warn "Using elem on tuple"    = elem    e   (x,y,b)   ==> e == b
+warn "Using fold on tuple"    = fold        (x,y,b)   ==> b
+warn "Using toList on tuple"  = toList      (x,y,b)   ==> b
+warn "Using maximum on tuple" = maximum     (x,y,b)   ==> b
+warn "Using minimum on tuple" = minimum     (x,y,b)   ==> b
+warn "Using sum on tuple"     = sum         (x,y,b)   ==> b
+warn "Using product on tuple" = product     (x,y,b)   ==> b
+warn "Using concat on tuple"  = concat      (x,y,b)   ==> b
+warn "Using and on tuple"     = and         (x,y,b)   ==> b
+warn "Using or on tuple"      = or          (x,y,b)   ==> b
+warn "Using any on tuple"     = any     f   (x,y,b)   ==> f b
+warn "Using all on tuple"     = all     f   (x,y,b)   ==> f b
+
+warn "Using null on tuple"   = null x   ==> False where _ = isTuple x
+warn "Using length on tuple" = length x ==> 1     where _ = isTuple x
+
 -- COMPLEX
 
 {-
@@ -653,6 +698,7 @@
 foo = (\a -> Foo {..}) 1
 foo = zipWith SymInfo [0 ..] (repeat ty) -- map (\ x -> SymInfo x ty) [0 ..]
 f rec = rec
+mean x = fst $ foldl (\(m, n) x' -> (m+(x'-m)/(n+1),n+1)) (0,0) x
 
 import Prelude \
 yes = flip mapM -- Control.Monad.forM
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hlint-1.9.28/hlint.cabal new/hlint-1.9.30/hlint.cabal
--- old/hlint-1.9.28/hlint.cabal        2016-02-04 09:55:19.000000000 +0100
+++ new/hlint-1.9.30/hlint.cabal        2016-02-26 21:55:03.000000000 +0100
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.8
 build-type:         Simple
 name:               hlint
-version:            1.9.28
+version:            1.9.30
 license:            BSD3
 license-file:       LICENSE
 category:           Development
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hlint-1.9.28/src/Report.hs 
new/hlint-1.9.30/src/Report.hs
--- old/hlint-1.9.28/src/Report.hs      2016-02-04 09:55:19.000000000 +0100
+++ new/hlint-1.9.30/src/Report.hs      2016-02-26 21:55:03.000000000 +0100
@@ -4,7 +4,7 @@
 
 import Idea
 import Data.Tuple.Extra
-import Data.List
+import Data.List.Extra
 import Data.Maybe
 import Data.Version
 import System.FilePath
@@ -27,9 +27,9 @@
 writeReport dataDir file ideas = writeTemplate dataDir inner file
     where
         generateIds :: [String] -> [(String,Int)] -- sorted by name
-        generateIds = map (head &&& length) . group . sort
-        files = generateIds $ map (srcSpanFilename . ideaSpan) ideas
-        hints = generateIds $ map hintName ideas
+        generateIds = map (head &&& length) . group -- must be already sorted
+        files = generateIds $ sort $ map (srcSpanFilename . ideaSpan) ideas
+        hints = generateIds $ map hintName $ sortOn (negate . fromEnum . 
ideaSeverity &&& hintName) ideas
         hintName x = show (ideaSeverity x) ++ ": " ++ ideaHint x
 
         inner = [("VERSION",['v' : showVersion version]),("CONTENT",content),


Reply via email to