Hello community, here is the log from the commit of package hlint for openSUSE:Factory checked in at 2016-06-07 23:48:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-06-02 09:38:07.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.hlint.new/hlint.changes 2016-06-07 23:48:19.000000000 +0200 @@ -1,0 +2,10 @@ +Thu Jun 2 04:55:23 UTC 2016 - mimi.vx@gmail.com + +- update to 1.9.34 +* fix some incorrect line numbers in literate Haskell +* fix literate Haskell and CPP +* remove type-incorrect "on" hint +* warn about join seq +* suggest <|> instead of mplus in a few cases + +------------------------------------------------------------------- Old: ---- hlint-1.9.32.tar.gz New: ---- hlint-1.9.34.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hlint.spec ++++++ --- /var/tmp/diff_new_pack.dNp2xS/_old 2016-06-07 23:48:20.000000000 +0200 +++ /var/tmp/diff_new_pack.dNp2xS/_new 2016-06-07 23:48:20.000000000 +0200 @@ -18,9 +18,8 @@ %global pkg_name hlint # no useful debuginfo for Haskell packages without C sources -%global debug_package %{nil} Name: hlint -Version: 1.9.32 +Version: 1.9.34 Release: 0 Summary: Source code suggestions License: BSD-3-Clause ++++++ hlint-1.9.32.tar.gz -> hlint-1.9.34.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/CHANGES.txt new/hlint-1.9.34/CHANGES.txt --- old/hlint-1.9.32/CHANGES.txt 2016-03-23 11:47:29.000000000 +0100 +++ new/hlint-1.9.34/CHANGES.txt 2016-06-01 12:15:21.000000000 +0200 @@ -1,5 +1,12 @@ Changelog for HLint +1.9.34 + #154, fix some incorrect line numbers in literate Haskell + #161, fix literate Haskell and CPP +1.9.33 + #240, remove type-incorrect "on" hint + #234, warn about join seq + #232, suggest <|> instead of mplus in a few cases 1.9.32 #53, require cpphs-1.20.1, has important fixes #224, treat select $ specially, as per esqueleto conventions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/data/Default.hs new/hlint-1.9.34/data/Default.hs --- old/hlint-1.9.32/data/Default.hs 2016-03-23 11:47:29.000000000 +0100 +++ new/hlint-1.9.34/data/Default.hs 2016-06-01 12:15:21.000000000 +0200 @@ -225,7 +225,6 @@ warn "Redundant $" = (f $) ==> f hint = (\x -> y) ==> const y where _ = isAtom y && not (isWildcard y) warn "Redundant flip" = flip f x y ==> f y x where _ = isApp original -hint = (\a b -> g (f a) (f b)) ==> g `Data.Function.on` f warn "Evaluate" = id x ==> x warn "Redundant id" = id . x ==> x warn "Redundant id" = x . id ==> x @@ -374,6 +373,7 @@ -- SEQ warn "Redundant seq" = x `seq` x ==> x +warn "Redundant seq" = join seq ==> id warn "Redundant $!" = id $! x ==> x warn "Redundant seq" = x `seq` y ==> y where _ = isWHNF x warn "Redundant $!" = f $! x ==> f x where _ = isWHNF x @@ -399,7 +399,7 @@ warn = Nothing /= x ==> Data.Maybe.isJust x warn = concatMap (maybeToList . f) ==> Data.Maybe.mapMaybe f warn = concatMap maybeToList ==> catMaybes -warn = maybe n Just x ==> Control.Monad.mplus x n +warn = maybe n Just x ==> x Control.Applicative.<|> n hint = (case x of Just a -> a; Nothing -> y) ==> fromMaybe y x warn = (if isNothing x then y else fromJust x) ==> fromMaybe y x warn = (if isJust x then fromJust x else y) ==> fromMaybe y x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/hlint.cabal new/hlint-1.9.34/hlint.cabal --- old/hlint-1.9.32/hlint.cabal 2016-03-23 11:47:29.000000000 +0100 +++ new/hlint-1.9.34/hlint.cabal 2016-06-01 12:15:21.000000000 +0200 @@ -1,7 +1,7 @@ cabal-version: >= 1.8 build-type: Simple name: hlint -version: 1.9.32 +version: 1.9.34 license: BSD3 license-file: LICENSE category: Development diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/src/HSE/All.hs new/hlint-1.9.34/src/HSE/All.hs --- old/hlint-1.9.32/src/HSE/All.hs 2016-03-23 11:47:29.000000000 +0100 +++ new/hlint-1.9.34/src/HSE/All.hs 2016-06-01 12:15:21.000000000 +0200 @@ -21,6 +21,8 @@ import Language.Preprocessor.Cpphs import qualified Data.Map as Map import System.IO +import Data.Functor +import Prelude -- | Created with 'defaultParseFlags', used by 'parseModuleEx'. @@ -50,7 +52,7 @@ runCpp :: CppFlags -> FilePath -> String -> IO String runCpp NoCpp _ x = return x runCpp CppSimple _ x = return $ unlines [if "#" `isPrefixOf` trimStart x then "" else x | x <- lines x] -runCpp (Cpphs o) file x = runCpphs o file x +runCpp (Cpphs o) file x = drop 1 . dropWhile (/= '\n') <$> runCpphs o file x --------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/src/HSE/Bracket.hs new/hlint-1.9.34/src/HSE/Bracket.hs --- old/hlint-1.9.32/src/HSE/Bracket.hs 2016-03-23 11:47:29.000000000 +0100 +++ new/hlint-1.9.34/src/HSE/Bracket.hs 2016-06-01 12:15:21.000000000 +0200 @@ -1,4 +1,5 @@ {-# LANGUAGE PatternGuards, TypeSynonymInstances, FlexibleInstances #-} +{-# OPTIONS_GHC -fno-warn-overlapping-patterns -fno-warn-incomplete-patterns #-} module HSE.Bracket( Brackets(..), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/src/HSE/FreeVars.hs new/hlint-1.9.34/src/HSE/FreeVars.hs --- old/hlint-1.9.32/src/HSE/FreeVars.hs 2016-03-23 11:47:29.000000000 +0100 +++ new/hlint-1.9.34/src/HSE/FreeVars.hs 2016-06-01 12:15:21.000000000 +0200 @@ -1,6 +1,6 @@ {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} -module HSE.FreeVars(FreeVars, freeVars, vars, varss, pvars, declBind) where +module HSE.FreeVars(FreeVars, freeVars, vars, varss, pvars) where import Data.Monoid import HSE.Type as HSE @@ -9,10 +9,6 @@ import Prelude --- which names are bound by a declaration -declBind :: Decl_ -> [String] -declBind = pvars - vars x = Set.toList $ freeVars x varss x = Set.toList $ free $ allVars x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/src/HSE/Util.hs new/hlint-1.9.34/src/HSE/Util.hs --- old/hlint-1.9.32/src/HSE/Util.hs 2016-03-23 11:47:29.000000000 +0100 +++ new/hlint-1.9.34/src/HSE/Util.hs 2016-06-01 12:15:21.000000000 +0200 @@ -263,9 +263,6 @@ f (x:xs) = x : f xs f [] = [] -toSrcLoc :: SrcSpanInfo -> SrcLoc -toSrcLoc = getPointLoc - toSrcSpan :: SrcSpanInfo -> SrcSpan toSrcSpan (SrcSpanInfo x _) = x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/src/Hint/All.hs new/hlint-1.9.34/src/Hint/All.hs --- old/hlint-1.9.32/src/Hint/All.hs 2016-03-23 11:47:29.000000000 +0100 +++ new/hlint-1.9.34/src/Hint/All.hs 2016-06-01 12:15:21.000000000 +0200 @@ -1,14 +1,13 @@ module Hint.All( Hint(..), HintBuiltin(..), DeclHint, ModuHint, - resolveHints, hintRules, resolveBuiltin, builtinHints + resolveHints, hintRules, builtinHints ) where import Data.Monoid import Settings import Data.Either import Data.List -import Data.Maybe import Hint.Type import Prelude @@ -68,9 +67,5 @@ resolveHints xs = mconcat $ mempty{hintDecl=readMatch rights} : map builtin (nub lefts) where (lefts,rights) = partitionEithers xs -resolveBuiltin :: [String] -> [Hint] -resolveBuiltin builtin = map f $ nub $ concat [if x == "All" then map fst builtinHints else [x] | x <- builtin] - where f x = fromMaybe (error $ "Unknown builtin hints: HLint.Builtin." ++ x) $ lookup x builtinHints - hintRules :: [HintRule] -> Hint hintRules = resolveHints . map Right diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hlint-1.9.32/src/Language/Haskell/HLint2.hs new/hlint-1.9.34/src/Language/Haskell/HLint2.hs --- old/hlint-1.9.32/src/Language/Haskell/HLint2.hs 2016-03-23 11:47:28.000000000 +0100 +++ new/hlint-1.9.34/src/Language/Haskell/HLint2.hs 2016-06-01 12:15:21.000000000 +0200 @@ -38,6 +38,7 @@ import Paths_hlint import Control.Applicative +import Data.Maybe import Data.Monoid import Data.Tuple.Extra import Data.List.Extra @@ -49,6 +50,11 @@ getHLintDataDir :: IO FilePath getHLintDataDir = getDataDir +resolveBuiltin :: [String] -> [Hint] +resolveBuiltin builtin = map f $ nub $ concat [if x == "All" then map fst builtinHints else [x] | x <- builtin] + where f x = fromMaybe (error $ "Unknown builtin hints: HLint.Builtin." ++ x) $ lookup x builtinHints + + -- | The function produces a tuple containg 'ParseFlags' (for 'parseModuleEx'), and 'Classify' and 'Hint' for 'applyHints'. -- It approximates the normal HLint configuration steps, roughly: --