[commit: packages/Cabal] ghc-head: Support non-orphaned `instance Data Version` in GHCâ¥7.7 (e409c80)
git at git.haskell.org
git at git.haskell.org
Fri Sep 13 17:55:37 CEST 2013
Repository : ssh://git@git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=e409c80f1d97af2821422f4d5e830534fb16ee95
>---------------------------------------------------------------
commit e409c80f1d97af2821422f4d5e830534fb16ee95
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Fri Sep 13 11:22:58 2013 +0200
Support non-orphaned `instance Data Version` in GHC≥7.7
Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>
(cherry picked from commit c8299265457197e11184998cffc19596d5116186)
>---------------------------------------------------------------
e409c80f1d97af2821422f4d5e830534fb16ee95
Cabal/Distribution/Version.hs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Cabal/Distribution/Version.hs b/Cabal/Distribution/Version.hs
index ca93319..feb3146 100644
--- a/Cabal/Distribution/Version.hs
+++ b/Cabal/Distribution/Version.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
+{-# LANGUAGE CPP, DeriveDataTypeable, StandaloneDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Version
@@ -121,8 +121,10 @@ data VersionRange
| VersionRangeParens VersionRange -- just '(exp)' parentheses syntax
deriving (Show,Read,Eq,Typeable,Data)
--- TODO orphan
+#if __GLASGOW_HASKELL__ < 707
+-- starting with ghc-7.7/base-4.7 this instance is provided in "Data.Data"
deriving instance Data Version
+#endif
{-# DEPRECATED AnyVersion "Use 'anyVersion', 'foldVersionRange' or 'asVersionIntervals'" #-}
{-# DEPRECATED ThisVersion "use 'thisVersion', 'foldVersionRange' or 'asVersionIntervals'" #-}
More information about the ghc-commits
mailing list