Permalink
Browse files

Remove 'tryCachedSetupExecutable'.

The function is very short and the name doesn't communicate clearly what it
does.
  • Loading branch information...
1 parent 3db510f commit f9261da4c2d87e10d489173525615fd4c90f960c @23Skidoo 23Skidoo committed Jun 29, 2012
Showing with 3 additions and 9 deletions.
  1. +3 −9 cabal-install/Distribution/Client/SetupWrapper.hs
@@ -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

0 comments on commit f9261da

Please sign in to comment.