mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-18 10:11:57 +01:00
ProposedPlan
This commit is contained in:
parent
97949eb86c
commit
d2bc53a7fa
@ -1,10 +1,11 @@
|
|||||||
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
|
{-# LANGUAGE NoImplicitPrelude #-}
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module Stackage2.CorePackages
|
module Stackage2.CorePackages
|
||||||
( getCorePackages
|
( getCorePackages
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Stackage2.Prelude
|
import qualified Data.Text as T
|
||||||
import qualified Data.Text as T
|
import Stackage2.Prelude
|
||||||
|
|
||||||
-- | Get a @Map@ of all of the core packages. Core packages are defined as
|
-- | Get a @Map@ of all of the core packages. Core packages are defined as
|
||||||
-- packages which ship with GHC itself.
|
-- packages which ship with GHC itself.
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import Data.Conduit.Process as X
|
|||||||
import Data.Typeable (TypeRep, typeOf)
|
import Data.Typeable (TypeRep, typeOf)
|
||||||
import Distribution.Package as X (PackageName (PackageName))
|
import Distribution.Package as X (PackageName (PackageName))
|
||||||
import qualified Distribution.Text as DT
|
import qualified Distribution.Text as DT
|
||||||
import Distribution.Version as X (Version (..))
|
import Distribution.Version as X (Version (..), VersionRange)
|
||||||
import System.Exit (ExitCode (ExitSuccess))
|
import System.Exit (ExitCode (ExitSuccess))
|
||||||
|
|
||||||
unPackageName :: PackageName -> Text
|
unPackageName :: PackageName -> Text
|
||||||
@ -71,3 +71,5 @@ withCheckedProcess cp f = do
|
|||||||
ec <- waitForStreamingProcess sph
|
ec <- waitForStreamingProcess sph
|
||||||
checkExitCode cp ec
|
checkExitCode cp ec
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
newtype Maintainer = Maintainer { unMaintainer :: Text }
|
||||||
|
|||||||
30
Stackage2/ProposedPlan.hs
Normal file
30
Stackage2/ProposedPlan.hs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{-# LANGUAGE NoImplicitPrelude #-}
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
-- | Get the proposed build plan.
|
||||||
|
module Stackage2.ProposedPlan
|
||||||
|
( ProposedPlan (..)
|
||||||
|
, defaultProposedPlan
|
||||||
|
) where
|
||||||
|
|
||||||
|
import Stackage2.Prelude
|
||||||
|
import qualified Stackage.Config as Old
|
||||||
|
import qualified Stackage.Types as Old
|
||||||
|
|
||||||
|
data ProposedPlan = ProposedPlan
|
||||||
|
{ ppPackages :: Map PackageName (VersionRange, Maintainer)
|
||||||
|
-- ^ This does not include core packages or dependencies, just packages
|
||||||
|
-- added by some maintainer.
|
||||||
|
, ppExpectedFailures :: Set PackageName
|
||||||
|
-- ^ At some point in the future, we should split this into Haddock
|
||||||
|
-- failures, test failures, etc.
|
||||||
|
}
|
||||||
|
|
||||||
|
-- | The proposed plan from the requirements provided by contributors.
|
||||||
|
defaultProposedPlan :: ProposedPlan
|
||||||
|
defaultProposedPlan = ProposedPlan
|
||||||
|
{ ppPackages = fmap (Maintainer . pack . Old.unMaintainer)
|
||||||
|
<$> Old.defaultStablePackages ghcVer False
|
||||||
|
, ppExpectedFailures = Old.defaultExpectedFailures ghcVer False
|
||||||
|
}
|
||||||
|
where
|
||||||
|
ghcVer = Old.GhcMajorVersion 7 8
|
||||||
@ -9,9 +9,10 @@ author: Michael Snoyman
|
|||||||
maintainer: michael@fpcomplete.com
|
maintainer: michael@fpcomplete.com
|
||||||
category: Distribution
|
category: Distribution
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
cabal-version: >=1.8
|
cabal-version: >=1.10
|
||||||
|
|
||||||
library
|
library
|
||||||
|
default-language: Haskell2010
|
||||||
exposed-modules: Stackage.NarrowDatabase
|
exposed-modules: Stackage.NarrowDatabase
|
||||||
Stackage.LoadDatabase
|
Stackage.LoadDatabase
|
||||||
Stackage.ModuleNameConflict
|
Stackage.ModuleNameConflict
|
||||||
@ -31,6 +32,7 @@ library
|
|||||||
Stackage.ServerFiles
|
Stackage.ServerFiles
|
||||||
|
|
||||||
Stackage2.Prelude
|
Stackage2.Prelude
|
||||||
|
Stackage2.ProposedPlan
|
||||||
Stackage2.CorePackages
|
Stackage2.CorePackages
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, containers
|
, containers
|
||||||
@ -51,6 +53,7 @@ library
|
|||||||
, text
|
, text
|
||||||
|
|
||||||
executable stackage
|
executable stackage
|
||||||
|
default-language: Haskell2010
|
||||||
hs-source-dirs: app
|
hs-source-dirs: app
|
||||||
main-is: stackage.hs
|
main-is: stackage.hs
|
||||||
build-depends: base
|
build-depends: base
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user