[commit: ghc] wip/nfs-locking: Add package data key HsOpts. (1a3f43b)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:52:05 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/1a3f43b55d543e784762cf8f0e9bf40e15820703/ghc

>---------------------------------------------------------------

commit 1a3f43b55d543e784762cf8f0e9bf40e15820703
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Jan 14 04:00:39 2015 +0000

    Add package data key HsOpts.


>---------------------------------------------------------------

1a3f43b55d543e784762cf8f0e9bf40e15820703
 src/Oracles/PackageData.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/Oracles/PackageData.hs b/src/Oracles/PackageData.hs
index bf94713..854fb8c 100644
--- a/src/Oracles/PackageData.hs
+++ b/src/Oracles/PackageData.hs
@@ -20,6 +20,7 @@ data PackageData = Modules     FilePath
                  | DepKeys     FilePath
                  | Synopsis    FilePath
                  | CppOpts     FilePath
+                 | HsOpts      FilePath
 
 instance ShowArgs PackageData where
     showArgs packageData = do
@@ -32,8 +33,10 @@ instance ShowArgs PackageData where
                DepKeys     file -> ("DEP_KEYS"    , file, "" )
                Synopsis    file -> ("SYNOPSIS"    , file, "" )
                CppOpts     file -> ("CPP_OPTS"    , file, "" )
+               HsOpts      file -> ("HC_OPTS"     , file, "" )
             fullKey = replaceSeparators '_' $ takeDirectory file ++ "_" ++ key
-        res <- askOracle $ PackageDataKey (file, fullKey)
+            file'   = toStandard $ normaliseEx file
+        res <- askOracle $ PackageDataKey (file', fullKey)
         return $ words $ case res of
             Nothing    -> error $ "No key '" ++ key ++ "' in " ++ file ++ "."
             Just ""    -> defaultValue



More information about the ghc-commits mailing list