Provide HP info to stable package function

This commit is contained in:
Michael Snoyman 2014-03-19 10:13:07 +02:00
parent 622c2b8c63
commit 969a85ef72
3 changed files with 9 additions and 5 deletions

View File

@ -139,8 +139,10 @@ defaultExpectedFailures ghcVer = execWriter $ do
-- | List of packages for our stable Hackage. All dependencies will be
-- included as well. Please indicate who will be maintaining the package
-- via comments.
defaultStablePackages :: GhcMajorVersion -> Map PackageName (VersionRange, Maintainer)
defaultStablePackages ghcVer = unPackageMap $ execWriter $ do
defaultStablePackages :: GhcMajorVersion
-> Bool -- ^ using haskell platform?
-> Map PackageName (VersionRange, Maintainer)
defaultStablePackages ghcVer usingHP = unPackageMap $ execWriter $ do
mapM_ (add "michael@snoyman.com") $ words =<<
[ "yesod yesod-newsfeed yesod-sitemap yesod-static yesod-test yesod-bin"
, "markdown filesystem-conduit mime-mail-ses"

View File

@ -44,8 +44,9 @@ getInstallInfo settings = do
let allPackages' =
case mhp of
Just hp | requireHaskellPlatform settings ->
Map.union (stablePackages settings) $ identsToRanges (hplibs hp)
_ -> stablePackages settings
Map.union (stablePackages settings $ requireHaskellPlatform settings)
$ identsToRanges (hplibs hp)
_ -> stablePackages settings $ requireHaskellPlatform settings
allPackages = dropExcluded settings allPackages'
let totalCore
| ignoreUpgradeableCore settings =

View File

@ -114,7 +114,8 @@ data SelectSettings = SelectSettings
-- ^ Packages which should be dropped from the list of stable packages,
-- even if present via the Haskell Platform or @stablePackages@. If these
-- packages are dependencies of others, they will still be included.
, stablePackages :: Map PackageName (VersionRange, Maintainer)
, stablePackages :: Bool -- ^ require Haskell Platform?
-> Map PackageName (VersionRange, Maintainer)
, useGlobalDatabase :: Bool
-- ^ Instead of checking the Haskell Platform file for core packages, query
-- the global database. For this to be reliable, you should only have