From 6abb8db8c8fa85d3552256a578a4d6b05bab851f Mon Sep 17 00:00:00 2001 From: Francesco Ariis Date: Thu, 1 Jun 2023 17:31:02 +0200 Subject: [PATCH] Remove useless PackageId parameter It is now in the Reader part of CheckM monad. --- Cabal/src/Distribution/PackageDescription/Check.hs | 2 +- Cabal/src/Distribution/PackageDescription/Check/Target.hs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index e31969ca891..69f7003a9a8 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -309,7 +309,7 @@ checkGenericPackageDescription mapM_ ( checkCondTarget genPackageFlags_ - (checkExecutable (package packageDescription_) ads) + (checkExecutable ads) (const id) ) condExecutables_ diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index 9884a1ce724..135bc5c6e20 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -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_)