Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
33809c5d
Commit
33809c5d
authored
May 07, 2008
by
Duncan Coutts
Browse files
Move ConfiguredPackage type into Types module
It's not actually specific to the InstallPlan.
parent
06892ecb
Changes
3
Hide whitespace changes
Inline
Side-by-side
cabal-install/Hackage/Install.hs
View file @
33809c5d
...
...
@@ -32,7 +32,7 @@ import Hackage.Setup (InstallFlags(..))
import
Hackage.Tar
(
extractTarGzFile
)
import
Hackage.Types
as
Available
(
UnresolvedDependency
(
..
),
AvailablePackage
(
..
)
,
AvailablePackageSource
(
..
),
Repo
)
,
AvailablePackageSource
(
..
),
Repo
,
ConfiguredPackage
(
..
)
)
import
Hackage.Utils
(
showDependencies
)
import
Hackage.SetupWrapper
(
setupWrapper
,
SetupScriptOptions
(
..
)
)
...
...
cabal-install/Hackage/InstallPlan.hs
View file @
33809c5d
...
...
@@ -41,7 +41,7 @@ module Hackage.InstallPlan (
)
where
import
Hackage.Types
(
AvailablePackage
(
packageDescription
)
)
(
AvailablePackage
(
packageDescription
)
,
ConfiguredPackage
(
..
)
)
import
Distribution.Package
(
PackageIdentifier
(
..
),
Package
(
..
),
PackageFixedDeps
(
..
)
,
packageName
,
Dependency
(
..
)
)
...
...
@@ -52,7 +52,7 @@ import Distribution.InstalledPackageInfo
import
Distribution.PackageDescription
(
GenericPackageDescription
(
genPackageFlags
)
,
PackageDescription
(
buildDepends
)
,
Flag
(
flagName
),
FlagName
(
..
)
,
FlagAssignment
)
,
Flag
(
flagName
),
FlagName
(
..
)
)
import
Distribution.PackageDescription.Configuration
(
finalizePackageDescription
)
import
Distribution.Simple.PackageIndex
...
...
@@ -114,24 +114,6 @@ import Control.Exception
-- also in the set. It is consistent if for every package in the set, all
-- dependencies which target that package have the same version.
-- | A 'ConfiguredPackage' is a not-yet-installed package along with the
-- total configuration information. The configuration information is total in
-- the sense that it provides all the configuration information and so the
-- final configure process will be independent of the environment.
--
data
ConfiguredPackage
=
ConfiguredPackage
AvailablePackage
-- ^ package info, including repo
FlagAssignment
-- ^ complete flag assignment for the package
[
PackageIdentifier
]
-- ^ exact dependencies, must be consistent with the
-- version constraints in the package info
deriving
Show
instance
Package
ConfiguredPackage
where
packageId
(
ConfiguredPackage
pkg
_
_
)
=
packageId
pkg
instance
PackageFixedDeps
ConfiguredPackage
where
depends
(
ConfiguredPackage
_
_
deps
)
=
deps
data
PlanPackage
buildResult
=
PreExisting
InstalledPackageInfo
|
Configured
ConfiguredPackage
|
Installed
ConfiguredPackage
...
...
cabal-install/Hackage/Types.hs
View file @
33809c5d
...
...
@@ -13,13 +13,33 @@
module
Hackage.Types
where
import
Distribution.Package
(
PackageIdentifier
(
..
),
Package
(
..
),
Dependency
)
(
PackageIdentifier
(
..
),
Package
(
..
),
PackageFixedDeps
(
..
)
,
Dependency
)
import
Distribution.PackageDescription
(
GenericPackageDescription
,
FlagAssignment
)
newtype
Username
=
Username
{
unUsername
::
String
}
newtype
Password
=
Password
{
unPassword
::
String
}
-- | A 'ConfiguredPackage' is a not-yet-installed package along with the
-- total configuration information. The configuration information is total in
-- the sense that it provides all the configuration information and so the
-- final configure process will be independent of the environment.
--
data
ConfiguredPackage
=
ConfiguredPackage
AvailablePackage
-- ^ package info, including repo
FlagAssignment
-- ^ complete flag assignment for the package
[
PackageIdentifier
]
-- ^ exact dependencies, must be consistent with the
-- version constraints in the package info
deriving
Show
instance
Package
ConfiguredPackage
where
packageId
(
ConfiguredPackage
pkg
_
_
)
=
packageId
pkg
instance
PackageFixedDeps
ConfiguredPackage
where
depends
(
ConfiguredPackage
_
_
deps
)
=
deps
-- | We re-use @GenericPackageDescription@ and use the @package-url@
-- field to store the tarball URL.
data
AvailablePackage
=
AvailablePackage
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment