PackageConstraints rename

This commit is contained in:
Michael Snoyman 2014-12-04 14:34:15 +02:00
parent a97335fbc5
commit e360a857cd
2 changed files with 12 additions and 12 deletions

View File

@ -1,30 +1,30 @@
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
-- | Get the proposed build plan. -- | The constraints on package selection for a new build plan.
module Stackage2.ProposedPlan module Stackage2.PackageConstraints
( ProposedPlan (..) ( PackageConstraints (..)
, defaultProposedPlan , defaultPackageConstraints
) where ) where
import Stackage2.Prelude import Stackage2.Prelude
import qualified Stackage.Config as Old import qualified Stackage.Config as Old
import qualified Stackage.Types as Old import qualified Stackage.Types as Old
data ProposedPlan = ProposedPlan data PackageConstraints = PackageConstraints
{ ppPackages :: Map PackageName (VersionRange, Maintainer) { pcPackages :: Map PackageName (VersionRange, Maintainer)
-- ^ This does not include core packages or dependencies, just packages -- ^ This does not include core packages or dependencies, just packages
-- added by some maintainer. -- added by some maintainer.
, ppExpectedFailures :: Set PackageName , pcExpectedFailures :: Set PackageName
-- ^ At some point in the future, we should split this into Haddock -- ^ At some point in the future, we should split this into Haddock
-- failures, test failures, etc. -- failures, test failures, etc.
} }
-- | The proposed plan from the requirements provided by contributors. -- | The proposed plan from the requirements provided by contributors.
defaultProposedPlan :: ProposedPlan defaultPackageConstraints :: PackageConstraints
defaultProposedPlan = ProposedPlan defaultPackageConstraints = PackageConstraints
{ ppPackages = fmap (Maintainer . pack . Old.unMaintainer) { pcPackages = fmap (Maintainer . pack . Old.unMaintainer)
<$> Old.defaultStablePackages ghcVer False <$> Old.defaultStablePackages ghcVer False
, ppExpectedFailures = Old.defaultExpectedFailures ghcVer False , pcExpectedFailures = Old.defaultExpectedFailures ghcVer False
} }
where where
ghcVer = Old.GhcMajorVersion 7 8 ghcVer = Old.GhcMajorVersion 7 8

View File

@ -32,7 +32,7 @@ library
Stackage.ServerFiles Stackage.ServerFiles
Stackage2.Prelude Stackage2.Prelude
Stackage2.ProposedPlan Stackage2.PackageConstraints
Stackage2.CorePackages Stackage2.CorePackages
Stackage2.PackageIndex Stackage2.PackageIndex
build-depends: base >= 4 && < 5 build-depends: base >= 4 && < 5