Commit ecc95805 authored by bjorn@bringert.net's avatar bjorn@bringert.net
Browse files

Use --with-compiler and --with-hc-pkg.

parent 53c2a4cd
......@@ -128,11 +128,13 @@ pkgURL pkg = joinWith "/" [repoURL (pkgRepo pkg), pkgName p, showVersion (pkgVer
-- * Compiler and programs
--
-- FIXME: should use --with flags
findCompiler :: ConfigFlags -> IO (Compiler, ProgramConfiguration)
findCompiler cfg = Configure.configCompiler
(Just (configCompiler cfg))
Nothing Nothing defaultProgramConfiguration (configVerbose cfg)
(configCompilerPath cfg)
(configHcPkgPath cfg)
defaultProgramConfiguration
(configVerbose cfg)
--
-- * Default config
......@@ -159,6 +161,8 @@ defaultConfigFlags =
cacheDir <- defaultCacheDir
return $ ConfigFlags
{ configCompiler = defaultCompiler
, configCompilerPath = Nothing
, configHcPkgPath = Nothing
, configInstallDirs = installDirs { prefixDirTemplate = toPathTemplate defaultPrefix }
, configCacheDir = cacheDir
, configRepos = [Repo "hackage.haskell.org" "http://hackage.haskell.org/packages/archive"]
......
......@@ -81,8 +81,8 @@ configFromOptions :: ConfigFlags -> [Option] -> ConfigFlags
configFromOptions = foldr f
where f o cfg = case o of
OptCompilerFlavor c -> cfg { configCompiler = c}
OptCompiler _ -> cfg -- FIXME: where do we store this?
OptHcPkg _ -> cfg -- FIXME: where do we store this?
OptCompiler p -> cfg { configCompilerPath = Just p }
OptHcPkg p -> cfg { configHcPkgPath = Just p }
OptConfigFile _ -> cfg
OptCacheDir d -> cfg { configCacheDir = d }
OptPrefix d -> lib (\ds x -> ds { prefixDirTemplate = x }) d
......
......@@ -60,6 +60,8 @@ data Option = OptCompilerFlavor CompilerFlavor
data ConfigFlags = ConfigFlags {
configCompiler :: CompilerFlavor,
configCompilerPath :: Maybe FilePath,
configHcPkgPath :: Maybe FilePath,
configInstallDirs :: InstallDirTemplates,
configCacheDir :: FilePath,
configRepos :: [Repo], -- ^Available Hackage servers.
......
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