[commit: hadrian] master: Add libiserv, rename iserv-bin to iserv, drop primitive (#612) (8dba674)

git at git.haskell.org git at git.haskell.org
Tue Jun 12 22:53:38 UTC 2018


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

On branch  : master
Link       : http://git.haskell.org/hadrian.git/commitdiff/8dba6748e84c632c3c0302620c3e62c9fcc3e948

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

commit 8dba6748e84c632c3c0302620c3e62c9fcc3e948
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Jun 10 02:09:51 2018 +0100

    Add libiserv, rename iserv-bin to iserv, drop primitive (#612)
    
    See https://phabricator.haskell.org/D4436


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

8dba6748e84c632c3c0302620c3e62c9fcc3e948
 src/GHC.hs          | 28 ++++++++++++++--------------
 src/GHC/Packages.hs |  5 +++--
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/src/GHC.hs b/src/GHC.hs
index bdb211b..037ecf6 100644
--- a/src/GHC.hs
+++ b/src/GHC.hs
@@ -5,8 +5,8 @@ module GHC (
     containers, deepseq, deriveConstants, directory, filepath, genapply,
     genprimopcode, ghc, ghcBoot, ghcBootTh, ghcCabal, ghcCompact, ghcHeap, ghci,
     ghcPkg, ghcPrim, ghcTags, ghcSplit, haddock, haskeline, hsc2hs, hp2ps, hpc,
-    hpcBin, integerGmp, integerSimple, iservBin, libffi, mtl, parsec, parallel,
-    pretty, primitive, process, rts, runGhc, stm, templateHaskell, terminfo,
+    hpcBin, integerGmp, integerSimple, iserv, libffi, libiserv, mtl, parsec,
+    parallel, pretty, process, rts, runGhc, stm, templateHaskell, terminfo,
     text, time, touchy, transformers, unlit, unix, win32, xhtml, ghcPackages,
     isGhcPackage, defaultPackages, testsuitePackages,
 
@@ -93,7 +93,8 @@ stage1Packages = do
           ++ [ haddock  | not cross          ]
           ++ [ runGhc   | not cross          ]
           ++ [ hpcBin   | not cross          ]
-          ++ [ iservBin | not win, not cross ]
+          ++ [ iserv    | not win, not cross ]
+          ++ [ libiserv | not win, not cross ]
           ++ [ unix     | not win            ]
           ++ [ win32    | win                ]
 
@@ -114,11 +115,11 @@ programName Context {..} = do
     targetPlatform <- setting TargetPlatformFull
     let prefix = if cross then targetPlatform ++ "-" else ""
       in return $ prefix ++ case package of
-                              p | p == ghc      -> "ghc"
-                                | p == hpcBin   -> "hpc"
-                                | p == runGhc   -> "runhaskell"
-                                | p == iservBin -> "ghc-iserv"
-                              _                 ->  pkgName package
+                              p | p == ghc    -> "ghc"
+                                | p == hpcBin -> "hpc"
+                                | p == runGhc -> "runhaskell"
+                                | p == iserv  -> "ghc-iserv"
+                              _               ->  pkgName package
 
 -- | The build stage whose results are used when installing a package, or
 -- @Nothing@ if the package is not installed, e.g. because it is a user package.
@@ -154,16 +155,15 @@ nonCabalContext Context {..} = (package `elem` [ hp2ps
 
 -- | Some program packages should not be linked with Haskell main function.
 nonHsMainPackage :: Package -> Bool
-nonHsMainPackage = (`elem` [ghc, hp2ps, iservBin, touchy, unlit])
+nonHsMainPackage = (`elem` [ghc, hp2ps, iserv, touchy, unlit])
 
 -- | Path to the autogen directory generated by @ghc-cabal@ of a given 'Context'.
 autogenPath :: Context -> Action FilePath
 autogenPath context at Context {..}
-    | isLibrary package   = autogen "build"
-    | package == ghc      = autogen "build/ghc"
-    | package == hpcBin   = autogen "build/hpc"
-    | package == iservBin = autogen "build/iserv"
-    | otherwise           = autogen $ "build" -/- pkgName package
+    | isLibrary package = autogen "build"
+    | package == ghc    = autogen "build/ghc"
+    | package == hpcBin = autogen "build/hpc"
+    | otherwise         = autogen $ "build" -/- pkgName package
   where
     autogen dir = contextPath context <&> (-/- dir -/- "autogen")
 
diff --git a/src/GHC/Packages.hs b/src/GHC/Packages.hs
index e7ede7f..5902396 100644
--- a/src/GHC/Packages.hs
+++ b/src/GHC/Packages.hs
@@ -15,7 +15,7 @@ ghcPackages =
     , containers, deepseq, deriveConstants, directory, filepath, genapply
     , genprimopcode, ghc, ghcBoot, ghcBootTh, ghcCompact, ghcHeap, ghci, ghcPkg
     , ghcPrim, ghcTags, haddock, haskeline, hsc2hs, hp2ps, hpc, hpcBin, integerGmp
-    , integerSimple, iservBin, libffi, mtl, parsec, parallel, pretty, primitive
+    , integerSimple, iserv, libffi, libiserv, mtl, parsec, parallel, pretty
     , process, rts, runGhc, stm, templateHaskell, terminfo, text, time, touchy
     , transformers, unlit, unix, win32, xhtml ]
 
@@ -58,8 +58,9 @@ hpc                 = hsLib  "hpc"
 hpcBin              = hsUtil "hpc-bin"         `setPath` "utils/hpc"
 integerGmp          = hsLib  "integer-gmp"
 integerSimple       = hsLib  "integer-simple"
-iservBin            = hsUtil "iserv-bin"       `setPath` "iserv"
+iserv               = hsUtil "iserv"
 libffi              = cTop   "libffi"
+libiserv            = hsLib  "libiserv"
 mtl                 = hsLib  "mtl"
 parsec              = hsLib  "parsec"
 parallel            = hsLib  "parallel"



More information about the ghc-commits mailing list