Commit 31fce20b authored by dterei's avatar dterei
Browse files

Add trust bool field to packages for SafeHaskell

parent acfdf2f8
......@@ -106,6 +106,7 @@ data InstalledPackageInfo_ m
exposed :: Bool,
exposedModules :: [m],
hiddenModules :: [m],
trusted :: Bool,
importDirs :: [FilePath], -- contain sources in case of Hugs
libraryDirs :: [FilePath],
hsLibraries :: [String],
......@@ -147,6 +148,7 @@ emptyInstalledPackageInfo
exposed = False,
exposedModules = [],
hiddenModules = [],
trusted = False,
importDirs = [],
libraryDirs = [],
hsLibraries = [],
......@@ -242,6 +244,8 @@ installedFieldDescrs = [
, listField "hidden-modules"
disp parseModuleNameQ
hiddenModules (\xs pkg -> pkg{hiddenModules=xs})
, boolField "trusted"
trusted (\val pkg -> pkg{trusted=val})
, listField "import-dirs"
showFilePath parseFilePathQ
importDirs (\xs pkg -> pkg{importDirs=xs})
......
......@@ -110,6 +110,7 @@ toCurrent ipi@InstalledPackageInfo{} = Current.InstalledPackageInfo {
Current.exposed = exposed ipi,
Current.exposedModules = map convertModuleName (exposedModules ipi),
Current.hiddenModules = map convertModuleName (hiddenModules ipi),
Current.trusted = False,
Current.importDirs = importDirs ipi,
Current.libraryDirs = libraryDirs ipi,
Current.hsLibraries = hsLibraries ipi,
......
......@@ -145,6 +145,7 @@ toCurrent ipi@InstalledPackageInfo{} = Current.InstalledPackageInfo {
Current.exposed = exposed ipi,
Current.exposedModules = map convertModuleName (exposedModules ipi),
Current.hiddenModules = map convertModuleName (hiddenModules ipi),
Current.trusted = False,
Current.importDirs = importDirs ipi,
Current.libraryDirs = libraryDirs ipi,
Current.hsLibraries = hsLibraries ipi,
......
......@@ -275,6 +275,7 @@ generalInstalledPackageInfo adjustRelIncDirs pkg lib clbi installDirs =
IPI.exposed = libExposed lib,
IPI.exposedModules = exposedModules lib,
IPI.hiddenModules = otherModules bi,
IPI.trusted = False,
IPI.importDirs = [ libdir installDirs | hasModules ],
IPI.libraryDirs = if hasLibrary
then libdir installDirs : extraLibDirs bi
......
Supports Markdown
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