From e25d5095e6fd47e0a02404d9532c2f776d3f8a32 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 10 May 2008 22:55:52 +0000 Subject: Follow changes in Cabal --- compiler/main/PackageConfig.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'compiler/main/PackageConfig.hs') diff --git a/compiler/main/PackageConfig.hs b/compiler/main/PackageConfig.hs index 80488ec05f..d5569c4a85 100644 --- a/compiler/main/PackageConfig.hs +++ b/compiler/main/PackageConfig.hs @@ -8,7 +8,7 @@ module PackageConfig ( -- * The PackageConfig type: information about a package PackageConfig, - InstalledPackageInfo_(..), showPackageId, + InstalledPackageInfo_(..), display, Version(..), PackageIdentifier(..), defaultPackageConfig, @@ -16,9 +16,10 @@ module PackageConfig ( #include "HsVersions.h" -import Module +import Module import Distribution.InstalledPackageInfo import Distribution.Package +import Distribution.Text import Distribution.Version import Distribution.Compat.ReadP ( readP_to_S ) @@ -45,14 +46,14 @@ defaultPackageConfig = emptyInstalledPackageInfo -- A PackageId is a string of the form -. mkPackageId :: PackageIdentifier -> PackageId -mkPackageId = stringToPackageId . showPackageId +mkPackageId = stringToPackageId . display packageConfigId :: PackageConfig -> PackageId packageConfigId = mkPackageId . package unpackPackageId :: PackageId -> Maybe PackageIdentifier unpackPackageId p - = case [ pid | (pid,"") <- readP_to_S parsePackageId str ] of + = case [ pid | (pid,"") <- readP_to_S parse str ] of [] -> Nothing (pid:_) -> Just pid where str = packageIdString p -- cgit v1.2.1