Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove 'tryCachedSetupExecutable'.

The function is very short and the name doesn't communicate clearly what it
does.
  • Loading branch information...
commit f9261da4c2d87e10d489173525615fd4c90f960c 1 parent 3db510f
Mikhail Glushenkov 23Skidoo authored
Showing with 3 additions and 9 deletions.
  1. +3 −9 cabal-install/Distribution/Client/SetupWrapper.hs
12 cabal-install/Distribution/Client/SetupWrapper.hs
View
@@ -192,7 +192,9 @@ externalSetupMethod verbosity options pkg bt mkargs = do
debug verbosity $ "Using Cabal library version " ++ display cabalLibVersion
setupHs <- updateSetupScript cabalLibVersion bt
debug verbosity $ "Using " ++ setupHs ++ " as setup script."
- path <- tryCachedSetupExecutable options' cabalLibVersion setupHs
+ path <- case bt of
+ Simple -> getCachedSetupExecutable options' cabalLibVersion setupHs
+ _ -> compileSetupExecutable options' cabalLibVersion setupHs
invokeSetupScript path (mkargs cabalLibVersion)
where
@@ -288,14 +290,6 @@ externalSetupMethod verbosity options pkg bt mkargs = do
Custom -> error "buildTypeScript Custom"
UnknownBuildType _ -> error "buildTypeScript UnknownBuildType"
- -- | Given the versions of the compiler and the Cabal lib, try to find the
- -- cached setup executable.
- tryCachedSetupExecutable :: SetupScriptOptions -> Version -> FilePath
- -> IO FilePath
- tryCachedSetupExecutable = case bt of
- Simple -> getCachedSetupExecutable
- _ -> compileSetupExecutable
-
-- | Look up the setup executable in the cache; update the cache if the setup
-- executable is not found.
getCachedSetupExecutable :: SetupScriptOptions -> Version -> FilePath
Please sign in to comment.
Something went wrong with that request. Please try again.