[commit: ghc] master: Drop use of CPP in `bin-package-db` (61fdafc)

git at git.haskell.org git at git.haskell.org
Thu May 15 08:33:05 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/61fdafcf96c2586710c9bbb0a0db2f21e348fc1e/ghc

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

commit 61fdafcf96c2586710c9bbb0a0db2f21e348fc1e
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Wed May 14 12:33:31 2014 +0200

    Drop use of CPP in `bin-package-db`
    
    This also removes the redundant `default-extensions` field in
    `bin-package-db.cabal` and adds an `other-extensions` field instead.
    
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


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

61fdafcf96c2586710c9bbb0a0db2f21e348fc1e
 .../bin-package-db/Distribution/InstalledPackageInfo/Binary.hs     | 7 +++----
 libraries/bin-package-db/bin-package-db.cabal                      | 7 ++++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs b/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
index ab7fcf5..6ad1697 100644
--- a/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
+++ b/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
@@ -1,11 +1,10 @@
-{-# LANGUAGE CPP, RecordWildCards, TypeSynonymInstances, StandaloneDeriving, GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE RecordWildCards, Trustworthy, TypeSynonymInstances, StandaloneDeriving,
+             GeneralizedNewtypeDeriving #-}
 {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
 -- This module deliberately defines orphan instances for now. Should
 -- become unnecessary once we move to using the binary package properly:
 {-# OPTIONS_GHC -fno-warn-orphans #-}
-#if __GLASGOW_HASKELL__ >= 701
-{-# LANGUAGE Trustworthy #-}
-#endif
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Distribution.InstalledPackageInfo.Binary
diff --git a/libraries/bin-package-db/bin-package-db.cabal b/libraries/bin-package-db/bin-package-db.cabal
index 699a1dd..dd84f9c 100644
--- a/libraries/bin-package-db/bin-package-db.cabal
+++ b/libraries/bin-package-db/bin-package-db.cabal
@@ -14,6 +14,12 @@ source-repository head
 
 Library
     default-language: Haskell2010
+    other-extensions:
+            GeneralizedNewtypeDeriving
+            RecordWildCards
+            StandaloneDeriving
+            Trustworthy
+            TypeSynonymInstances
 
     exposed-modules:
             Distribution.InstalledPackageInfo.Binary
@@ -22,4 +28,3 @@ Library
                    binary >= 0.5 && < 0.8,
                    Cabal >= 1.20 && < 1.21
 
-    default-extensions: CPP



More information about the ghc-commits mailing list