diff --git a/Cabal/src/Distribution/Simple/Configure.hs b/Cabal/src/Distribution/Simple/Configure.hs index f35f98f4fcb..57f041e63ea 100644 --- a/Cabal/src/Distribution/Simple/Configure.hs +++ b/Cabal/src/Distribution/Simple/Configure.hs @@ -628,7 +628,6 @@ configure (pkg_descr0, pbi) cfg = do use_external_internal_deps (compilerFlavor comp) (fromFlag (configUserInstall cfg)) - (hasLibs pkg_descr) let installDirs :: InstallDirTemplates installDirs = combineInstallDirs diff --git a/Cabal/src/Distribution/Simple/InstallDirs.hs b/Cabal/src/Distribution/Simple/InstallDirs.hs index eead40c597b..149c8234602 100644 --- a/Cabal/src/Distribution/Simple/InstallDirs.hs +++ b/Cabal/src/Distribution/Simple/InstallDirs.hs @@ -175,24 +175,23 @@ type InstallDirTemplates = InstallDirs PathTemplate -- --------------------------------------------------------------------------- -- Default installation directories -defaultInstallDirs :: CompilerFlavor -> Bool -> Bool -> IO InstallDirTemplates +defaultInstallDirs :: CompilerFlavor -> Bool -> IO InstallDirTemplates defaultInstallDirs = defaultInstallDirs' False defaultInstallDirs' :: Bool {- use external internal deps -} -> CompilerFlavor -> Bool - -> Bool -> IO InstallDirTemplates -defaultInstallDirs' True comp userInstall hasLibs = do - dflt <- defaultInstallDirs' False comp userInstall hasLibs +defaultInstallDirs' True comp userInstall = do + dflt <- defaultInstallDirs' False comp userInstall -- Be a bit more hermetic about per-component installs return dflt { datasubdir = toPathTemplate $ "$abi" "$libname" , docdir = toPathTemplate $ "$datadir" "doc" "$abi" "$libname" } -defaultInstallDirs' False comp userInstall _hasLibs = do +defaultInstallDirs' False comp userInstall = do installPrefix <- if userInstall then do diff --git a/cabal-install/src/Distribution/Client/Config.hs b/cabal-install/src/Distribution/Client/Config.hs index 24c6c6a29f4..16e780d5710 100644 --- a/cabal-install/src/Distribution/Client/Config.hs +++ b/cabal-install/src/Distribution/Client/Config.hs @@ -1069,8 +1069,8 @@ writeConfigFile file comments vals = do -- overriding. commentSavedConfig :: IO SavedConfig commentSavedConfig = do - userInstallDirs <- defaultInstallDirs defaultCompiler True True - globalInstallDirs <- defaultInstallDirs defaultCompiler False True + userInstallDirs <- defaultInstallDirs defaultCompiler True + globalInstallDirs <- defaultInstallDirs defaultCompiler False let conf0 = mempty { savedGlobalFlags = diff --git a/cabal-install/src/Distribution/Client/Install.hs b/cabal-install/src/Distribution/Client/Install.hs index ad32c4237bd..179e56e4b48 100644 --- a/cabal-install/src/Distribution/Client/Install.hs +++ b/cabal-install/src/Distribution/Client/Install.hs @@ -1249,7 +1249,6 @@ regenerateHaddockIndex InstallDirs.defaultInstallDirs (compilerFlavor comp) (fromFlag (configUserInstall configFlags)) - True let indexFileTemplate = fromFlag (installHaddockIndex installFlags) indexFile = substHaddockIndexFileName defaultDirs indexFileTemplate @@ -1993,7 +1992,7 @@ installUnpackedPackage addDefaultInstallDirs :: ConfigFlags -> IO ConfigFlags addDefaultInstallDirs configFlags' = do - defInstallDirs <- InstallDirs.defaultInstallDirs flavor userInstall False + defInstallDirs <- InstallDirs.defaultInstallDirs flavor userInstall return $ configFlags' { configInstallDirs = @@ -2120,7 +2119,6 @@ withWin32SelfUpgrade verbosity uid configFlags cinfo platform pkg action = do InstallDirs.defaultInstallDirs compFlavor (fromFlag (configUserInstall configFlags)) - (PackageDescription.hasLibs pkg) Win32SelfUpgrade.possibleSelfUpgrade verbosity diff --git a/cabal-install/src/Distribution/Client/InstallSymlink.hs b/cabal-install/src/Distribution/Client/InstallSymlink.hs index cf57c54818e..6420a6333f9 100644 --- a/cabal-install/src/Distribution/Client/InstallSymlink.hs +++ b/cabal-install/src/Distribution/Client/InstallSymlink.hs @@ -214,7 +214,6 @@ symlinkBinaries InstallDirs.defaultInstallDirs compilerFlavor (fromFlag (configUserInstall configFlags)) - (PackageDescription.hasLibs pkg) let templateDirs = InstallDirs.combineInstallDirs fromFlagOrDefault diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs index 10bf7c18cc7..95daf37f52f 100644 --- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs +++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs @@ -4033,7 +4033,6 @@ userInstallDirTemplates compiler = do InstallDirs.defaultInstallDirs (compilerFlavor compiler) True -- user install - False -- unused storePackageInstallDirs :: StoreDirLayout