Permalink
Browse files

Rename a variable.

  • Loading branch information...
1 parent af72dff commit a600f662e4ac6a123138eeaad6ad23b8f4b47d45 @23Skidoo 23Skidoo committed Oct 15, 2012
@@ -20,8 +20,8 @@ module Distribution.Client.PackageEnvironment (
, basePackageEnvironment
, initialPackageEnvironment
, commentPackageEnvironment
- , defaultPackageEnvironmentFileName
- , userPackageEnvironmentFileName
+ , sandboxPackageEnvironmentFile
+ , userPackageEnvironmentFile
) where
import Distribution.Client.Config ( SavedConfig(..), commentSavedConfig,
@@ -85,13 +85,13 @@ instance Monoid PackageEnvironment where
-- | The automatically-created package environment file that should not be
-- touched by the user.
-defaultPackageEnvironmentFileName :: FilePath
-defaultPackageEnvironmentFileName = "cabal.sandbox.config"
+sandboxPackageEnvironmentFile :: FilePath
+sandboxPackageEnvironmentFile = "cabal.sandbox.config"
-- | Optional package environment file that can be used to customize the default
-- settings. Created by the user.
-userPackageEnvironmentFileName :: FilePath
-userPackageEnvironmentFileName = "cabal.config"
+userPackageEnvironmentFile :: FilePath
+userPackageEnvironmentFile = "cabal.config"
-- | Defaults common to 'initialPackageEnvironment' and
-- 'commentPackageEnvironment'.
@@ -190,7 +190,7 @@ addBasePkgEnv verbosity sandboxDir extra = do
addUserPkgEnv :: Verbosity -> FilePath -> PackageEnvironment
-> IO PackageEnvironment
addUserPkgEnv verbosity pkgEnvDir pkgEnv = do
- let path = pkgEnvDir </> userPackageEnvironmentFileName
+ let path = pkgEnvDir </> userPackageEnvironmentFile
minp <- readPackageEnvironmentFile mempty path
userPkgEnv <- case minp of
Nothing -> return mempty
@@ -210,7 +210,7 @@ addUserPkgEnv verbosity pkgEnvDir pkgEnv = do
tryLoadPackageEnvironment :: Verbosity -> FilePath -> FilePath
-> IO PackageEnvironment
tryLoadPackageEnvironment verbosity sandboxDir pkgEnvDir = do
- let path = pkgEnvDir </> defaultPackageEnvironmentFileName
+ let path = pkgEnvDir </> sandboxPackageEnvironmentFile
minp <- readPackageEnvironmentFile mempty path
pkgEnv <- case minp of
Nothing -> die $
@@ -231,7 +231,7 @@ tryLoadPackageEnvironment verbosity sandboxDir pkgEnvDir = do
loadOrCreatePackageEnvironment :: Verbosity -> FilePath -> FilePath -> Compiler
-> IO PackageEnvironment
loadOrCreatePackageEnvironment verbosity sandboxDir pkgEnvDir compiler = do
- let path = pkgEnvDir </> defaultPackageEnvironmentFileName
+ let path = pkgEnvDir </> sandboxPackageEnvironmentFile
minp <- readPackageEnvironmentFile mempty path
pkgEnv <- case minp of
Nothing -> do
@@ -32,7 +32,7 @@ import Distribution.Client.PackageEnvironment
, commentPackageEnvironment
, showPackageEnvironmentWithComments
, setPackageDB
- , defaultPackageEnvironmentFileName )
+ , sandboxPackageEnvironmentFile )
import Distribution.Client.SetupWrapper
( setupWrapper, SetupScriptOptions(..), defaultSetupScriptOptions )
import Distribution.Client.Targets ( readUserTargets )
@@ -138,7 +138,7 @@ sandboxInit verbosity sandboxFlags _globalFlags = do
sandboxDelete :: Verbosity -> SandboxFlags -> GlobalFlags -> IO ()
sandboxDelete verbosity sandboxFlags _globalFlags = do
pkgEnvDir <- getCurrentDirectory
- removeFile (pkgEnvDir </> defaultPackageEnvironmentFileName)
+ removeFile (pkgEnvDir </> sandboxPackageEnvironmentFile)
if sandboxLoc == defaultSandboxLocation
then do
sandboxDir <- getSandboxLocation verbosity sandboxFlags

0 comments on commit a600f66

Please sign in to comment.