[commit: ghc] wip/nfs-locking: Switch from condLibrary to condLibraries in Cabal (54a8e15)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 01:05:37 UTC 2017


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

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

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

commit 54a8e1579314b79890635323ff0e317834b720c9
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Jul 14 00:26:35 2016 +0100

    Switch from condLibrary to condLibraries in Cabal
    
    See #269.


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

54a8e1579314b79890635323ff0e317834b720c9
 src/Rules/Cabal.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Rules/Cabal.hs b/src/Rules/Cabal.hs
index ed72f93..e2cdb0f 100644
--- a/src/Rules/Cabal.hs
+++ b/src/Rules/Cabal.hs
@@ -35,7 +35,8 @@ cabalRules = do
             else do
                 need [pkgCabalFile pkg]
                 pd <- liftIO . readPackageDescription silent $ pkgCabalFile pkg
-                let depsLib  = collectDeps $ condLibrary pd
+                -- TODO: Support more than one Cabal library per package.
+                let depsLib  = collectDeps . fmap snd . listToMaybe $ condLibraries pd
                     depsExes = map (collectDeps . Just . snd) $ condExecutables pd
                     deps     = concat $ depsLib : depsExes
                     depNames = [ name | Dependency (DP.PackageName name) _ <- deps ]



More information about the ghc-commits mailing list