X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FModule.lhs;h=5047be10b42fe09ff2f1a2638e5ab9769b71a7ff;hb=7df9b88b9e0565f438f16d8005526ffda80a1dbe;hp=9d60247b55c69eaa0b94531c350e273aa1aa583b;hpb=98c68a1c5b63aadf9c7917274519d95bbe9394d4;p=ghc-hetmet.git diff --git a/compiler/basicTypes/Module.lhs b/compiler/basicTypes/Module.lhs index 9d60247..5047be1 100644 --- a/compiler/basicTypes/Module.lhs +++ b/compiler/basicTypes/Module.lhs @@ -28,6 +28,8 @@ module Module packageIdString, -- * Wired-in PackageIds + primPackageId, + integerPackageId, basePackageId, rtsPackageId, haskell98PackageId, @@ -62,14 +64,15 @@ module Module elemModuleSet ) where -#include "HsVersions.h" import Outputable import qualified Pretty import Unique import FiniteMap -import UniqFM +import LazyUniqFM import FastString import Binary + +import System.FilePath \end{code} %************************************************************************ @@ -178,7 +181,7 @@ mkModuleNameFS s = ModuleName s -- Returns the string version of the module name, with dots replaced by slashes moduleNameSlashes :: ModuleName -> String moduleNameSlashes = dots_to_slashes . moduleNameString - where dots_to_slashes = map (\c -> if c == '.' then '/' else c) + where dots_to_slashes = map (\c -> if c == '.' then pathSeparator else c) \end{code} %************************************************************************ @@ -275,18 +278,21 @@ packageIdString = unpackFS . packageIdFS -- package that depends directly or indirectly on it (much as if you -- had used -ignore-package). -basePackageId, rtsPackageId, haskell98PackageId, +integerPackageId, primPackageId, + basePackageId, rtsPackageId, haskell98PackageId, thPackageId, ndpPackageId, mainPackageId :: PackageId -basePackageId = fsToPackageId FSLIT("base") -rtsPackageId = fsToPackageId FSLIT("rts") -haskell98PackageId = fsToPackageId FSLIT("haskell98") -thPackageId = fsToPackageId FSLIT("template-haskell") -ndpPackageId = fsToPackageId FSLIT("ndp") +primPackageId = fsToPackageId (fsLit "ghc-prim") +integerPackageId = fsToPackageId (fsLit "integer") +basePackageId = fsToPackageId (fsLit "base") +rtsPackageId = fsToPackageId (fsLit "rts") +haskell98PackageId = fsToPackageId (fsLit "haskell98") +thPackageId = fsToPackageId (fsLit "template-haskell") +ndpPackageId = fsToPackageId (fsLit "ndp") -- This is the package Id for the program. It is the default package -- Id if you don't specify a package name. We don't add this prefix -- to symbol name, since there can be only one main package per program. -mainPackageId = fsToPackageId FSLIT("main") +mainPackageId = fsToPackageId (fsLit "main") \end{code} %************************************************************************