Commit f1ca9680 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Change the interface to the per-compiler registerPackage functions

Remove the now-unused PackageDescription and inplace :: Bool args.

Not yet changed the compiler-independent registerPackage.
parent 17af6b98
......@@ -1129,12 +1129,10 @@ hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcPkgProg
registerPackage
:: Verbosity
-> InstalledPackageInfo
-> PackageDescription
-> LocalBuildInfo
-> Bool
-> PackageDBStack
-> IO ()
registerPackage verbosity installedPkgInfo _pkg lbi _inplace packageDbs =
registerPackage verbosity installedPkgInfo lbi packageDbs =
HcPkg.reregister (hcPkgInfo $ withPrograms lbi) verbosity
packageDbs (Right installedPkgInfo)
......
......@@ -823,12 +823,10 @@ adjustExts hiSuf objSuf opts =
registerPackage :: Verbosity
-> InstalledPackageInfo
-> PackageDescription
-> LocalBuildInfo
-> Bool
-> PackageDBStack
-> IO ()
registerPackage verbosity installedPkgInfo _pkg lbi _inplace packageDbs =
registerPackage verbosity installedPkgInfo lbi packageDbs =
HcPkg.reregister (hcPkgInfo $ withPrograms lbi) verbosity packageDbs
(Right installedPkgInfo)
......
......@@ -201,12 +201,10 @@ installLib verbosity lbi targetDir dynlibTargetDir builtDir pkg lib _clbi = do
registerPackage
:: Verbosity
-> InstalledPackageInfo
-> PackageDescription
-> LocalBuildInfo
-> Bool
-> PackageDBStack
-> IO ()
registerPackage verbosity installedPkgInfo _pkg lbi _inplace packageDbs = do
registerPackage verbosity installedPkgInfo lbi packageDbs = do
(hspkg, _) <- requireProgram verbosity haskellSuitePkgProgram (withPrograms lbi)
runProgramInvocation verbosity $
......
......@@ -775,12 +775,10 @@ installLib verbosity lbi targetDir dynlibTargetDir builtDir _pkg lib clbi = do
registerPackage
:: Verbosity
-> InstalledPackageInfo
-> PackageDescription
-> LocalBuildInfo
-> Bool
-> PackageDBStack
-> IO ()
registerPackage verbosity installedPkgInfo _pkg lbi _inplace packageDbs =
registerPackage verbosity installedPkgInfo lbi packageDbs =
HcPkg.reregister (hcPkgInfo $ withPrograms lbi) verbosity packageDbs
(Right installedPkgInfo)
......
......@@ -247,13 +247,13 @@ registerPackage verbosity installedPkgInfo pkg lbi inplace packageDbs = do
else "Registering"
setupMessage verbosity msg (packageId pkg)
case compilerFlavor (compiler lbi) of
GHC -> GHC.registerPackage verbosity installedPkgInfo pkg lbi inplace packageDbs
GHCJS -> GHCJS.registerPackage verbosity installedPkgInfo pkg lbi inplace packageDbs
LHC -> LHC.registerPackage verbosity installedPkgInfo pkg lbi inplace packageDbs
UHC -> UHC.registerPackage verbosity installedPkgInfo pkg lbi inplace packageDbs
GHC -> GHC.registerPackage verbosity installedPkgInfo lbi packageDbs
GHCJS -> GHCJS.registerPackage verbosity installedPkgInfo lbi packageDbs
LHC -> LHC.registerPackage verbosity installedPkgInfo lbi packageDbs
UHC -> UHC.registerPackage verbosity installedPkgInfo lbi packageDbs
JHC -> notice verbosity "Registering for jhc (nothing to do)"
HaskellSuite {} ->
HaskellSuite.registerPackage verbosity installedPkgInfo pkg lbi inplace packageDbs
HaskellSuite.registerPackage verbosity installedPkgInfo lbi packageDbs
_ -> die "Registering is not implemented for this compiler"
writeHcPkgRegisterScript :: Verbosity
......
......@@ -265,12 +265,10 @@ uhcPackageSubDir compilerid = compilerid </> uhcTarget </> uhcTargetVarian
registerPackage
:: Verbosity
-> InstalledPackageInfo
-> PackageDescription
-> LocalBuildInfo
-> Bool
-> PackageDBStack
-> IO ()
registerPackage verbosity installedPkgInfo _pkg lbi _inplace packageDbs = do
registerPackage verbosity installedPkgInfo lbi packageDbs = do
dbdir <- case last packageDbs of
GlobalPackageDB -> getGlobalPackageDir verbosity (withPrograms lbi)
UserPackageDB -> getUserPackageDir
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment