commit hlint for openSUSE:Factory
Hello community, here is the log from the commit of package hlint for openSUSE:Factory checked in at 2016-06-02 09:38:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-03-26 15:22:36.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.hlint.new/hlint.changes 2016-06-02 09:38:07.000000000 +0200 @@ -1,0 +2,9 @@ +Fri Mar 25 08:07:37 UTC 2016 - mimi.vx@gmail.com + +- updateto 1.9.32 +* require cpphs-1.20.1, has important fixes +* treat select $ specially, as per esqueleto conventions +* don't modify qualification on substitutions +* add void/mapM_/forM_ hints + +------------------------------------------------------------------- Old: ---- hlint-1.9.31.tar.gz New: ---- hlint-1.9.32.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hlint.spec ++++++ --- /var/tmp/diff_new_pack.eDvk2K/_old 2016-06-02 09:38:08.000000000 +0200 +++ /var/tmp/diff_new_pack.eDvk2K/_new 2016-06-02 09:38:08.000000000 +0200 @@ -20,7 +20,7 @@ # no useful debuginfo for Haskell packages without C sources %global debug_package %{nil} Name: hlint -Version: 1.9.31 +Version: 1.9.32 Release: 0 Summary: Source code suggestions License: BSD-3-Clause ++++++ hlint-1.9.31.tar.gz -> hlint-1.9.32.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/CHANGES.txt new/hlint-1.9.32/CHANGES.txt --- old/hlint-1.9.31/CHANGES.txt 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/CHANGES.txt 2016-03-23 11:47:29.000000000 +0100 @@ -1,5 +1,10 @@ Changelog for HLint +1.9.32 + #53, require cpphs-1.20.1, has important fixes + #224, treat select $ specially, as per esqueleto conventions + #231, don't modify qualification on substitutions + #229, add void/mapM_/forM_ hints 1.9.31 #222, don't suggest removing ~ if the Strict extension is on 1.9.30 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/README.md new/hlint-1.9.32/README.md --- old/hlint-1.9.31/README.md 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/README.md 2016-03-23 11:47:29.000000000 +0100 @@ -209,7 +209,7 @@ warn = concat (map f x) ==> concatMap f x -The line can be read as replace `concat (map f x)` with `concatMap f x`. All single-letter variables are treated as substitution parameters. For examples of more complex hints see the supplied hints file. In general, hints should not be given in point free style, as this reduces the power of the matching. Hints may start with `error`, `warn` or `suggest` to denote how severe they are by default. In addition, `hint` is a synonym for `suggest`. If you come up with interesting hints, please submit them for inclusion. +This line can be read as replace `concat (map f x)` with `concatMap f x`. All single-letter variables are treated as substitution parameters. For examples of more complex hints see the supplied hints file. This hint will automatically match `concat . map f` and `concat $ map f x`, so there is no need to give eta-reduced variants of the hints. Hints may start with `error`, `warn` or `suggest` to denote how severe they are by default. In addition, `hint` is a synonym for `suggest`. If you come up with interesting hints, please submit them for inclusion. You can search for possible hints to add from a source file with the `--find` flag, for example: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/data/Default.hs new/hlint-1.9.32/data/Default.hs --- old/hlint-1.9.31/data/Default.hs 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/data/Default.hs 2016-03-23 11:47:29.000000000 +0100 @@ -328,6 +328,12 @@ warn = a >> forever a ==> forever a where _ = noQuickCheck hint = liftM2 id ==> ap where _ = noQuickCheck warn = mapM (uncurry f) (zip l m) ==> zipWithM f l m where _ = noQuickCheck +warn = mapM_ (void . f) ==> mapM_ f +warn = mapM_ (void f) ==> mapM_ f +warn = forM_ x (void . f) ==> forM_ x f +warn = forM_ x (void f) ==> forM_ x f +warn = void (mapM f x) ==> mapM_ f x +warn = void (forM x f) ==> forM_ x f -- STATE MONAD @@ -724,5 +730,8 @@ main = DTL.concat $ map (`DTL.snoc` '-') [DTL.pack "one", DTL.pack "two", DTL.pack "three"] import Text.Blaze.Html5.Attributes as A \ main = A.id (stringValue id') +import Prelude((==)) \ +import qualified Prelude as P \ +main = P.length xs == 0 -- P.null xs </TEST> -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/hlint.cabal new/hlint-1.9.32/hlint.cabal --- old/hlint-1.9.31/hlint.cabal 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/hlint.cabal 2016-03-23 11:47:29.000000000 +0100 @@ -1,7 +1,7 @@ cabal-version: >= 1.8 build-type: Simple name: hlint -version: 1.9.31 +version: 1.9.32 license: BSD3 license-file: LICENSE category: Development @@ -47,7 +47,7 @@ build-depends: base == 4.*, process, filepath, directory, containers, transformers, - cpphs >= 1.18.1, + cpphs >= 1.20.1, cmdargs >= 0.10, haskell-src-exts >= 1.17 && < 1.18, uniplate >= 1.5, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/src/HSE/Bracket.hs new/hlint-1.9.32/src/HSE/Bracket.hs --- old/hlint-1.9.31/src/HSE/Bracket.hs 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/src/HSE/Bracket.hs 2016-03-23 11:47:29.000000000 +0100 @@ -1,6 +1,9 @@ {-# LANGUAGE PatternGuards, TypeSynonymInstances, FlexibleInstances #-} -module HSE.Bracket where +module HSE.Bracket( + Brackets(..), + paren, transformBracket, rebracket1, appsBracket + ) where import HSE.Type import HSE.Util diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/src/HSE/Match.hs new/hlint-1.9.32/src/HSE/Match.hs --- old/hlint-1.9.31/src/HSE/Match.hs 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/src/HSE/Match.hs 2016-03-23 11:47:29.000000000 +0100 @@ -1,6 +1,10 @@ {-# LANGUAGE ViewPatterns, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-} -module HSE.Match where +module HSE.Match( + View(..), Named(..), + (~=), isSym, + App2(..), PVar_(..), Var_(..), PApp_(..) + ) where import Data.Char import HSE.Type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/src/HSE/Util.hs new/hlint-1.9.32/src/HSE/Util.hs --- old/hlint-1.9.31/src/HSE/Util.hs 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/src/HSE/Util.hs 2016-03-23 11:47:29.000000000 +0100 @@ -1,6 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} -module HSE.Util where +module HSE.Util(module HSE.Util) where import Control.Monad import Data.List diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/src/Hint/Bracket.hs new/hlint-1.9.32/src/Hint/Bracket.hs --- old/hlint-1.9.31/src/Hint/Bracket.hs 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/src/Hint/Bracket.hs 2016-03-23 11:47:29.000000000 +0100 @@ -56,6 +56,9 @@ -- annotations main = 1; {-# ANN module ("HLint: ignore Use camelCase" :: String) #-} main = 1; {-# ANN module (1 + (2)) #-} -- 2 + +-- special cases (from esqueleto, see #224) +main = operate <$> (select $ from $ \user -> return $ user ^. UserEmail) </TEST> -} @@ -134,6 +137,7 @@ ++ [suggest "Move brackets to avoid $" x (t y) [r] |(t, e@(Paren _ (InfixApp _ a1 op1 a2))) <- splitInfix x ,opExp op1 ~= "$", isVar a1 || isApp a1 || isParen a1, not $ isAtom a2 + ,not $ a1 ~= "select" -- special case for esqueleto, see #224 , let y = App an a1 (Paren an a2) , let r = Replace Expr (toSS e) [("a", toSS a1), ("b", toSS a2)] "a (b)" ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/src/Hint/Match.hs new/hlint-1.9.32/src/Hint/Match.hs --- old/hlint-1.9.31/src/Hint/Match.hs 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/src/Hint/Match.hs 2016-03-23 11:47:29.000000000 +0100 @@ -104,9 +104,11 @@ let nm a b = scopeMatch (hintRuleScope,a) (s,b) u <- unifyExp nm True hintRuleLHS x u <- check u + -- need to check free vars before unqualification, but after subst (with e) + -- need to unqualify before substitution (with res) let e = subst u hintRuleRHS template = substT u hintRuleRHS - let res = addBracket parent $ unqualify hintRuleScope s u $ performEval e + res = addBracket parent $ performEval $ subst u $ unqualify hintRuleScope s u hintRuleRHS guard $ (freeVars e Set.\\ Set.filter (not . isUnifyVar) (freeVars hintRuleRHS)) `Set.isSubsetOf` freeVars x -- check no unexpected new free variables @@ -301,6 +303,7 @@ where f (Qual _ (ModuleName _ [m]) x) | Just y <- fromNamed <$> lookup [m] subs = if null y then UnQual an x else Qual an (ModuleName an y) x + f x@(UnQual _ (Ident _ s)) | isUnifyVar s = x f x = scopeMove (from,x) to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/src/Main.hs new/hlint-1.9.32/src/Main.hs --- old/hlint-1.9.31/src/Main.hs 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/src/Main.hs 2016-03-23 11:47:29.000000000 +0100 @@ -1,5 +1,5 @@ -module Main where +module Main(main) where import Language.Haskell.HLint3 import Control.Monad diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.31/src/Refact.hs new/hlint-1.9.32/src/Refact.hs --- old/hlint-1.9.31/src/Refact.hs 2016-03-01 15:24:57.000000000 +0100 +++ new/hlint-1.9.32/src/Refact.hs 2016-03-23 11:47:29.000000000 +0100 @@ -1,4 +1,4 @@ -module Refact where +module Refact(toRefactSrcSpan, toSS) where import qualified Refact.Types as R import HSE.All
participants (1)
-
root@hilbert.suse.de