[commit: ghc] wip/nfs-locking: Add topLevel function to construct top-level packages like compiler. (f60980a)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:27:31 UTC 2017


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

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

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

commit f60980a571dc9da77a6718d889faf0b8a9b4b58b
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun May 10 01:36:35 2015 +0100

    Add topLevel function to construct top-level packages like compiler.


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

f60980a571dc9da77a6718d889faf0b8a9b4b58b
 src/Package.hs | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/Package.hs b/src/Package.hs
index e5dc94e..3b2f0ec 100644
--- a/src/Package.hs
+++ b/src/Package.hs
@@ -1,4 +1,4 @@
-module Package (Package (..), library, setCabal) where
+module Package (Package (..), library, topLevel, setCabal) where
 
 import Base
 import Util
@@ -20,15 +20,12 @@ instance Eq Package where
 instance Ord Package where
     compare = compare `on` pkgName
 
-libraryPackage :: String -> String -> Package
-libraryPackage name cabalName =
-    Package
-        name
-        (unifyPath $ "libraries" </> name)
-        cabalName
-
 library :: String -> Package
-library name = libraryPackage name (name <.> "cabal")
+library name =
+    Package name (unifyPath $ "libraries" </> name) (name <.> "cabal")
+
+topLevel :: String -> Package
+topLevel name = Package name name (name <.> "cabal")
 
 setCabal :: Package -> FilePath -> Package
 setCabal pkg cabalName = pkg { pkgCabal = cabalName }



More information about the ghc-commits mailing list