Commit d5a80dbe authored by Edward Z. Yang's avatar Edward Z. Yang Committed by Austin Seipp

Add Uniquable instances for InstalledPackageId/SourcePackageId/PackageName

Summary: Signed-off-by: Edward Z. Yang <>

Test Plan: validate

Reviewers: austin

Reviewed By: austin

Subscribers: thomie

Differential Revision:
parent a1db53cc
......@@ -34,6 +34,7 @@ import Data.Version
import FastString
import Outputable
import Module
import Unique
-- -----------------------------------------------------------------------------
-- Our PackageConfig type is the InstalledPackageInfo from bin-package-db,
......@@ -66,6 +67,15 @@ instance BinaryStringRep PackageName where
fromStringRep = PackageName . mkFastStringByteString
toStringRep (PackageName s) = fastStringToByteString s
instance Uniquable InstalledPackageId where
getUnique (InstalledPackageId n) = getUnique n
instance Uniquable SourcePackageId where
getUnique (SourcePackageId n) = getUnique n
instance Uniquable PackageName where
getUnique (PackageName n) = getUnique n
instance Outputable InstalledPackageId where
ppr (InstalledPackageId str) = ftext str
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment