[commit: ghc] wip/nfs-locking: Make Package datatype abstract (39a2b89)

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


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

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

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

commit 39a2b89543e584f7349800db14ab6d1182f7c2fc
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Fri Aug 18 01:03:42 2017 +0100

    Make Package datatype abstract


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

39a2b89543e584f7349800db14ab6d1182f7c2fc
 src/Hadrian/Haskell/Package.hs | 4 ++--
 src/Rules/Install.hs           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Hadrian/Haskell/Package.hs b/src/Hadrian/Haskell/Package.hs
index d7dd3df..cd63589 100644
--- a/src/Hadrian/Haskell/Package.hs
+++ b/src/Hadrian/Haskell/Package.hs
@@ -1,7 +1,7 @@
 module Hadrian.Haskell.Package (
-    Package (..), PackageName (..), PackageType (..),
+    Package, PackageName (..), PackageType (..),
     -- * Queries
-    pkgNameString, pkgCabalFile,
+    pkgName, pkgPath, pkgType, pkgNameString, pkgCabalFile,
     -- * Helpers for constructing and using 'Package's
     setPath, topLevel, library, utility, setType, isLibrary, isProgram
     ) where
diff --git a/src/Rules/Install.hs b/src/Rules/Install.hs
index 1d0cd9e..a13e8eb 100644
--- a/src/Rules/Install.hs
+++ b/src/Rules/Install.hs
@@ -181,7 +181,7 @@ installPackages = do
 
     installLibPkgs <- topsortPackages (filter isLibrary activePackages)
 
-    forM_ installLibPkgs $ \pkg at Package{..} -> do
+    forM_ installLibPkgs $ \pkg -> do
         when (isLibrary pkg) $
             withLatestBuildStage pkg $ \stage -> do
                 let context = vanillaContext stage pkg
@@ -211,7 +211,7 @@ installPackages = do
 
                 pref <- setting InstallPrefix
                 unit $ cmd ghcCabalInplace [ "copy"
-                                           , pkgPath
+                                           , pkgPath pkg
                                            , installDistDir
                                            , strip
                                            , destDir
@@ -228,7 +228,7 @@ installPackages = do
                                    , installedPackageConf, "update"
                                    , confPath ]
 
-    forM_ installLibPkgs $ \pkg at Package{..} -> do
+    forM_ installLibPkgs $ \pkg -> do
         when (isLibrary pkg) $
             withLatestBuildStage pkg $ \stage -> do
                 let context = vanillaContext stage pkg
@@ -241,7 +241,7 @@ installPackages = do
                 r      <- relocatableBuild
                 unit $ cmd ghcCabalInplace
                     [ "register"
-                    , pkgPath
+                    , pkgPath pkg
                     , installDistDir
                     , installedGhcReal
                     , installedGhcPkgReal



More information about the ghc-commits mailing list