Haskell Platform tweaks

This commit is contained in:
Michael Snoyman 2014-08-19 13:23:40 +03:00
parent decbff1b22
commit 58edb793d3
3 changed files with 9 additions and 5 deletions

View File

@ -34,8 +34,6 @@ dropExcluded bs m0 =
getInstallInfo :: SelectSettings -> IO InstallInfo getInstallInfo :: SelectSettings -> IO InstallInfo
getInstallInfo settings = do getInstallInfo settings = do
putStrLn "Loading Haskell Platform"
core <- do core <- do
putStrLn "Loading core packages from global database" putStrLn "Loading core packages from global database"
getGlobalPackages $ selectGhcVersion settings getGlobalPackages $ selectGhcVersion settings
@ -108,14 +106,18 @@ getInstallInfo settings = do
putStrLn $ "Inclusive/exclusive: " ++ incexc putStrLn $ "Inclusive/exclusive: " ++ incexc
putStrLn "Creating hackage file (for publishing to Stackage server)" putStrLn "Creating hackage file (for publishing to Stackage server)"
let isHP = requireHaskellPlatform settings
IO.withBinaryFile (incexc </> "hackage") IO.WriteMode $ \hackageH -> IO.withBinaryFile (incexc </> "hackage") IO.WriteMode $ \hackageH ->
IO.withBinaryFile (incexc </> "create-snapshot.sh") IO.WriteMode IO.withBinaryFile (incexc </> "create-snapshot.sh") IO.WriteMode
(createHackageFile isInc ii ghcVer date hackageH) (createHackageFile isInc isHP ii ghcVer date hackageH)
putStrLn "Creating desc file (for publishing to Stackage server)" putStrLn "Creating desc file (for publishing to Stackage server)"
System.IO.UTF8.writeFile (incexc </> "desc") $ concat System.IO.UTF8.writeFile (incexc </> "desc") $ concat
[ "Stackage build for GHC " [ "Stackage build for GHC "
, ghcVer , ghcVer
, if requireHaskellPlatform settings
then " + Haskell Platform"
else ""
, ", " , ", "
, date , date
, ", " , ", "

View File

@ -17,16 +17,18 @@ import System.FilePath ((</>), (<.>))
import System.IO (Handle, hPutStrLn, hPutStr) import System.IO (Handle, hPutStrLn, hPutStr)
createHackageFile :: Bool -- ^ inclusive? createHackageFile :: Bool -- ^ inclusive?
-> Bool -- ^ haskell platform?
-> InstallInfo -> InstallInfo
-> String -- ^ GHC version -> String -- ^ GHC version
-> String -- ^ date -> String -- ^ date
-> Handle -- ^ hackage -> Handle -- ^ hackage
-> Handle -- ^ tarballs -> Handle -- ^ tarballs
-> IO () -> IO ()
createHackageFile isInc ii ghcVer date hackageH tarballH = do createHackageFile isInc hp ii ghcVer date hackageH tarballH = do
let stackageFP = concat let stackageFP = concat
[ "../ghc-" [ "../ghc-"
, ghcVer , ghcVer
, if hp then "hp" else ""
, "-" , "-"
, date , date
, if isInc then "-inclusive" else "-exclusive" , if isInc then "-inclusive" else "-exclusive"

View File

@ -4,7 +4,7 @@ cabal update
(cd patching/ && ./scripts/create-tarballs.sh) (cd patching/ && ./scripts/create-tarballs.sh)
cabal install cabal install
cabal install Cabal-$(cabal --version | sed -n 's@using version \(.*\) of the Cabal library@\1@p') cabal install Cabal-$(cabal --version | sed -n 's@using version \(.*\) of the Cabal library@\1@p')
./dist/build/stackage/stackage select --no-platform ./dist/build/stackage/stackage select $*
./dist/build/stackage/stackage check ./dist/build/stackage/stackage check
./dist/build/stackage/stackage build ./dist/build/stackage/stackage build
./dist/build/stackage/stackage test ./dist/build/stackage/stackage test