Skip to content

Commit

Permalink
Export the PackageFixedDeps class
Browse files Browse the repository at this point in the history
and make GenericPackageDescription an instance of the Package class
  • Loading branch information
dcoutts committed Feb 21, 2008
1 parent 809cc13 commit 1c35bee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Distribution/Simple/PackageIndex.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
module Distribution.Simple.PackageIndex (
-- * Package classes
Package(..),
PackageFixedDeps(..),

-- * Package index data type
PackageIndex,
Expand Down Expand Up @@ -60,9 +61,9 @@ import Distribution.InstalledPackageInfo
import qualified Distribution.InstalledPackageInfo as InstalledPackageInfo
( InstalledPackageInfo_(..) )
import Distribution.PackageDescription
( PackageDescription )
( PackageDescription, GenericPackageDescription )
import qualified Distribution.PackageDescription as PackageDescription
( PackageDescription(..) )
( PackageDescription(..), GenericPackageDescription(packageDescription) )
import Distribution.Version (Version, Dependency(Dependency), withinRange)
import Distribution.Simple.Utils (lowercase, equating, comparing, isInfixOf)

Expand All @@ -81,6 +82,8 @@ instance Package (InstalledPackageInfo_ str) where
packageId = InstalledPackageInfo.package
instance Package PackageDescription where
packageId = PackageDescription.package
instance Package GenericPackageDescription where
packageId = packageId . PackageDescription.packageDescription

-- | Subclass of packages that have specific versioned dependencies.
--
Expand Down

0 comments on commit 1c35bee

Please sign in to comment.