X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FModule.lhs;h=2eebf658ae3f91656126e89d7324bc186b8df2e1;hb=4fa65a12c1e4c4bcfd92ff30440a9e75d298e0b7;hp=863fbdf4aa0cb73a0f97b3910e1e9c4ca2d4e50c;hpb=0b72ea61234c748c45a8ae305d5d6b8e81a67c93;p=ghc-hetmet.git diff --git a/compiler/basicTypes/Module.lhs b/compiler/basicTypes/Module.lhs index 863fbdf..2eebf65 100644 --- a/compiler/basicTypes/Module.lhs +++ b/compiler/basicTypes/Module.lhs @@ -37,7 +37,6 @@ module Module rtsPackageId, haskell98PackageId, thPackageId, - ndpPackageId, dphSeqPackageId, dphParPackageId, mainPackageId, @@ -70,6 +69,7 @@ module Module emptyModuleSet, mkModuleSet, moduleSetElts, extendModuleSet, elemModuleSet ) where +import Config import Outputable import qualified Pretty import Unique @@ -213,6 +213,9 @@ data Module = Module { } deriving (Eq, Ord) +instance Uniquable Module where + getUnique (Module p n) = getUnique (packageIdFS p `appendFS` moduleNameFS n) + instance Outputable Module where ppr = pprModule @@ -303,7 +306,7 @@ packageIdString = unpackFS . packageIdFS -- normal in the packages database, and you can still have multiple -- versions of them installed. However, for each invocation of GHC, -- only a single instance of each wired-in package will be recognised --- (the desired one is selected via @-package@/@-hide-package@), and GHC +-- (the desired one is selected via @-package@\/@-hide-package@), and GHC -- will use the unversioned 'PackageId' below when referring to it, -- including in .hi files and object file symbols. Unselected -- versions of wired-in packages will be ignored, as will any other @@ -314,15 +317,14 @@ packageIdString = unpackFS . packageIdFS integerPackageId, primPackageId, basePackageId, rtsPackageId, haskell98PackageId, - thPackageId, ndpPackageId, dphSeqPackageId, dphParPackageId, + thPackageId, dphSeqPackageId, dphParPackageId, mainPackageId :: PackageId primPackageId = fsToPackageId (fsLit "ghc-prim") -integerPackageId = fsToPackageId (fsLit "integer") +integerPackageId = fsToPackageId (fsLit cIntegerLibrary) basePackageId = fsToPackageId (fsLit "base") rtsPackageId = fsToPackageId (fsLit "rts") haskell98PackageId = fsToPackageId (fsLit "haskell98") thPackageId = fsToPackageId (fsLit "template-haskell") -ndpPackageId = fsToPackageId (fsLit "ndp") dphSeqPackageId = fsToPackageId (fsLit "dph-seq") dphParPackageId = fsToPackageId (fsLit "dph-par")