[commit: ghc] ghc-8.0: Restore derived Eq instance for SrcLoc (b11b357)
git at git.haskell.org
git at git.haskell.org
Thu Feb 11 15:30:18 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/b11b3571cbd8447f69ec1d3d16f0f3fe1b976c8e/ghc
>---------------------------------------------------------------
commit b11b3571cbd8447f69ec1d3d16f0f3fe1b976c8e
Author: RyanGlScott <ryan.gl.scott at gmail.com>
Date: Tue Feb 9 11:06:34 2016 +0100
Restore derived Eq instance for SrcLoc
GHC 7.10.2 and 7.10.3 had a derived `Eq` instance for `SrcLoc`, but it
seems to have been removed (see
6740d70d95cb81cea3859ff847afc61ec439db4f) during GHC 8.0 development.
Reviewers: hvr, austin, gridaphobe, bgamari
Reviewed By: gridaphobe, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1894
(cherry picked from commit 1f894f298d8f90a4a49196fcda44a696e16ab769)
>---------------------------------------------------------------
b11b3571cbd8447f69ec1d3d16f0f3fe1b976c8e
libraries/base/GHC/Stack/Types.hs | 3 ++-
testsuite/tests/typecheck/should_fail/T5095.stderr | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libraries/base/GHC/Stack/Types.hs b/libraries/base/GHC/Stack/Types.hs
index fb92522..35dfcb0 100644
--- a/libraries/base/GHC/Stack/Types.hs
+++ b/libraries/base/GHC/Stack/Types.hs
@@ -47,6 +47,7 @@ import cycle,
which imports ‘Data.Maybe’ (libraries/base/Data/Maybe.hs)
-}
+import GHC.Classes (Eq)
import GHC.Types
-- Make implicit dependency known to build system
@@ -205,4 +206,4 @@ data SrcLoc = SrcLoc
, srcLocStartCol :: Int
, srcLocEndLine :: Int
, srcLocEndCol :: Int
- }
+ } deriving Eq
diff --git a/testsuite/tests/typecheck/should_fail/T5095.stderr b/testsuite/tests/typecheck/should_fail/T5095.stderr
index c284cda..d5f86c0 100644
--- a/testsuite/tests/typecheck/should_fail/T5095.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5095.stderr
@@ -7,7 +7,7 @@ T5095.hs:9:9: error:
-- Defined in ‘Data.Either’
instance Eq Ordering -- Defined in ‘GHC.Classes’
...plus 24 others
- ...plus 13 instance involving out-of-scope typess
+ ...plus 14 instance involving out-of-scope typess
(use -fprint-potential-instances to see them all)
(The choice depends on the instantiation of ‘a’
To pick the first instance above, use IncoherentInstances
More information about the ghc-commits
mailing list