hlint 1.6.6 → 1.6.7
raw patch · 2 files changed
+16/−7 lines, 2 files
Files
- hlint.cabal +8/−3
- src/Hint/Extensions.hs +8/−4
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.6 build-type: Simple name: hlint-version: 1.6.6+version: 1.6.7 license: GPL license-file: LICENSE category: Development@@ -23,16 +23,21 @@ report.html hs-lint.el hlint.1-Extra-Source-Files:+extra-source-files: hlint.htm +flag threaded+ default: True+ description: Build with support for multithreaded execution executable hlint build-depends: base == 4.*, syb, filepath, directory, mtl, containers, hscolour >= 1.15, cpphs >= 1.7, haskell-src-exts == 1.1.*, uniplate == 1.2.* && >= 1.2.0.2 - ghc-options: -fno-warn-overlapping-patterns -threaded+ ghc-options: -fno-warn-overlapping-patterns+ if flag(threaded)+ ghc-options: -threaded -- ViewPatterns not yet supported by Cabal as an extension -- extensions: ViewPatterns, PatternGuards, MultiParamTypeClasses
src/Hint/Extensions.hs view
@@ -26,15 +26,15 @@ used RecursiveDo x = any isMDo $ universeBi x used ParallelListComp x = any isParComp $ universeBi x used FunctionalDependencies x = any isFunDep $ universeBi x-used ImplicitParams x = not $ null (universeBi x :: [IPName])+used ImplicitParams x = has x (undefined :: IPName) used EmptyDataDecls x = any f $ universeBi x where f (DataDecl _ _ _ _ _ [] _) = True f (GDataDecl _ _ _ _ _ _ [] _) = True f _ = False-used KindSignatures x = not $ null (universeBi x :: [Kind])+used KindSignatures x = has x (undefined :: Kind) used BangPatterns x = any isPBangPat $ universeBi x-used TemplateHaskell x = not (null (universeBi x :: [Bracket])) && not (null (universeBi x :: [Splice]))-used ForeignFunctionInterface x = not $ null (universeBi x :: [CallConv])+used TemplateHaskell x = has x (undefined :: Bracket) || has x (undefined :: Splice)+used ForeignFunctionInterface x = has x (undefined :: CallConv) used Generics x = any isPExplTypeArg $ universeBi x used PatternGuards x = any f $ universeBi x where f (GuardedRhs _ [] _) = False@@ -54,8 +54,12 @@ f RightArrApp{} = True f LeftArrHighApp{} = True f RightArrHighApp{} = True+ f _ = False used TransformListComp x = any f $ universeBi x where f QualStmt{} = False f _ = True used _ _ = True+++has x t = not $ null (universeBi x `asTypeOf` [t])