Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
- ignore: {name: "Avoid lambda"} # 51 hints
- ignore: {name: "Avoid lambda using `infix`"} # 23 hints
- ignore: {name: "Eta reduce"} # 138 hints
- ignore: {name: "Evaluate"} # 10 hints
- ignore: {name: "Functor law"} # 10 hints
- ignore: {name: "Hoist not"} # 16 hints
- ignore: {name: "Monoid law, left identity"} # 3 hints
- ignore: {name: "Monoid law, right identity"} # 3 hints
- ignore: {name: "Move filter"} # 4 hints
- ignore: {name: "Move guards forward"} # 4 hints
- ignore: {name: "Move guards forward"} # 5 hints
- ignore: {name: "Redundant $!"} # 1 hint
- ignore: {name: "Redundant <$>"} # 17 hints
- ignore: {name: "Redundant bracket"} # 256 hints
- ignore: {name: "Redundant bracket"} # 257 hints
- ignore: {name: "Redundant guard"} # 2 hints
- ignore: {name: "Redundant if"} # 6 hints
- ignore: {name: "Redundant lambda"} # 19 hints
Expand Down Expand Up @@ -58,6 +57,8 @@
- --ignore-glob=Cabal-syntax/src/Distribution/Fields/Lexer.hs
- --ignore-glob=Cabal-tests/tests/custom-setup/CabalDoctestSetup.hs
- --ignore-glob=Cabal-tests/tests/custom-setup/IdrisSetup.hs
# TODO: Remove --ignore-glob for ghc-supported-languages.hs when this module compiles
- --ignore-glob=Cabal-tests/tests/misc/ghc-supported-languages.hs
- --ignore-glob=cabal-testsuite/PackageTests/BuildWays/q/app/Main.hs
- --ignore-glob=cabal-testsuite/PackageTests/CMain/10168/src/Lib.hs
- --ignore-glob=cabal-testsuite/PackageTests/CmmSources/src/Demo.hs
Expand Down
4 changes: 1 addition & 3 deletions Cabal/src/Distribution/PackageDescription/Check/Target.hs
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,7 @@ checkBuildInfoExtensions bi = do
, DeriveDataTypeable
, ConstrainedClassMethods
]
++ map
DisableExtension
[MonoPatBinds]
++ [DisableExtension MonoPatBinds]

-- Autogenerated modules (Paths_, PackageInfo_) checks. We could pass this
-- function something more specific than the whole BuildInfo, but it would be
Expand Down
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/Simple/Haddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ haddockPackagePaths ipkgs mkHtmlPath = do
return (flags, if null missing then Nothing else Just warning)
where
-- Don't warn about missing documentation for these packages. See #1231.
noHaddockWhitelist = map mkPackageName ["rts"]
noHaddockWhitelist = [mkPackageName "rts"]

-- Actually extract interface and HTML paths from an 'InstalledPackageInfo'.
interfaceAndHtmlPath
Expand Down
5 changes: 1 addition & 4 deletions Cabal/src/Distribution/Simple/Setup/Haddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,7 @@ haddockProjectOptions showOrParseArgs =
[ option
""
["hackage"]
( concat
[ "A short-cut option to build documentation linked to hackage."
]
)
"A short-cut option to build documentation linked to hackage."
haddockProjectHackage
(\v flags -> flags{haddockProjectHackage = v})
trueArg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ driverFunctionTest pkgIx srcDb comp =
_libSourceDirs lib @?= ["src"]
_libLanguage lib @?= Haskell2010
_libExposedModules lib @?= NEL.fromList (map fromString ["Foo", "Bar"])
_libOtherModules lib @?= map fromString ["Baz.Internal"]
_libOtherModules lib @?= [fromString "Baz.Internal"]
_libOtherExts lib @?= map EnableExtension [OverloadedStrings, LambdaCase, RankNTypes, RecordWildCards]
_libDependencies lib @?! []
_libBuildTools lib @?= [mkStringyDep "happy:happy"]
Expand Down Expand Up @@ -545,7 +545,7 @@ driverFunctionTest pkgIx srcDb comp =
_libSourceDirs lib @?= ["src"]
_libLanguage lib @?= Haskell2010
_libExposedModules lib @?= NEL.fromList (map fromString ["Foo", "Bar"])
_libOtherModules lib @?= map fromString ["Baz.Internal"]
_libOtherModules lib @?= [fromString "Baz.Internal"]
_libOtherExts lib @?= map EnableExtension [OverloadedStrings, LambdaCase, RankNTypes, RecordWildCards]
_libDependencies lib @?! []
_libBuildTools lib @?= [mkStringyDep "happy:happy"]
Expand Down Expand Up @@ -689,7 +689,7 @@ driverFunctionTest pkgIx srcDb comp =
_libSourceDirs lib @?= ["src"]
_libLanguage lib @?= Haskell2010
_libExposedModules lib @?= NEL.fromList (map fromString ["Foo", "Bar"])
_libOtherModules lib @?= map fromString ["Baz.Internal"]
_libOtherModules lib @?= [fromString "Baz.Internal"]
_libOtherExts lib @?= map EnableExtension [OverloadedStrings, LambdaCase, RankNTypes, RecordWildCards]
_libDependencies lib @?! []
_libBuildTools lib @?= [mkStringyDep "happy:happy"]
Expand Down Expand Up @@ -799,7 +799,7 @@ driverFunctionTest pkgIx srcDb comp =
_libSourceDirs lib @?= ["src"]
_libLanguage lib @?= Haskell2010
_libExposedModules lib @?= NEL.fromList (map fromString ["Foo", "Bar"])
_libOtherModules lib @?= map fromString ["Baz.Internal"]
_libOtherModules lib @?= [fromString "Baz.Internal"]
_libOtherExts lib @?= map EnableExtension [OverloadedStrings, LambdaCase, RankNTypes, RecordWildCards]
_libDependencies lib @?! []
_libBuildTools lib @?= [mkStringyDep "happy:happy"]
Expand Down Expand Up @@ -1268,7 +1268,7 @@ nonInteractiveTests pkgIx srcDb comp =
[ testSimple
"Library directory exists"
libOtherModulesHeuristics
(map fromString ["Baz.Internal"])
[fromString "Baz.Internal"]
[ "test-package"
, "True"
, "[\"src/Foo.hs\", \"src/Bar.hs\", \"src/Baz/Internal.hs\"]"
Expand Down Expand Up @@ -1447,7 +1447,7 @@ cliListParserTests =
flags <- runParserTest ["-o", "Test"]
flags
@?= emptyFlags
{ exposedModules = Flag $ map fromString ["Test"]
{ exposedModules = Flag [fromString "Test"]
}
, testCase "Multiple exposedModules" $ do
flags <- runParserTest ["-o", "Test", "-o", "Test2", "-o", "Test3"]
Expand Down
Loading