Commit f9261da4 authored by refold's avatar refold
Browse files

Remove 'tryCachedSetupExecutable'.

The function is very short and the name doesn't communicate clearly what it
does.
parent 3db510f9
...@@ -192,7 +192,9 @@ externalSetupMethod verbosity options pkg bt mkargs = do ...@@ -192,7 +192,9 @@ externalSetupMethod verbosity options pkg bt mkargs = do
debug verbosity $ "Using Cabal library version " ++ display cabalLibVersion debug verbosity $ "Using Cabal library version " ++ display cabalLibVersion
setupHs <- updateSetupScript cabalLibVersion bt setupHs <- updateSetupScript cabalLibVersion bt
debug verbosity $ "Using " ++ setupHs ++ " as setup script." 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) invokeSetupScript path (mkargs cabalLibVersion)
where where
...@@ -288,14 +290,6 @@ externalSetupMethod verbosity options pkg bt mkargs = do ...@@ -288,14 +290,6 @@ externalSetupMethod verbosity options pkg bt mkargs = do
Custom -> error "buildTypeScript Custom" Custom -> error "buildTypeScript Custom"
UnknownBuildType _ -> error "buildTypeScript UnknownBuildType" 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 -- | Look up the setup executable in the cache; update the cache if the setup
-- executable is not found. -- executable is not found.
getCachedSetupExecutable :: SetupScriptOptions -> Version -> FilePath getCachedSetupExecutable :: SetupScriptOptions -> Version -> FilePath
......
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