Skip to content

Commit

Permalink
Remove useless PackageId parameter
Browse files Browse the repository at this point in the history
It is now in the Reader part of CheckM monad.
  • Loading branch information
ffaf1 committed Nov 11, 2023
1 parent 148d8dd commit 87ca482
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/PackageDescription/Check.hs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ checkGenericPackageDescription
mapM_
( checkCondTarget
genPackageFlags_
(checkExecutable (package packageDescription_) ads)
(checkExecutable ads)
(const id)
)
condExecutables_
Expand Down
5 changes: 2 additions & 3 deletions Cabal/src/Distribution/PackageDescription/Check/Target.hs
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,10 @@ checkForeignLib

checkExecutable
:: Monad m
=> PackageId
-> [AssocDep] -- “Inherited” dependencies for PVP checks.
=> [AssocDep] -- “Inherited” dependencies for PVP checks.
-> Executable
-> CheckM m ()
checkExecutable
pid
ads
exe@( Executable
exeName_
Expand All @@ -150,6 +148,7 @@ checkExecutable
(null modulePath_)
(PackageBuildImpossible (NoMainIs exeName_))
-- This check does not apply to scripts.
pid <- asksCM (pnPackageId . ccNames)
checkP
( pid /= fakePackageId
&& not (null modulePath_)
Expand Down

0 comments on commit 87ca482

Please sign in to comment.