Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement cabal check #8427

Merged
merged 19 commits into from
Nov 13, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove useless PackageId parameter
It is now in the Reader part of CheckM monad.
  • Loading branch information
ffaf1 committed Nov 11, 2023
commit 87ca48226a7eeed9b58060ebcea88f1a4178f924
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/PackageDescription/Check.hs
Original file line number Diff line number Diff line change
@@ -309,7 +309,7 @@ checkGenericPackageDescription
mapM_
( checkCondTarget
genPackageFlags_
(checkExecutable (package packageDescription_) ads)
(checkExecutable ads)
(const id)
)
condExecutables_
5 changes: 2 additions & 3 deletions Cabal/src/Distribution/PackageDescription/Check/Target.hs
Original file line number Diff line number Diff line change
@@ -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_
@@ -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_)