[commit: ghc] master: Derive Generic instance for Data.Version.Version (c327393)
git at git.haskell.org
git at git.haskell.org
Tue Apr 14 06:20:14 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/c327393314a27ea77716c25b9cf56d45960f7876/ghc
>---------------------------------------------------------------
commit c327393314a27ea77716c25b9cf56d45960f7876
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Tue Apr 14 01:12:38 2015 -0500
Derive Generic instance for Data.Version.Version
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D827
>---------------------------------------------------------------
c327393314a27ea77716c25b9cf56d45960f7876
libraries/base/Data/Version.hs | 4 +++-
libraries/base/changelog.md | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/libraries/base/Data/Version.hs b/libraries/base/Data/Version.hs
index 20060c4..aba8cf7 100644
--- a/libraries/base/Data/Version.hs
+++ b/libraries/base/Data/Version.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE Safe #-}
+{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
@@ -43,6 +44,7 @@ import Data.Int ( Int )
import Data.List
import Data.Ord
import Data.String ( String )
+import GHC.Generics
import GHC.Read
import GHC.Show
import Text.ParserCombinators.ReadP
@@ -91,7 +93,7 @@ data Version =
-- The interpretation of the list of tags is entirely dependent
-- on the entity that this version applies to.
}
- deriving (Read,Show)
+ deriving (Read,Show,Generic)
{-# DEPRECATED versionTags "See GHC ticket #2496" #-}
-- TODO. Remove all references to versionTags in GHC 7.12 release.
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index 56b9fae..5bf5418 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -33,6 +33,8 @@
* `System.Exit.ExitCode` now has a `Generic` instance
+ * `Data.Version.Version` now has a `Generic` instance
+
## 4.8.0.0 *Mar 2015*
* Bundled with GHC 7.10.1
More information about the ghc-commits
mailing list