[commit: ghc] master: Remove now redundant cabal conditionals in {ghc, template-haskell}.cabal (122f183)

git at git.haskell.org git at git.haskell.org
Sat Sep 9 12:56:13 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/122f183d47fe46a54d2964111ce269939706b0f8/ghc

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

commit 122f183d47fe46a54d2964111ce269939706b0f8
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sat Sep 9 12:15:00 2017 +0200

    Remove now redundant cabal conditionals in {ghc,template-haskell}.cabal
    
    In the past we needed the construct below for wired-in packages,
    but since GHC 8.0 (which we require at least for stage0 now) the CLI has
    stabilised, so we can unconditionally use `-this-unit-id` since GHC 8.0.
    
        if impl( ghc >= 7.11 )
    	ghc-options:  -this-unit-id template-haskell
        else
    	if impl( ghc >= 7.9 )
    	    ghc-options:  -this-package-key template-haskell
    	else
    	    ghc-options:  -package-name template-haskell


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

122f183d47fe46a54d2964111ce269939706b0f8
 compiler/ghc.cabal.in                             | 12 +++---------
 libraries/template-haskell/template-haskell.cabal | 14 ++++----------
 2 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index 152e156..4348d50 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -49,7 +49,7 @@ Library
     Default-Language: Haskell2010
     Exposed: False
 
-    Build-Depends: base       >= 4   && < 5,
+    Build-Depends: base       >= 4.9 && < 5,
                    deepseq    >= 1.4 && < 1.5,
                    directory  >= 1   && < 1.4,
                    process    >= 1   && < 1.7,
@@ -111,14 +111,8 @@ Library
     Include-Dirs: . parser utils
 
     -- We need to set the unit id to ghc (without a version number)
-    -- as it's magic.  But we can't set it for old versions of GHC (e.g.
-    -- when bootstrapping) because those versions of GHC don't understand
-    -- that GHC is wired-in.
-    if impl ( ghc >= 7.11 )
-        GHC-Options: -this-unit-id ghc
-    else
-        if impl( ghc >= 7.9 )
-            GHC-Options: -this-package-key ghc
+    -- as it's magic.
+    GHC-Options: -this-unit-id ghc
 
     if flag(stage1)
         Include-Dirs: stage1
diff --git a/libraries/template-haskell/template-haskell.cabal b/libraries/template-haskell/template-haskell.cabal
index fcfa448..1f01a15 100644
--- a/libraries/template-haskell/template-haskell.cabal
+++ b/libraries/template-haskell/template-haskell.cabal
@@ -51,18 +51,12 @@ Library
         Language.Haskell.TH.Lib.Map
 
     build-depends:
-        base        >= 4.8 && < 4.11,
+        base        >= 4.9 && < 4.11,
         ghc-boot-th == 8.3,
         pretty      == 1.1.*
 
-    -- We need to set the unit ID to template-haskell (without a
-    -- version number) as it's magic.
     ghc-options: -Wall
 
-    if impl( ghc >= 7.11 )
-        ghc-options:  -this-unit-id template-haskell
-    else
-        if impl( ghc >= 7.9 )
-            ghc-options:  -this-package-key template-haskell
-        else
-            ghc-options:  -package-name template-haskell
+    -- We need to set the unit ID to template-haskell (without a
+    -- version number) as it's magic.
+    ghc-options: -this-unit-id template-haskell



More information about the ghc-commits mailing list