From: Simon Marlow Date: Tue, 5 Feb 2008 09:04:29 +0000 (+0000) Subject: matchesPkg: match against the pkg Id (foo-1.0) not just the package name (foo) X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=cc915f9d775ad37eaab77e68ab570c58ee87dbf6 matchesPkg: match against the pkg Id (foo-1.0) not just the package name (foo) Fixes the ghcpkg01 test. --- diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 936b309..866c9fe 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -624,7 +624,7 @@ pid `matches` pid' matchesPkg :: PackageArg -> InstalledPackageInfo -> Bool (Id pid) `matchesPkg` pkg = pid `matches` package pkg -(Substring _ m) `matchesPkg` pkg = m (pkgName (package pkg)) +(Substring _ m) `matchesPkg` pkg = m (showPackageId (package pkg)) compPkgIdVer :: PackageIdentifier -> PackageIdentifier -> Ordering compPkgIdVer p1 p2 = pkgVersion p1 `compare` pkgVersion p2