[commit: ghc] wip/nfs-locking: Add support for new keys in package-data files. (13708d7)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:07:40 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/13708d7313bb91ea60e4129d2e6b0f2bcec4ad8e/ghc
>---------------------------------------------------------------
commit 13708d7313bb91ea60e4129d2e6b0f2bcec4ad8e
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Mon Sep 21 01:01:59 2015 +0100
Add support for new keys in package-data files.
>---------------------------------------------------------------
13708d7313bb91ea60e4129d2e6b0f2bcec4ad8e
src/Oracles/PackageData.hs | 58 +++++++++++++++++++++++++++-------------------
1 file changed, 34 insertions(+), 24 deletions(-)
diff --git a/src/Oracles/PackageData.hs b/src/Oracles/PackageData.hs
index e3c1eb5..22031b1 100644
--- a/src/Oracles/PackageData.hs
+++ b/src/Oracles/PackageData.hs
@@ -15,24 +15,29 @@ import qualified Data.HashMap.Strict as Map
-- PackageDataList is used for multiple string options separated by spaces,
-- such as 'path_MODULES = Data.Array Data.Array.Base ...'.
-- pkgListData Modules therefore returns ["Data.Array", "Data.Array.Base", ...]
-data PackageData = Version FilePath
- | PackageKey FilePath
+data PackageData = BuildGhciLib FilePath
| LibName FilePath
+ | PackageKey FilePath
| Synopsis FilePath
- | BuildGhciLib FilePath
+ | Version FilePath
-data PackageDataList = Modules FilePath
- | HiddenModules FilePath
- | SrcDirs FilePath
- | IncludeDirs FilePath
- | Deps FilePath
+data PackageDataList = CcArgs FilePath
+ | CSrcs FilePath
+ | CppArgs FilePath
+ | DepCcArgs FilePath
+ | DepExtraLibs FilePath
| DepIds FilePath
+ | DepIncludeDirs FilePath
+ | DepLdArgs FilePath
+ | DepLibDirs FilePath
| DepNames FilePath
- | CppArgs FilePath
+ | Deps FilePath
+ | HiddenModules FilePath
| HsArgs FilePath
- | CcArgs FilePath
- | CSrcs FilePath
- | DepIncludeDirs FilePath
+ | IncludeDirs FilePath
+ | LdArgs FilePath
+ | Modules FilePath
+ | SrcDirs FilePath
newtype PackageDataKey = PackageDataKey (FilePath, String)
deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
@@ -48,26 +53,31 @@ askPackageData path key = do
pkgData :: PackageData -> Action String
pkgData packageData = case packageData of
- Version path -> askPackageData path "VERSION"
- PackageKey path -> askPackageData path "PACKAGE_KEY"
+ BuildGhciLib path -> askPackageData path "BUILD_GHCI_LIB"
LibName path -> askPackageData path "LIB_NAME"
+ PackageKey path -> askPackageData path "PACKAGE_KEY"
Synopsis path -> askPackageData path "SYNOPSIS"
- BuildGhciLib path -> askPackageData path "BUILD_GHCI_LIB"
+ Version path -> askPackageData path "VERSION"
pkgDataList :: PackageDataList -> Action [String]
pkgDataList packageData = fmap (map unquote . words) $ case packageData of
- Modules path -> askPackageData path "MODULES"
- HiddenModules path -> askPackageData path "HIDDEN_MODULES"
- SrcDirs path -> askPackageData path "HS_SRC_DIRS"
- IncludeDirs path -> askPackageData path "INCLUDE_DIRS"
- Deps path -> askPackageData path "DEPS"
- DepIds path -> askPackageData path "DEP_IPIDS"
- DepNames path -> askPackageData path "DEP_NAMES"
- CppArgs path -> askPackageData path "CPP_OPTS"
- HsArgs path -> askPackageData path "HC_OPTS"
CcArgs path -> askPackageData path "CC_OPTS"
CSrcs path -> askPackageData path "C_SRCS"
+ CppArgs path -> askPackageData path "CPP_OPTS"
+ DepCcArgs path -> askPackageData path "DEP_CC_OPTS"
+ DepExtraLibs path -> askPackageData path "DEP_EXTRA_LIBS"
+ DepIds path -> askPackageData path "DEP_IPIDS"
DepIncludeDirs path -> askPackageData path "DEP_INCLUDE_DIRS_SINGLE_QUOTED"
+ DepLibDirs path -> askPackageData path "DEP_LIB_DIRS_SINGLE_QUOTED"
+ DepLdArgs path -> askPackageData path "DEP_LD_OPTS"
+ DepNames path -> askPackageData path "DEP_NAMES"
+ Deps path -> askPackageData path "DEPS"
+ HiddenModules path -> askPackageData path "HIDDEN_MODULES"
+ HsArgs path -> askPackageData path "HC_OPTS"
+ IncludeDirs path -> askPackageData path "INCLUDE_DIRS"
+ LdArgs path -> askPackageData path "LD_OPTS"
+ Modules path -> askPackageData path "MODULES"
+ SrcDirs path -> askPackageData path "HS_SRC_DIRS"
where
unquote = dropWhile (== '\'') . dropWhileEnd (== '\'')
More information about the ghc-commits
mailing list